whaleygeek / pyenergenie

A python interface to the Energenie line of products
MIT License
82 stars 51 forks source link

Expected next receipt time #67

Open whaleygeek opened 8 years ago

whaleygeek commented 8 years ago

Split out from #63

It would be useful to estimate the next receipt time of a regularly reporting device. If in the device class a MIHO005 is known to report every 10 seconds, then consulting the last received time could estimate the next receive time, with reference to the current time - so, if the last message was received at 09:00:00 and two messages were missed and it is now 09:00:25, the next receipt time would be estimated as 09:00:30.

This would be useful for assisting the proposed message scheduler in learning the report patterns of reporting devices, in order to schedule transmits into a safe timeslot that won't collide with them.