homieiot / convention

🏡 The Homie Convention: a lightweight MQTT convention for the IoT
https://homieiot.github.io/
Other
716 stars 61 forks source link

Device version in a separate topic? #309

Open nstadigs opened 4 days ago

nstadigs commented 4 days ago

Like homie/5/my-device/$version

This way a stateful client won't have to subscribe to the $description topic and parse the payload as long as the version is the same. The description payload is probably the largest one so this way we can probably save some bandwidth and startup time, no? This adds some complexity, but this doesn't have to be enforced. Clients could just subscribe to the $description topic directly if they want (like stateless clients).

Another upside of this is that keeping the version out of the description makes using hashes for versions more viable.

What do you think?

Tieske commented 4 days ago

I think that's overkill, the Homie5 thing started with the need to reduce topics. If anything, a device shouldn't be re-publishing its description if it didn't change.