Skip to content
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

Changing $homie value #212

Open
bggardner opened this issue Jul 22, 2020 · 1 comment
Open

Changing $homie value #212

bggardner opened this issue Jul 22, 2020 · 1 comment

Comments

@bggardner
Copy link

In 6d852df the convention was updated with:

The following MQTT topics must remain unchanged when a device is in ready, sleeping or alert state:

Any device attributes except $name and $state
The $properties attribute of any node
Any attribute of any property except $name

However, the convention also states:

Homie controllers must by default perform auto-discovery on the wildcard topic "+/+/$homie".

My first reaction would be to add $homie to the list of device attributes that cannot be changed when a device is in ready, sleeping, or alert state. However, I believe the intent is that publishing to $homie (regardless of $state) triggers a "re-discovery" since the protocol version may have changed. In any case, consider adding some clarification to the convention, either in both sections mentioned above, and/or something like:

Publishing to a device's $homie attribute will trigger a rediscovery by Homie controllers, so it is recommended that devices disconnect or enter the init state first.
@piegamesde
Copy link
Contributor

I think adding $homie to that list is fine. A change of the $homie value – thus, a protocol version change – is a form of re-configuration and should not be performed in any of the ready states.

However, I believe the intent is that publishing to $homie (regardless of $state) triggers a "re-discovery"

No, the $homie is there for auto-discovery. As far as I understand it, there is no such thing as "re-discovery". Controllers simply use this property to enumerate all Homie devices. They can then subscribe to the related properties (especially $state) if they are interested in updates to that device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants