Hi all
I have connected a ESP8266-01 to PCF8574 in order to control four relays and using two input for getting the status from my GaragePort. All is working, but the status of the two inputs is being sent to my Domoticz server every 30 sec via rules:
n GaragePortStatusClose#Switch=0.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=74&switchcmd=On
endon
on GaragePortStatusClose#Switch=1.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=74&switchcmd=Off
endon
on GaragePortStatusOpen#Switch=0.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=73&switchcmd=On
endon
on GaragePortStatusOpen#Switch=1.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=73&switchcmd=Off
endon
Note that active is 0.00 on and off is 1.00
I'll like to have a system, where the changes is sent when there is a change in input, and not every 30 sec. It's messing up my log on Domoticz.
Can someone give a hint on how to get the correct rules to solve my issue?
I'm using ESPMega v. mega-20181001
Big thanks in advance
Lars
Help with Rules
Moderators: grovkillen, Stuntteam, TD-er
Re: Help with Rules
I am joining the thread, want to check replies
Re: Help with Rules
I am not really sure, but I think these rules can be half in size, since you can 'translate' the values into some other strings like "on/off" and also invert.
The format is
Could possibly be changed into:
I have not tested it, just based on the sourcecode in Misc.ino.
"!" is invert
"O" is translate it into "On/Off"
I think if you send the values to a dummy variable first, that one will check for changes and only trigger an action on changes.
Maybe @Grovkillen also has some ideas on this one?
The format is
Code: Select all
[task#value#transformation#justification]
Code: Select all
on GaragePortStatusClose#Switch=1.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=74&switchcmd=Off
endon
Code: Select all
on GaragePortStatusClose#Switch do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=74&switchcmd=[GaragePortStatusClose#Switch#!O]
endon
"!" is invert
"O" is translate it into "On/Off"
I think if you send the values to a dummy variable first, that one will check for changes and only trigger an action on changes.
Maybe @Grovkillen also has some ideas on this one?
Re: Help with Rules
lars@baekmark.dk wrote: ↑02 Oct 2018, 10:14 Hi all
I have connected a ESP8266-01 to PCF8574 in order to control four relays and using two input for getting the status from my GaragePort. All is working, but the status of the two inputs is being sent to my Domoticz server every 30 sec via rules:
n GaragePortStatusClose#Switch=0.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=74&switchcmd=On
endon
on GaragePortStatusClose#Switch=1.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=74&switchcmd=Off
endon
on GaragePortStatusOpen#Switch=0.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=73&switchcmd=On
endon
on GaragePortStatusOpen#Switch=1.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=73&switchcmd=Off
endon
Note that active is 0.00 on and off is 1.00
I'll like to have a system, where the changes is sent when there is a change in input, and not every 30 sec. It's messing up my log on Domoticz.
Can someone give a hint on how to get the correct rules to solve my issue?
I'm using ESPMega v. mega-20181001
Big thanks in advance
Lars
If I understand you right, you would just need to setup your domoticz as controller, set the delay of the input switch devices to 0, enable "send Data". Then you would get messages on change only.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
-
- New user
- Posts: 3
- Joined: 29 May 2017, 13:53
Re: Help with Rules
Hi toffel969toffel969 wrote: ↑02 Oct 2018, 14:37lars@baekmark.dk wrote: ↑02 Oct 2018, 10:14 Hi all
I have connected a ESP8266-01 to PCF8574 in order to control four relays and using two input for getting the status from my GaragePort. All is working, but the status of the two inputs is being sent to my Domoticz server every 30 sec via rules:
n GaragePortStatusClose#Switch=0.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=74&switchcmd=On
endon
on GaragePortStatusClose#Switch=1.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=74&switchcmd=Off
endon
on GaragePortStatusOpen#Switch=0.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=73&switchcmd=On
endon
on GaragePortStatusOpen#Switch=1.00 do
SendToHTTP 192.168.6.44,8080,/json.htm?type=command¶m=switchlight&idx=73&switchcmd=Off
endon
Note that active is 0.00 on and off is 1.00
I'll like to have a system, where the changes is sent when there is a change in input, and not every 30 sec. It's messing up my log on Domoticz.
Can someone give a hint on how to get the correct rules to solve my issue?
I'm using ESPMega v. mega-20181001
Big thanks in advance
Lars
If I understand you right, you would just need to setup your domoticz as controller, set the delay of the input switch devices to 0, enable "send Data". Then you would get messages on change only.
that did it!!! No rules, and your suggestions, it just works!
Big thanks from rainy/windy/cold Denmark
/Lars
Who is online
Users browsing this forum: No registered users and 1 guest