• 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 API webserver send page

I have setup pilight stable 6.0, and added some elro_800_switches succesfully. I can manage them with my remote, webpage. But now i want to switch them using de web send page.

I followed the instructions from http://www.pilight.org/development/api/#webserver, and i get a {"message":"success"} back, but the light doesn't switch.

The url i send is: send?%7B%0A%09%22action%22%3A%20%22send%22%2C%0A%09%22code%22%3A%20%7B%0A%09%09%22device%22%3A%20%22Lampbijdekeuken%22%2C%0A%09%09%22state%22%3A%20%22on%22%09%7D%0A%7D, translated:
    "action": "send",
    "code": {
        "device": "Lampbijdekeuken",
        "state": "on"    }
I also tried "action": "control" as stated in http://forum.pilight.org/Thread-Big-conf...ite?page=3, but that doesn't resolve my issue.

Anybody know's what i'm supposed to drop here? The docs seems a but unclear to me..
You indeed need to use action control. This worked here:

Ofc, urlencoded.
Thanks for your quick response. Finally i found it: I had to remove all space's and tabs inside the message.. So it's working now!

my send message:
translated as
is working now!

You also need to put "send?" before the code, and do not 'encode' the question mark! Thats not working. Smile

ps: handy translator here: http://meyerweb.com/eric/tools/dencoder/
Hey, I have a similar issue here with a "generic_label". Target is, using curl from other Pi send free disk space to pilight.

Label settings (without overhead):
"gen-lbl-satahdd-diskspace": {
                        "protocol": [ "generic_label" ],
                        "id": [{
                                "id": 202
                        "label": "(none)",
                        "color": "black"
Calling URL (encoded):
URL (decoded):
Also tried this without any changes:
I then get a following message:
.. but nothing happens. Tailing /var/log/pilight.log gives this:
[ May 28 09:31:15:31498] pilight-daemon: ERROR: generic_label: insufficient number of arguments

What am I missing?
Thanks, working like a charm. I doubt I would have looked into that one topic though..
BTW, you have used my naming scheme there.. I'm impressed.. Big Grin

Possibly Related Threads...
Thread Author Replies Views Last Post
  Can't send or receive on Raspberry Pi Zero W ChristophH 12 440 04-09-2020, 06:34 PM
Last Post: curlymo
  pilight-send seems successful but doesn't actually send RF signal ayeyebrazov 37 1,962 03-31-2020, 01:02 PM
Last Post: curlymo
  NOTICE: 433gpio send buffer full HuberDe 3 426 10-31-2019, 12:10 PM
Last Post: curlymo
  [Fixed] RaspberryPi4 pilight 8.1.5 - Send isn't working DominikB1993 4 863 10-18-2019, 10:25 PM
Last Post: DominikB1993
  [Already fixed in 8.1.2] Loss of webserver-connection Ulrich.Arnold 34 4,775 08-02-2019, 02:25 PM
Last Post: curlymo
  pilight-send does not stop (terminate) va13 3 962 05-15-2019, 06:06 PM
Last Post: curlymo
  RSL366 receive fine, can't send? pukington 2 877 02-15-2018, 11:04 AM
Last Post: pukington
  pilight-send for like rc-switch "send" mindau 1 1,758 01-18-2018, 07:46 AM
Last Post: madmoses
  send-repeats and elro_800_switch Tiberian 2 1,413 11-04-2017, 06:24 PM
Last Post: Tiberian
  Webserver (REST API) - POST TopdRob 7 2,224 10-25-2017, 11:17 PM
Last Post: curlymo

Forum Jump:

Browsing: 1 Guest(s)