homieiot / convention

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

Impossible to define empty array #154

Closed jpink closed 5 years ago

jpink commented 5 years ago

Hi,

how can I define empty array or nodes? For example i have a PC (device) with zero, one or more serial ports (nodes) available at runtime. How should i define my nodes? Should I disconnect, recreate and reconnect the device every time when any of these serial connections are made or released/disconnected (closed from host).

I assume that $array → "0-0" contains only single element?

davidgraeff commented 5 years ago

You are not even forced to use arrays. Although you have same-like nodes or properties, but you can also just expose one/two/three nodes or properties. And the $nodes and $properties attribute support the empty string.

Especially if you consider that Homie 4.0 has no "arrays" anymore because of many shortcomings.

peterhoeg commented 5 years ago

With no arrays in 4.0, we can close this, no?

davidgraeff commented 5 years ago

True