How send switchcmd=On to Domoticz?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ekrzychoooo
New user
Posts: 4
Joined: 24 Jan 2018, 00:26
Contact:

How send switchcmd=On to Domoticz?

#1 Post by ekrzychoooo » 24 Jan 2018, 00:37

I have rules:

Code: Select all

On sw0#Switch do
SendToHTTP 192.168.0.87,8080,/json.htm?type=command&param=switchlight&idx=22&switchcmd=On
endon
In Domoticz log:

Code: Select all

Admin initiated a switch command (22/GAZ/on)
It not working.

When I send from browser:

Code: Select all

http://192.168.0.87:8080/json.htm?type=command&param=switchlight&idx=22&switchcmd=On
In Domoticz log is:

Code: Select all

 User: Admin initiated a switch command (22/GAZ/On)
It work OK.

How send "On" not "on" from rules?

wim16
Normal user
Posts: 88
Joined: 01 May 2017, 20:35

Re: How send switchcmd=On to Domoticz?

#2 Post by wim16 » 24 Jan 2018, 09:50

It can be done the way you did (and I think it actually does because you write it is in the Domoticz log).
But why not us a Domoticz HTTP (or MQTT) controller to do it for you? Than you do not need the rule.


Edit: I see I did not read well. Your problem is about the 'On'. Still, using a controller will fix that.


Edit2: I just tested (using v2.0-20180124) and it does send exactly the string I entered, no change in capitals or whatever.

Code: Select all

ACT  : SendToHTTP 192.168.178.230,8080,/json.htm?type=command&param=switchlight&idx=71&switchcmd=On

Code: Select all

2018-01-24 10:13:57.536 User: Admin initiated a switch command (71/Test/On)

ekrzychoooo
New user
Posts: 4
Joined: 24 Jan 2018, 00:26
Contact:

Re: How send switchcmd=On to Domoticz?

#3 Post by ekrzychoooo » 24 Jan 2018, 14:48

When I flashing this version : ESP_Easy_v2.0-20180124_normal_ESP8266_1024.bin work OK
When I flashing this version : ESP_Easy_v2.0-20180124_test_ESP8266_1024.bin Does not work properly. Sends "on" instead "On"
Ineed test version because I use a buzzer.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests