Hi @rigpapa. Back in Dec you helped me in determining when a device has not updated within a certain amount of time. Device not updating. Possible use case - #11 by 3rdStng - Reactor - Ezlo Community
Well, it took until now for that device to finally kick itself offline and stop updating. I’ve attached a couple of screenshots of the current setup, as well as the Logic Summary. Could I get some assistance in the expression setup? Ultimately my goal is that if my Netatmo last update status is the same for 30 minutes, then turn off/on my plug which will power cycle the Netatmo. As you can see in the screenshot, the last update was “Fri 19:51”. I took the screenshot Saturday afternoon. However the currval and lastval never changed and didn’t trip the Reactor value to be True.
Is a 3rd value variable needed? CurrVal, PrevVal, PrevPriorVal. Then if PriorPrevVal == PrevVal, power cycle Netatmo? Or is that an easier way now with Reactor 3.5? All this was previously setup using 3.4. Logic_Summary.pdf
Just use the new
getstatetime() function that was added to 3.5. Same parameters as the
getstate() you are currently using, except instead of returning the variable value, it will return the timestamp of when the variable was last changed (so it gives you
lastchanged in one step basically:
getstatetime( 52, "urn:akbooer-com:serviceId:Netatmo1", "Timestamp" )
time() - lastchanged
Another thing you could do is use no expressions at all, but rather use a Device State condition on the station’s
Timestamp variable, operator changes, and under the Condition Options, in “Follow” output mode set the reset delay to 1800 or whatever your tolerance is. If that condition ever goes false, it means the value did not update/change and allowed the timer to expire. If you want a true output for that expiration, just wrap the condition in a group with a NOT AND operator–if the condition goes false, the group will go true, and the rest is up to you.
Thank you! Using the getstatetime variable didn’t seem to work too well, if at all. I honestly didn’t spend too much time on it because the values would always be matching. The idea of using the temperature changes works perfectly. And trips the reactor sensor too. I ultimately set my Output Control to 2 1/2 hours (9000 seconds.) After looking at my Netatmo history there were a few mornings where the temperature inside was the same for about 2 hours. Having my Netatmo automatically power cycle after 2 1/2 hours is WAY better than a manual power cycle days later when I notice that it hasn’t updated.
Thank you again for the help rigpapa.