Restart only single addon

I am sorry to bother you endlessly, but I don’t get the point here:

This works fine triggered in a rule:

var String json = executeCommandLine("/usr/local/bin/voc -u 'xxx' -p 'xxx' owntracks", 10000)

This as a Thing does not:

Thing exec:command:car          [command="/usr/local/bin/voc -u 'xxx' -p 'xxx' owntracks", interval=300, timeout=10, autorun=false]

with my item:
String CarResponse "VOC response [%s]" (G_jdbc) {channel="exec:command:car:output"}

Add some logging to find what line it is failing on in the rule. It is likely a case where the Rules DSL is failing to convert something automatically like it should.

Once we see what line it is failing on and what all the values are being used in that line are the problem usually becomes obvious.

There error is being thrown from your rule so the Things should be fine.

No problem. It’s a holiday weekend here in the States so my replies are a bit delayed.

What is the output channel being set to when the Thing runs? What line fails in the Rule?

Thanks again Rich.
I will extend logging to see where the rule fails.

One question though.
Is there an advantage by moving the execute command from the rule into a Thing?

I hope that you’ve had nice 4th of July holidays so far.

Since the goal is to reduce the lines of code, moving the call to the script to the Exec binding saves a handfull of lines of code. I’m working on the assumption that residing the code count will lower your startup time.

It also makes it so your rule doesn’t have to wait around waiting for the script to complete. Long running rules can cause problems too. So it is probably work while working to get it working.

Thanks! It has been.

1 Like

Thanks - got it.

Beautiful panorama - looks like Montana!?

I gave it another try:

Thing:
Thing exec:command:carStatus [command="/usr/local/bin/voc -u 'xxx' -p 'xxx' status", interval=300, timeout=10, autorun=false]

Item:
String CarStatus "Pulpo Status [%s]" (G_jdbc) {channel="exec:command:carStatus:output"}

executing in a shell this works fine and returns the json response
/usr/local/bin/voc -u 'xxx' -p 'xxx' status

However, events.log of the item shows:

2018-07-08 09:41:29.438 [vent.ItemStateChangedEvent] - CarStatus changed from - to Could not connect to the server.
Could not connect to the server.

So twice the result which is returned when server is not reachable.
Actually it seems there is a "carriage return / new line in between the two “Could not connect…” - Although I don’t know, what this might mean… :frowning:

And the changes are stored twice in the DB:
grafik

Pikes Peak???

I remember the good old times where I drove up that road to the summit (where it still was unpaved) …

Maroon Bells in Aspen, CO. I live about 4 hours from there so we took a day trip to ride the gondola and visit the park.

Nah. I live about 30 minutes from there. I can actually see it from my front yard. If take a picture but with all the fires the mountains are all but obscured.

And while Pike’s Peak is “America’s Peak”, it is not as picturesque as Maroon Bells. Though I live here so perhaps familiarity takes the edge off For the best of what the Colorado Rockies have to offer you need to go to Estes Park and visit Rocky Mountain National Park. If you are a Stephen King fan, the movie The Shining was filmed at the big hotel in Estes Park. South Central CO around Ouray and Telluride are also breathtaking.

Though I will say I’ve never seen a sight as spectacular as our city park, Garden of the Gods, in the snow.

You can’t even do that much anymore, at least for the next few years. They closed the cog railway for repairs (we hope) and they are rebuilding the summit house so the only way to get up to the top now is via a shuttle.

Edit: don’t get me wrong. Colorado Springs is awesome too visit. Everyone should make the trip who has the opportunity. And I LOVE living here.

Sounds awesome.
I haven’t been neither at Pikes Peak nor at Maroon Bells, but I will keep this in mind for one of my next trips to the US.

I visited that one too, but during summer time (I think it was 1991, so too long ago :joy:)

I can believe that. Colorado Springs was one of my favourite places in the US. Last time (2012) unfortunately I have only seen I25 while driving to Denver Airport :sunglasses:

If you ever make it back, take State HW 83 which is a bit east of I-25. Beautiful rolling hills, mountains in the distance, and almost no traffic. Depending on the traffic it will take 30 minutes longer but the drive is so much more pleasant. And of course, if you make it to this neck of the woods, we should meet up and have a beer at one of the many breweries.

1 Like