I’m having problems with my exec binding after moving from oh1 to oh2.
I have installed the exec legacy binding and the regex transformation.
in my items there stands:
Number TEMP_WOHNZIMMER “Temperatur Mein Zimmer [%.1f °C]” (Temperatur) { exec="<[sudo /etc/openhab/scripts/dht22.sh TEMP:60000:REGEX((.*?))]" }
Absolutely. You just need to create a filename.things file in the things folder and use the syntax defined in the readme. But it won’t really work any differently and you will still have to follow the approach outlined above.
The exec2 binding was introduced after the beta4 was released. From my understanding, you have to switch your whole installation from Beta to Snapshot to get the exec2 binding.
But you can easily continue using the exec1 binding in OH2 (so do I!).
I see a sudo command in your exec and also a space after the script names. Both may lead into trouble.
And you should set the log level to DEBUG. Maybe this will get you some more information. And do you have a look only at the openhab.log? Or also at the events.log?
Number TEMP_WOHNZIMMER "Temperatur Mein Zimmer [%.1f °C]" <temperature> (Temperatur) {channel="exec:command:TEMP:output"}
Number LUFT_WOHNZIMMER "Luftfeuchtigkeit Mein Zimmer [%.1f %%]" <humidity> (Temperatur) {channel="exec:command:HUM:output"}
openhab.log:
2016-12-26 14:42:50.274 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '18.00' for item 'TEMP_WOHNZIMMER' to handler for channel 'exec:command:TEMP_WOHNZIMMER:output', because no thing with the UID 'exec:command:TEMP_WOHNZIMMER' could be found.
2016-12-26 14:42:51.289 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '' for item 'LUFT_WOHNZIMMER' to handler for channel 'exec:command:LUFT_WOHNZIMMER:output', because no thing with the UID 'exec:command:LUFT_WOHNZIMMER' could be found.
2016-12-26 14:42:53.856 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '18.00' for item 'TEMP_WOHNZIMMER' to handler for channel 'exec:command:TEMP_WOHNZIMMER:output', because no thing with the UID 'exec:command:TEMP_WOHNZIMMER' could be found.
2016-12-26 14:43:54.404 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '' for item 'TEMP_WOHNZIMMER' to handler for channel 'exec:command:TEMP_WOHNZIMMER:output', because no thing with the UID 'exec:command:TEMP_WOHNZIMMER' could be found.
2016-12-26 14:43:54.529 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '53.50' for item 'LUFT_WOHNZIMMER' to handler for channel 'exec:command:LUFT_WOHNZIMMER:output', because no thing with the UID 'exec:command:LUFT_WOHNZIMMER' could be found.
2016-12-26 14:44:55.390 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '' for item 'LUFT_WOHNZIMMER' to handler for channel 'exec:command:LUFT_WOHNZIMMER:output', because no thing with the UID 'exec:command:LUFT_WOHNZIMMER' could be found.
2016-12-26 14:44:56.754 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '18.00' for item 'TEMP_WOHNZIMMER' to handler for channel 'exec:command:TEMP_WOHNZIMMER:output', because no thing with the UID 'exec:command:TEMP_WOHNZIMMER' could be found.
2016-12-26 14:45:57.315 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '' for item 'TEMP_WOHNZIMMER' to handler for channel 'exec:command:TEMP_WOHNZIMMER:output', because no thing with the UID 'exec:command:TEMP_WOHNZIMMER' could be found.
2016-12-26 14:45:59.633 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '53.40' for item 'LUFT_WOHNZIMMER' to handler for channel 'exec:command:LUFT_WOHNZIMMER:output', because no thing with the UID 'exec:command:LUFT_WOHNZIMMER' could be found.
Any Ideas?
My Number is not updating.
The error message is right. But I don’t use the thing exec:command:LUFT_WOHNZIMMER.
Try using a switch item witch contains {channel=“exec:command:TEMP:run”}. It should run exec command when the switch is turned on. I haven’t used exec2 binding, but this is my understanding of exec2 readme.
Well, a readme is not very concise. You say you can see a value in HABMin? What do you get if you try to access an item via Rest interface? Do you get a valid result? Maybe it’s a sitemap problem?
Ok, it’s now a little bit more clear.
The Items have state null in the rest api
But I can see some old items which I deleted before.
The error messages come from those old links I created before and deleted them.
So I have found a bug, old links and items are not been deleted.
The things in habmin get the value.
In the habmin sitemap there I can see only NULL. After a short time there are the right values.
In the paper UI control the value is also displayed
I’m not 100% sure about this, but it could be an item type mismatch. Since script returns result as text, you should try using String item instead of Number. It’s String item they use in the exec readme example too.