I used to have below item with transform which worked in OH1: Number SolarLog_Installed "PAC Max. [%.3f kWh]" (gDashboard, GR_Solarlog) { exec="<[/bin/sh@@-c@@//etc/openhab/configurations/solarget.sh:60000:JS(getSL116.js)]" }
Now I am migrating to OH2 and changed this to:
in things: exec:command:solarlog [ command="/bin/sh -c /etc/openhab2/scripts/solarget.sh", interval=15, timeout=5]
in items: Number SolarLog_Installed "PAC Max. [%.3f kWh]" (gDashboard, GR_Solarlog) { channel="exec:command:solarlog:output:JS(getSL116.js)" }
Thanks for the help!
Problem has been solved, stupid config mistake. the transform needs to be defined in the Things definition and not in the item definition
I was wondering about that. I’ve not done transforms on OH 2 Thing/Channel/Item combos yet so thought maybe you knew something I didn’t. Glad you got it working. We both learned something today.
Still not ok, although the transform is correct.
In my logs I receive
19:15:47.523 [WARN ] [.thing.internal.GenericThingProvider] - Could not create channel 'run' for thing 'exec:command:slog_Update', because channel type 'exec:running' could not be found.
I do not get the exec 2.0 binding working.
In the sitemap, the values do not change for the JON query.
No idea how to debug.