• 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
  [Fixed] RaspberryPi4 pilight 8.1.5 - Send isn't working DominikB1993 4 39 Yesterday, 10:25 PM
Last Post: DominikB1993
  Real 433Mhz Remote is disturbed by pilight service henne111 2 156 10-06-2019, 06:18 PM
Last Post: wo_rasp
Tongue (solved) pilight 8.1.5-1-gc0a175e0 Chrashes fleisch 5 577 10-03-2019, 01:15 PM
Last Post: fleisch
  Starting pilight on boot: "cannot bind to the SSDP multicast network" pilino1234 4 343 09-29-2019, 02:08 PM
Last Post: tomk
  pilight for Raspbian Buster (raspberry pi 4) ? starob 29 2,438 07-15-2019, 08:45 PM
Last Post: curlymo
  pilight-receive Filteroption not working Alex 2 568 07-14-2019, 08:35 AM
Last Post: Alex
  pilight usb nano format conversion ettman8 2 452 07-14-2019, 08:32 AM
Last Post: curlymo
  pilight 8.1.4 crashes after some hours Ulrich.Arnold 47 2,685 06-29-2019, 08:58 PM
Last Post: curlymo
  Raspberry PI, gpio-ir-tx and pilight not starting lordslash 5 862 06-11-2019, 05:19 PM
Last Post: curlymo
  pilight fails starting on boot Alex 5 751 06-09-2019, 06:02 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)