-
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
Classify required attributes as optional (or recommended) #45
Comments
@ThomDietrich I think everything else is done in the Latest issue before v2.1.0 tagging/release. 🤞 |
I'd have to review #48 once more but I'd say we should this discuss over there. |
Yeah, if there are things not required sure, haven't thought about what those are, but homie is trying to allow for autodiscovery of a device, so if we can uphold that purpose with less required topics without compromising on features, sure. I'll have a look into this when I have a sec, sorry I lack time ATM. |
I'd like to share what my personal implementation uses, which I hope to release soon. I've had to omit some fields for data transfer usage, since this project is meant to run over 2G / satellite links (2kbps).
This is the most essential implementation I've could come to, which is still usable. |
I totally understand the frustration of it being so heavy when it's supposed to be lightweight. I'd slim down the required attributes to this: Device attributes
Node attributes
Property attributes
It would definitely simplify the creation of a minimal Homie client. Any comments? |
Looks good. In #86 we already agreed that a property |
I can't find anything about the I don't agree with an optional |
Sorry, wrong issue. The important detail I wanted to mention is that it is already defined as "not mandatory, false by default". https://github.com/homieiot/convention#property-attributes Regarding the second part of your message: Isn't one general idea to expect only the sum of announcement messages as the base for discovery? See "ready" here: https://github.com/homieiot/convention#device-behavior |
Found the relevant thread: #24 (comment) |
Oh, right. If it already is, we won't break that. There's a problem: the MQTT PUBLISH might come out of order. So the But what if there's latency and we receive the message a second later? For a |
Sounds like two issue there ^, should we break this up into another issue related to the timeout issue? Don't think that is directly related to what properties are required? Also IMHO $type for a is required for discovery. This prop defines how you interpret the node for discovery... |
It should, indeed. Why is |
True about props being self discovered, but how would you know how to interprate them?
With out Edit: Also if you guys have time maybe also look at #75 (comment) |
I have created a PR for this: #120. According to semver this will bring us to Homie 4.0 unfortunately, but it really has to be done at some point. |
Done |
Some of the mandatory attributes are device specific / implementation specific. Some are not required for the working of the Homie Convention.
I would like to update some of the attributes mandatory flag. This will allow for an slimmer Homie Convention.
$name => Optional, Device ID may be used when no name is given.
$localip => Optional, Device specific. (not all devices have a IP)
$mac => Optional, Device specific. (not all devices have a MAC address)
$stats/uptime => Optional. (is this required for sensor valid time?)
$stats/signal => Optional. Is already defined as optional.
$stats/interval => Optional. Not required for the correct operation.
$fw/name => Optional. Implementation specific.
$fw/version => Optional. Implementation specific.
$fw/checksum => Optional. Is already defined as optional.
$implementation => Optional. It should be adequate to use $homie attribute.
A simple table may be used for showing what is required for given features.
I do not know the inner workings of the Homie Convention, but my general ide is that there are to many mandatory attributes that do not need to be mandatory.
The text was updated successfully, but these errors were encountered: