• 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
Using pilight-daemon socket API
#1
Heyho community,

i wanted to trigger a "pillight-send" through the pilight-daemon socket, but unfortunetly it does not work.
I read the documentation under /development/socket and tried it like in the actions part described.
Not succeeding i ran the deamon in debug mode an watched the traffic on the choosen port. i compared the json i send with the json which arrived when calling "pilight-send". Because it was different, i adapt the json format from the succeding pilight command.
Now i am at the point where both, the json of pilight-send and my equal to that json from my python script arrive at the port, to which the deamon listens.
But still the lights don't change with my python json.
Can anybody tell me what is going wrong? Am i using the API in a wrong way? Or how to use it instead?

Thank you for reading,
Magda
 
Reply
#2
Have you checked the pilight-send source to compare the implementations?
 
Reply
#3
(04-28-2019, 08:15 PM)curlymo Wrote: Have you checked the pilight-send source to compare the implementations?

No not yet, thats a good point! IThank you, i will do it and will let you know!
 
Reply
#4
Ok, so i compared my code to the examples of python clients in the source-code. The example just refer to the case, where they want the daemon to identify.
So im still not sure, whats the format for a "send" action. Like described in the docs or eqal to what arrived when using pilight-send? No idea.. Maybe some experiences might help?
 
Reply
#5
You compared to the python examples, i meant comparing to the C code of pilight-send.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Starting pilight on boot: "cannot bind to the SSDP multicast network" pilino1234 3 153 08-31-2019, 10:41 PM
Last Post: curlymo
Tongue pilight 8.1.5-1-gc0a175e0 Chrashes fleisch 4 332 08-17-2019, 01:04 PM
Last Post: curlymo
  pilight for Raspbian Buster (raspberry pi 4) ? starob 29 1,996 07-15-2019, 08:45 PM
Last Post: curlymo
  pilight-receive Filteroption not working Alex 2 455 07-14-2019, 08:35 AM
Last Post: Alex
  pilight usb nano format conversion ettman8 2 339 07-14-2019, 08:32 AM
Last Post: curlymo
  pilight 8.1.4 crashes after some hours Ulrich.Arnold 47 2,319 06-29-2019, 08:58 PM
Last Post: curlymo
  Raspberry PI, gpio-ir-tx and pilight not starting lordslash 5 701 06-11-2019, 05:19 PM
Last Post: curlymo
  pilight fails starting on boot Alex 5 615 06-09-2019, 06:02 PM
Last Post: curlymo
  Google Assistant coupled to pilight hansrijn2 4 1,092 05-29-2019, 06:54 PM
Last Post: curlymo
  pilight-send does not stop (terminate) va13 3 597 05-15-2019, 06:06 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)