I’m trying to create an item that returns JSON data from a shell script (that I can then parse and put into other items).
String Test string exec="<[test.sh:5000]" }
which I thought would run every 5 seconds and put the JSON data into “Test”.
However in the logs I get:
19:20:07.673 ERROR o.o.m.i.i.GenericItemProvider[:350]- Binding configuration of type 'exec' of item \u2018Test\u2018 could not be parsed correctly.
org.openhab.model.item.binding.BindingConfigParseException: bindingConfig 'test.sh' doesn't represent a valid in-binding-configuration.
I assume I’m doing something dumb, but not clear to me what it is… any help would be much appreciated…
Your Item definition has two errors. First of all you cannot have a space in your Item name. Second you are missing the open “{” in your binding definition. It should be:
Hmmm. The error clearly indicates that the problem is in parsing of the exec binding string. What is weird is the \u2018 which is unicode for left single quote which I don’t see anywhere in the Item def you provide. Based on what you have here the error makes no sense.
The format, as shown looks correct. Maybe you have some characters in place that are not being rendered by whatever you are using to edit your Items file with.
The first thing I would try is to delete the Item definition and retype it in. Believe it or not I’ve had that work more than once for me over the years from shell script to C++ code. Make sure you are using either Designer or a basic text editor as well (vi, vim, emacs, pico, etc) to keep it from mucking with the text to make it pretty.