• 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
  pilight-send seems successful but doesn't actually send RF signal ayeyebrazov 37 1,392 03-31-2020, 01:02 PM
Last Post: curlymo
  pilight 8.1.5 not working on Raspberry pi after reboot beejayf 4 244 03-08-2020, 12:14 AM
Last Post: beejayf
  pilight cpu usage possibly associated with noticeable sluggishness? hepcat72 4 306 01-28-2020, 08:02 PM
Last Post: hepcat72
  apt.pilight.org stable Release' is not signed. thomasol 2 355 01-23-2020, 11:34 PM
Last Post: thomasol
  pilight and SIGNALduino cc1101 Caleus 0 260 01-19-2020, 09:13 AM
Last Post: Caleus
  filter stopped working after update to pilight 8.1.5 zlin50 19 955 01-03-2020, 02:15 PM
Last Post: curlymo
Question [Solved] Openweathermap with pilight 7.0-40 doesn't work Seebueb 2 298 01-01-2020, 06:45 PM
Last Post: Seebueb
  [Solved] Strange receive problem with 433Mhz Receiver and pilight 8.1.5 vanillaice30 15 1,085 12-18-2019, 11:09 AM
Last Post: vanillaice30
  pilight error after update to 8.1.5 on Odroid C2 WitchDoctor 3 542 11-29-2019, 09:56 PM
Last Post: curlymo
  pilight crashing randomly PatiB 7 811 11-16-2019, 10:50 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)