• 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
REST API problem kaku_screen_old / elro_800_switch with pilight 8.1.4
#1
According to https://manual.pilight.org/development/rest/index.html I would like to switch my plugs via web interface with pilight 8.1.4.

When I run
Code:
http ://1.2.3.4:5001/send?protocol=kaku_screen_old&on=1&id=22&unit=5
(1.2.3.4 is my local RPi IP)
This returns json: message "failed"
From a local terminal on Raspberry: pilight-send -p kaku_screen_old -u 5 -i 22 -t (or -f) works fine!

I also tried elro_800_switch protocols with no luck:
Code:
Code:
http ://1:2:3:4:5001/send?protocol=elro_800_switch&on=1&id=544&unit=28



The example from the tutorial
Code:
http ://1:2:3:4:5001/send?protocol=kaku_switch&on=1&id=1&unit=1

does work however (This returns json: message "success").


It seems, the REST A may have problems with protocols elro_800_switch and kaku_screen_old.
Why that? The manual says "All protocols can be controlled using their respective arguments using the webserver send page as described in this example."
 
Reply
#2
Your id and units are out of range.
 
Reply
#3
(12-20-2018, 05:29 PM)curlymo Wrote: Your id and units are out of range.

What does 'out of range' mean? Commands are valid from command line. I can actually switch my plugs with that command!
 
Reply
#4
Sorry, my mistake.

For kaku_screen_old, you don't have a on / off, but an up / down.
https://manual.pilight.org/protocols/433...u_old.html

For elro_800_switch, it doesn't have a unit and id, but a unitcode and systemcode:
https://manual.pilight.org/protocols/433...o_300.html
 
Reply
#5
(12-20-2018, 07:02 PM)curlymo Wrote: Sorry, my mistake.

For kaku_screen_old, you don't have a on / off, but an up / down.
https://manual.pilight.org/protocols/433...u_old.html

For elro_800_switch, it doesn't have a unit and id, but a unitcode and systemcode:
https://manual.pilight.org/protocols/433...o_300.html

Perfect, easy as that!

This works:

Code:
http://1.2.3.4:5001/send?protocol=kaku_screen_old&state=down&id=22&unit=5
http://1.2.3.4:5001/send?protocol=elro_800_switch&state=on&systemcode=544&unitcode=28
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
Question Pi 3+ & pilight & 433Mhz RXB6: no receiption hacklschorsch 3 382 02-05-2019, 10:37 PM
Last Post: hacklschorsch
  Consecutive pilight commands habitoti 4 337 01-28-2019, 03:32 PM
Last Post: habitoti
  pilight not working with fresh Openhab 2 image habitoti 2 221 01-24-2019, 08:44 PM
Last Post: habitoti
  pilight v8.0 - Current work in progress curlymo 32 19,327 12-06-2018, 10:06 PM
Last Post: curlymo
  RPI3 b+ Raspbiam Stretch and pilight-7_oregon Tueftler1983 1 240 12-04-2018, 11:59 PM
Last Post: Tueftler1983
  pilight integration in ioBroker Trashware 2 1,185 11-29-2018, 09:14 PM
Last Post: bnk72
  Config migration from pilight 7 .0 to 8.1.3 "Rules" Nonaamee 4 495 11-17-2018, 08:35 PM
Last Post: Nonaamee
  pilight-daemon does not start since 8.1.3-21 robertkrause 1 418 11-05-2018, 07:01 PM
Last Post: robertkrause
Exclamation Brennenstuhl 433MHz RC C1 - pilight not work pitje87 0 379 10-31-2018, 12:38 PM
Last Post: pitje87
  new pilight versions needs new pakets JoeC. 10 2,945 10-16-2018, 05:31 PM
Last Post: Dimi66

Forum Jump:


Browsing: 1 Guest(s)