• 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
Switch device with http request

is there any way to send a http request to the pilight webserver, to switch a device?

For example: ""

Yes, check the API page.
I already read this before but it don't understand, what i have to send.




Thanks! No i can switch my lights with the pebble.

The hyperlink to switch is:

Yes, just URL-encode all the characters of the code.
I am also having trouble with my HTTP send requests now that I am on nightlies (was fine on V5 but now I am on V7.0). The webserver GUI works a treat but I am going to use my phone and mobotix IP cameras to trigger events using HTTP requests.

My device code from config.json:

"studyfloorlamp": {
    "protocol": [ "kambrook" ],
    "id": [{
        "id": 12058,
        "unit": 2
    "state": "off"

the URL I am sending to:


the message decoded:

    "action": "control",
    "code": {
        "device": "studyfloorlamp",
        "state": "on"

all i get as a response now is


Can somebody point me in the right direction please?
I would advice you to use the new API present in the latest nightly.:
Is this also possible from outside your own network ( so with login credentials)?
I'm not sure about login credentials, but if you configure port-forwarding on your router for the pilight daemon, you should be able to access it remotely. But it's kind of insecure, anyone can control your pilight devices then (if they know your IP and pilight port...)

Possibly Related Threads...
Thread Author Replies Views Last Post
  [SOLVED] Home Assistant switch gpio segalion 5 817 09-10-2018, 12:39 PM
Last Post: segalion
  pilight 8.1 and switch with date and time not working Pikeman 7 991 06-30-2018, 11:28 PM
Last Post: curlymo
  pilight-send for like rc-switch "send" mindau 1 1,467 01-18-2018, 07:46 AM
Last Post: madmoses
  Windows HTTP connection andbehtls 1 1,090 01-14-2018, 02:24 PM
Last Post: bnk72
  [Fully Supported] Conrad RSL Switch Hexcode 137 45,881 12-02-2017, 08:48 AM
Last Post: Micha_123
Smile config, device uuid <-> id Twain 2 1,206 06-22-2017, 05:49 PM
Last Post: Twain
  rev switch: maybe mismatch in sending on and off codes picrafter 2 1,582 04-15-2017, 02:49 PM
Last Post: redraid
  Problem with a Switch rule viper2035 2 1,311 01-12-2017, 04:33 PM
Last Post: viper2035
  Light Switch with integrated ON/OFF Button ilir@ademi.org 4 1,931 01-04-2017, 09:22 PM
Last Post: ilir@ademi.org
  All remotes should switch via pilight Laret 2 1,515 12-07-2016, 08:36 PM
Last Post: Laret

Forum Jump:

Browsing: 1 Guest(s)