- 
                Notifications
    You must be signed in to change notification settings 
- Fork 62
Description
I question the necessity of the sleeping and alert states, and propose removing them.
From the rationale for sleeping from #24 , I understand it may be appropriate for a device to only connect to a broker as needed to save power, resources, etc.  However, subscribers to $state will not be able to determine if/when a device should be considered lost (in case something goes bad while sleeping).  It seems this would need a timeout to implement properly.  Therefore, either a sleeping $timeout attribute is needed, or remove sleeping and require devices to maintain connection to the broker at all times.  Am I misunderstanding the relationship between a homie device and a MQTT broker?
My issue with alert is that devices can have many properties, and possibly only one property may be unavailable.  Subscribers to a working property do not care about non-working properties, so setting an alert at the device level seems improper.  Therefore, use $state on properties as well, or remove the alert state.  Also, simply having an alert state isn't very useful by itself.  The addition of an $alerts attribute would allow the device to communicate what the alert is about (or simply publish to this when there is an alert instead of changing its state).
I am relatively new to homie, but see its potential. My use cases and implementations may be biasing my thoughts in a direction homie was not intended for, so I would appreciate feedback regarding this issue.