Control relay with physical locally button

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
QcVictor
Normal user
Posts: 46
Joined: 23 Feb 2016, 00:47

Re: Control relay with physical locally button

#11 Post by QcVictor » 17 Nov 2017, 23:38

I have a strange character after "command" in the log and of course doesn't work

Code: Select all

15878769 : ACT : gpio,15,1
15878771 : SW : GPIO 15 Set to 1
15878776 : ACT : SendToHTTP 10.0.0.18:8080/json.htm?type=command¶m=udevice&idx=55&nvalue=0

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: Control relay with physical locally button

#12 Post by budman1758 » 18 Nov 2017, 01:14

Try this as your sendto.....

SendToHTTP 10.0.0.18,8080,/json.htm?type=command¶m=udevice&idx=55&nvalue=0
"The glass is twice as big as it needs to be".

QcVictor
Normal user
Posts: 46
Joined: 23 Feb 2016, 00:47

Re: Control relay with physical locally button

#13 Post by QcVictor » 18 Nov 2017, 01:25

found in the wiki rules turnaround where is said to use this syntax

Code: Select all

 SendToHTTP 10.0.0.0,8080,/json.htm?type=param=switchlight&command&idx=55&switchcmd=On
I tried but nothing update in domoticz and
unfortunately I just want update the status not toggle the switch

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Control relay with physical locally button

#14 Post by enesbcs » 18 Nov 2017, 07:28

QcVictor wrote: 18 Nov 2017, 01:25 unfortunately I just want update the status not toggle the switch
I do not think that you can update switch status without actually switching it...
Perhaps you can use Selector switch in domoticz, with different actions at different levels, or you can update a User variable, that you can manage in the Domoticz side in LUA.
In LUA then you can use "UpdateDevice".

QcVictor
Normal user
Posts: 46
Joined: 23 Feb 2016, 00:47

Re: Control relay with physical locally button

#15 Post by QcVictor » 18 Nov 2017, 14:35

yeah, got it working just use this syntax and all good

Code: Select all

SendToHTTP 10.0.0.18,8080,/json.htm?param=udevice&type=command&idx=55&nvalue=1

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: Control relay with physical locally button

#16 Post by kimot » 21 Nov 2017, 23:44

Put it next line after you change gpio status.
But I use different command:

Code: Select all

SendToHTTP 192.168.1.253,8080,/json.htm?type=command&param=switchlight&idx=26&switchcmd=On
You mus send command for report "off" status too

Code: Select all

SendToHTTP 192.168.1.253,8080,/json.htm?type=command&param=switchlight&idx=26&switchcmd=Off

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests