I have two instances of pimatic running. On one instance, pimatic1, i have a “GpioSwitch” and on other instance, pimatic2, i want to control this “GpioSwitch” over the API.
I have this on instance pimatic2:
{ "id": "boden", "name": "Boden", "class": "ShellSwitch", "onCommand": "curl --silent --user '*****:******' http://pool.keno.lan:1607/api/device/boden/turnOn", "offCommand": "curl --silent --user '******:******' http://pool.keno.lan:1607/api/device/boden/turnOff", "getStateCommand": "curl --silent --user '*****:******' http://pool.keno.lan:1607/api/device/boden/getState" },
Now i have problems to get it running:
19:16:06.180 [pimatic] error: Could not get attribute value of Boden.state: ShellSwitch: unknown state="{ 19:16:06.180 [pimatic] error:> "result": true, 19:16:06.180 [pimatic] error:> "success": true 19:16:06.180 [pimatic] error:>}"! 19:16:06.205 [pimatic] debug: Error: ShellSwitch: unknown state="{ 19:16:06.205 [pimatic] debug:> "result": true, 19:16:06.205 [pimatic] debug:> "success": true 19:16:06.205 [pimatic] debug:>}"!
How to get a “true/false” state of the switch over the API?