-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device states sleeping and alert unnecessary? #210
Comments
I don't think this assumption holds true in a significant amount of cases. Therefore distinguishing between working and broken properties seems overkill to me. Marking single nodes as broken or not is something worth discussing, but I don't think it's a good idea. The I think providing an error message to the user (via mqtt) is a good idea. But is there anything against simply implementing this through a property instead of an attribute? |
Good points. The error message could be a property, but on which node? It seems if The other reason I don't like using I'm being picky here, but thought it was worth some discussion, so thanks for replying. |
I agree that the
|
Very good points (again). To reiterate:
In this case, the word The previous definition of |
I agree that the current definition of "alert" is a bit off, as a controller doesn't know if it should treat data from the device as valid or not. Instead of the redefinition of alert above, what about a disconnect reason attribute? This could be ignored by controllers, in general, but could be utilized by monitoring tools. As far as moving some sort of concept of alerts down to the node, that could be done, although devices already have the option of simply dropping problem nodes from their configuration. I think I see the most value from dropping alert as a state, and adding an additional device property of "alert" or something like that. I wouldn't attempt to codify this in any way. It would just be a string that when set would indicate a problem with the device. It would be up to the device to decide what information to present. Controllers would ignore it. Monitoring tools would present it to a user by whatever means is appropriate. |
I question the necessity of the
sleeping
andalert
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 consideredlost
(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 removesleeping
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 analert
at the device level seems improper. Therefore, use$state
on properties as well, or remove thealert
state. Also, simply having analert
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.
The text was updated successfully, but these errors were encountered: