Hi,
i want to use the Value form ESPDevice1 in a rule on ESPDevice2.
I set it up and it is working.
But one problem is left, how can i check with a rule in the ESPDevice2, if the ESPDevice1 are still online?
Because without this check, i can't be sure if the value i get from ESPDevice1 is an actuelle value.
Maybe someone can help.
Rules Global Sync
Moderators: grovkillen, Stuntteam, TD-er
Re: Rules Global Sync
When data from a remote ESP is received, it will also create an event for the rules engine. I think you could start a timer, set to a value larger than the send frequency of the remote ESP. This timer will be restarted each time the event is received. So normally, it should never reach 0 and fire.
If the timer finished, it means that it was not reset within the specified time window. Meaning that the remote ESP likely had an issue..
Sample that you could try out:
ESP1 has an analog sensor with global sync, taskname "Analog" taskvaluename "Analog".
ESP1 sends data every 5 seconds.
ESP2 receives this through globalsync
Rule on ESP2:
But then the next challenge: What to do when this situation occurs...
If the timer finished, it means that it was not reset within the specified time window. Meaning that the remote ESP likely had an issue..
Sample that you could try out:
ESP1 has an analog sensor with global sync, taskname "Analog" taskvaluename "Analog".
ESP1 sends data every 5 seconds.
ESP2 receives this through globalsync
Rule on ESP2:
Code: Select all
on Analog#Analog do
timerSet 1,10 // (re)start timer for 10 seconds
endon
on Rules#Timer=1 do
help // something wrong, of course the 'help' command is fictitious
endon
Re: Rules Global Sync
Thank you.
It`s funny, yesterday when i was on the way home, i also thought about a timer rule on message receive.
I will try if it works.
For me it is clear what to do. If timer is 1 the relay which switch on something is not allowed to switch on.
It`s funny, yesterday when i was on the way home, i also thought about a timer rule on message receive.
I will try if it works.
For me it is clear what to do. If timer is 1 the relay which switch on something is not allowed to switch on.
Re: Rules Global Sync
It works.
If the timer is 1 i switch of a relay and switch on a status LED.
Thanks
If the timer is 1 i switch of a relay and switch on a status LED.
Thanks
Who is online
Users browsing this forum: No registered users and 10 guests