Hello.
I finally has the piSchedule 7.5 running (web) but I´m not able to control pilight device.
I have read a lot of documentation and forums and I have to complain about API json documentation and versions (pilight, pilight-development and pilight-nighty).
I have pilight v.7 from standar raspbian repository
and I dont want to use another unstable version, due to I want maximum stability.
I suppose piSchedule is working with pilight v.7 stable version. I can see logs controlling devices, an in piSystem.log I can see this:
It is supposed that piSchedule is using web api, but if I see doc wiki api
https://wiki.pilight.org/doku.php/api
it says that
I have tried to directly commandline "curl" with this...
but I allways receive
{"message":"failed"} response
I have tried to change protocol API, as seem that has changed a lot and is changing, but with no success.
Another thing is that the device I want to switch is a GPIO, but I tried with a generic, call by "id", etc. and allways get {"message":"failed"}.
So I am suspecting that webcontrol device is not possible on stable pilight version
Can anybody help me.
Im really desesperated with this.
Thanks
I finally has the piSchedule 7.5 running (web) but I´m not able to control pilight device.
I have read a lot of documentation and forums and I have to complain about API json documentation and versions (pilight, pilight-development and pilight-nighty).
I have pilight v.7 from standar raspbian repository
Code:
sudo pilight-daemon -V
pilight-daemon version v7.0-140-ga2719cf
and I dont want to use another unstable version, due to I want maximum stability.
I suppose piSchedule is working with pilight v.7 stable version. I can see logs controlling devices, an in piSystem.log I can see this:
Code:
#3374 09:36:20 - ESC[1;35mpiSchedule fire_pilight #169ESC[0m url http://192.168.1.7:5001/send?{"action":"control","code"
:{"device":"sw1_filt","state":"on"}}
It is supposed that piSchedule is using web api, but if I see doc wiki api
https://wiki.pilight.org/doku.php/api
it says that
Quote:Webserver
This feature is part of the development version of pilight
The webserver has two special pages.
The config page will present the latest config json object.
The send page can be used to control devices. To use this function call the send page with a send object url encoded like this:
Code:send?%7B%0A%09%22message%22%3A%20%22send%22%2C%0A%09%22code%22%3A%20%7B%0A%09%09%22location%22%3A%20%22living%22%2C%0A%09%09%22device%22%3A%20%22mainlight%22%2C%0A%09%09%22state%22%3A%20%22on%22%2C%0A%09%09%22values%22%3A%20%7B%0A%09%09%09%22dimlevel%22%3A%20%2210%22%0A%09%09%7D%0A%09%7D%0A%7D
I have tried to directly commandline "curl" with this...
Code:
curl -v -G http://192.168.1.7:5001/send --data-urlencode "{\"action\":\"control\",\"code\":{\"device\":\"sw1_filt\",\"state\":\"on\"}}"
but I allways receive
{"message":"failed"} response
I have tried to change protocol API, as seem that has changed a lot and is changing, but with no success.
Another thing is that the device I want to switch is a GPIO, but I tried with a generic, call by "id", etc. and allways get {"message":"failed"}.
So I am suspecting that webcontrol device is not possible on stable pilight version
Can anybody help me.
Im really desesperated with this.
Thanks