Recommended strategy for non-exact sensor values over time.
There are several threads with a lot of ideas on solving the same core issue. Testing if a device value is in a range for a specified period of time.
Examples:
Temp over 70F for 30min
Power usage over 500W for 1 hour
Power usage greater than 0.1w and less than 10w for one min
Light sensor <1lum for over 2 min
What is the consensus on the best method for programing? Virtual devices? Global variable? Timer? Fully scripted? multi event? Special Plugin?
Needs to be:
Reliable- no runaways or missed polling
Clean - Easy to read and debug, not a big profile of interrelated one use files or events
Fast to build - have a template that can be reused to implement quickly
Maintainable - Easy to update may instances
Please give your opinions or links to your recommended best solution. (Or am I missing something obvious)
There are several threads with a lot of ideas on solving the same core issue. Testing if a device value is in a range for a specified period of time.
Examples:
Temp over 70F for 30min
Power usage over 500W for 1 hour
Power usage greater than 0.1w and less than 10w for one min
Light sensor <1lum for over 2 min
What is the consensus on the best method for programing? Virtual devices? Global variable? Timer? Fully scripted? multi event? Special Plugin?
Needs to be:
Reliable- no runaways or missed polling
Clean - Easy to read and debug, not a big profile of interrelated one use files or events
Fast to build - have a template that can be reused to implement quickly
Maintainable - Easy to update may instances
Please give your opinions or links to your recommended best solution. (Or am I missing something obvious)
Comment