-
Notifications
You must be signed in to change notification settings - Fork 59
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
Extra device properties #17
Comments
There should be a standard for the device node :-) So, in Homie Convention there is an optional node (e.g. "$deviceinfo") with a standardized set of properties. The devicenode could be implemented as extra library for various platforms, e.g. Homie-esp8266-DeviceInfo, so everyone is free to decide whether to use it. |
I'm not following. Did I overlook something in the PR? |
I also don't get it 🤔 |
@bertmelis the PR currently in discussions does not define more detailed device properties. In your proposal you ask for properties like CPU load, battery state, free mem etc. Based on this I propose to define an optional "$deviceinfo" node, that is like a normal node, but with standardized properties, e.g.
Where CPUtemperature is a standardized property, so there is no need to send all the unit info etc. |
May I ask what we would need this for? The Homie convention as an MQTT convention is here to support auto discovery of devices and applications on an MQTT broker through a standardized way of announcing and publishing data and actions of that entity. Data like the CPU temperature is exactly that, data. It can be published by defining a node (e.g. CPU) and a property (e.g. temperature). No need for special attendance. Am I correct? @marvinroger would you agree with that definition? Maybe defining a proper use case for Homie would also help in finalizing #27 I did btw also not get your initial request @bertmelis, did you talk about something like standardized nodes, e.g. similarly to http://www.eclipse.org/smarthome/documentation/development/bindings/thing-definition.html#channel-categories ?? |
Well, the Homie convention now gives a number of stats ($stats/uptime, signal, interval) which are also merely data. Signal is even optional. They are all device and configuration specific and do not relate to the thing being automated but to the device doing the automation. The paragraph says device attributes MUST the one of the listed. So I was thinking about making the list less strict and give some space to the $stats/# branch. |
@ThomDietrich I like your definition of the Homie convention. But @bertmelis remark is right, the convention already allows to embed things like IP, mac address, signal, etc, metadata, to name it. Thinking about it, there's one thing, though: MQTT works over TCP/IP. Each network interface will have at least two things: an IP and a MAC address. And each device will also have an uptime, anyway. The So I would remove the |
Sounds good. We could also make the signal property optional. No need to move it!? Do you feel that something being required is that important? The controller can react on a non-published retained topic just the same as on a published one. If there is no |
Having all attributes required makes it easy to determine when a device is fully discovered. Imagine you store the data received in a database. If we "CREATE" a device in DB with all required attributes and you receive an optional attribute after, we would "UPDATE" to add the optional property in the DB. Whereas, based on the "$implementation" topic, you can determine that if the implementation is for example "esp8266", you know that the device is not fully discovered if you didn't receive an "$implementation/wifisignal" value. |
I don't see the issue. In fact I feel this step to be one in the wrong direction. All discoverable data is available as retained messages. These are sent over by the broker upon subscription or published and sent by the device upon connection. Either way these topics will be available momentarily as the controller initiates and processes the auto discovery, attributes will not change after the device reached its See it from another angle: A developer building a Homie compatible application or device doesn't want to implement all the for him unimportant aspects of the convention. (Example) He also doesn't want to add new attributes as they get added to the convention. |
I prefer to have optional properties in the Regarding This is something already implicitly required by the revision of Homie 2.0: Description of
|
Possible definiton of optional
|
Alright, I am convinced! Let's add some optional |
Do we close this issue? |
Thanks! From my point of view, issue can be closed. ✨ |
Feel free to reopen if needed! |
The convention now states a limited list of device properties.
I would however want to add a few more: a device could have a battery level, cpu load, free memory, temperature,...
For not to break the convention, I now create a "device-node" with the node properties as above, which I find not entirely correct.
(It is working however, so if the community -and off course you Marvin- doesn't agree with me, I'll stick to my current solution.)
The text was updated successfully, but these errors were encountered: