• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
piScheduler -- A pilight extension for the daily switch plan
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


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
 
Reply
  


Messages In This Thread
RE: piScheduler -- A pilight extension for the daily switch plan - by segalion - 06-27-2016, 10:38 AM
piSchedule error - by donbucknall - 01-02-2016, 05:30 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Does piSchedule work with pilight 8.1.1-nightly Peter S 0 2,019 06-29-2018, 07:57 PM
Last Post: Peter S
  pilight-console - an LCD / keypad interface for pilight frenchie71 3 1,833 11-21-2017, 11:15 PM
Last Post: curlymo
  Connect pilight to your hue bridge hannemann 3 3,282 01-03-2017, 11:26 PM
Last Post: hannemann
Wink PHP class using pilight socket connection Dan 0 1,783 11-03-2016, 11:41 AM
Last Post: Dan
  Controlling a RGB Led Strip over pilight mightyuhu 2 2,861 08-06-2016, 09:10 PM
Last Post: JohannK
  HomeBridge with pilight on raspbian Jurre 10 13,793 04-06-2016, 07:45 AM
Last Post: tomtom
  pilight voice commands kniazio 11 7,158 01-29-2016, 07:51 PM
Last Post: sral
  Python Ping pilight detect mobilephone Cryptomaster 0 2,460 01-10-2016, 04:17 PM
Last Post: Cryptomaster
  pilight config editor ktams 16 9,634 01-06-2016, 02:42 PM
Last Post: ktams
  command processing between pilight and openhab royhofman1989 3 3,250 07-13-2015, 11:26 AM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)