homieiot / convention

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

feat(property): add an optional $target property #263

Closed Tieske closed 1 year ago

Tieske commented 1 year ago

in case a property change is not instantaneous

schaze commented 1 year ago

I know we already talked about this and I also understand the physical behavior this wants to address. But thinking about it now I really fail to find any actual use-case where the $target property would be of any significance. With the current and the proposed spec a device has three options for their state update in the brightness example in the commit:

  1. emit 100 as new value directly even though the 100 brightness will only be achieved 5 seconds later
  2. emit any intermediate value state every second (or any other arbitrary fixed or random interval step) until 100 is reached
  3. emit nothing for 5 seconds and then update the value to 100

For every option a $target property could be optionally published as a first step. But if we would publish a $target property what could any other device or controller do with this information? What scenario would there be where I would need the $target value field?

Tieske commented 1 year ago

It's about 2 things;

Some examples for the latter (the light is probably not the best one);

Same thing for a screen/blind, change is not instantaneous.

Very typical example; Spotify app, controlling a Sonos speaker