Hi,
Whan I type in a browces command:
http://192.168.1.5:8080/json.htm?type=c ... itchcmd=On
I got response:
{
"status" : "OK",
"title" : "SwitchLight"
}
However, it doesn't change the state of the switch in Domoticz. What I do wrong?
Thanks.
JSON commands
Moderator: leecollings
-
- Posts: 20
- Joined: Tuesday 28 August 2018 21:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
JSON commands
Domoticz Version: 4.9895 running on Raspberry Pi B 3+ (Raspbian). PCF8574 as input and output.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: JSON commands
You should use a code block, now the url is showed shortened.
-
- Posts: 20
- Joined: Tuesday 28 August 2018 21:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: JSON commands
Code: Select all
http://192.168.1.5:8080/json.htm?type=command¶m=switchlight&idx=2&switchcmd=On
Domoticz Version: 4.9895 running on Raspberry Pi B 3+ (Raspbian). PCF8574 as input and output.
- philchillbill
- Posts: 399
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: JSON commands
Your syntax looks correct. Are you sure your idx is relevant?
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 20
- Joined: Tuesday 28 August 2018 21:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: JSON commands
Thanks! Originally I took IDX from Setup / hardware, when I looked at Setup / devices I found out that my device has different IDX there. After changing JSON command works fine!
BTW It's confusing that device has different IDX than hardware connected with this device.
BTW It's confusing that device has different IDX than hardware connected with this device.
Domoticz Version: 4.9895 running on Raspberry Pi B 3+ (Raspbian). PCF8574 as input and output.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest