• 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
API: send raw code to daemon
#1
Hi,

is the raw protocol also supported for the API?
I used following syntax to send my raw code to turn LEDs on:

Code:
{"message":"send", "code":{"393 655 393 1703 393 1703 393 655 393 655 393 655 393 655 393 655 393 1703 393 1703 524 655 393 1703 393 1703 393 655 393 1703 393 655 393 655 393 655 393 655 393 655 393 655 393 655 393 655 393 1703 393 1703 524 655 393 1703 393 1703 393 1703 393 655 393 1703 393 1703 393 11790 8646 4454","protocol":["raw"]}}

But nothing happend. (The same raw code works with pilight-send.)
Is there a mistake in the JSON Object or do I need to create an own protocol for the LEDs?

Thank you
 
#2
Your syntax is wrong:
http://www.pilight.org/index.php?id=api

And please edit your post to include proper markup.
 
#3
I had the syntax from this post:

http://forum.pilight.org/Thread-solved-c...ght=syntax

Now I tried to use the syntax from the API page like this:

Code:
{"message":"send","protocol":[ "raw" ],"code":{"my raw code"}}

But it also does not work.
I looked at the debug output of the daemon and the JSON object is received and no error message returned.
What could be wrong?
 
#4
And if you remove the hooks around the protocol value?
 
#5
What do you mean with hooks, the " or the [ ?
I tried both:

Code:
{"message":"send","protocol":"raw","code":{"my raw code"}}
and
Code:
{"message":"send","protocol":[raw],"code":{"my raw code"}}

But it did not change anything.
 
#6
I shall test when i'm at home.
 
#7
I tested it and got the error:
Code:
{"message":"send","code":{"code":"1234 1234","protocol":[ "raw" ]}}
 
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  communication between main daemon and clientized daemon stops tomk 29 1,532 05-06-2019, 08:57 PM
Last Post: curlymo
  Issue send actions over Socket API in AdHoc network ggtrts 10 670 03-13-2019, 06:32 AM
Last Post: curlymo
  Send pulsestream via API Phunkafizer 19 909 02-27-2019, 09:54 PM
Last Post: curlymo
  pilight-send and pilight-daemon DieterK 0 510 06-20-2018, 12:44 AM
Last Post: DieterK
  Service doesn´t stop the daemon Alex 18 3,980 08-08-2017, 08:17 PM
Last Post: curlymo
  Chasing a Bug in daemon.c curlymo 2 1,116 12-13-2016, 12:48 AM
Last Post: wo_rasp
  pilight-daemon client in other subnet PT-Biker 1 820 12-11-2016, 09:42 PM
Last Post: curlymo
  pilight-daemon fails to start 2 of 3 times tietze111 4 1,646 12-11-2016, 09:06 PM
Last Post: tietze111
  pilight-daemon answers json request with html page michib 5 2,793 04-22-2016, 10:25 PM
Last Post: curlymo
  Switching ceiling fan with pilight-send -p raw gadget 4 2,602 01-12-2016, 07:39 PM
Last Post: eunger

Forum Jump:


Browsing: 1 Guest(s)