-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add more hardware information to simplify OTA #83
Comments
I'm doing it like this:
I think the only thing we don't have in common is the eeprom-size, but you can add it as an $implementation. |
From #76:
|
I noticed, that a lot of the homie mqtt topics are marked as required. Very rarely an "optional" topic is specified and there is absolutely nothing like a "recommended" topic name. If you look at the OMA LwM2M convention on top of CoAP: They introduced a registry for all kind of objects (which maps to MQTT topics), from Switches, dimmable Lights, to Gyrometers. I would suggest to just recommend some topics like
and give example values as well. That way a third party OTA updater for instance can easily say: We support OTA updates for Homie 3.x devices that follow the $system recommendations. |
the thing is that not specifying a "recommended" way of doing this has this risk: everyone implement the same stuff using topic with different names so the solutions even if they could be compatible are not. Example: I would have called the topic instead of $system for example $hw another guy could use $espdata and we are back in the jungle of incompatible devices. Instead if one standard suggest names (and make it optional see #86) my implementation and @davidgraeff would be the same so if I get his firmware or his board I can get hardware information in a common way. |
as commented by @davidgraeff I suggest to insert a lot more topic and make them optional to suggest a possible implementation of a common problem. also another consideration: |
hardware and software. Basically everything you deem relevant |
But that's like a wildcard topic: do whatever you want. Why not leave it out of the specification then. Either it is typed and machine readable for something like ota or it should be a user defined normal topic, I guess. |
I have no stron opinion on the $implementation tree at the moment. However you guys were suggesting to define some optional topics here and I can see why this might be useful. One more thing to look out for: A Homie node implementation framework (like homie-esp8266) might limit a user in the possibilities to "user define normal topics"... Besides all of that you know that my opinion is to limit the convention to what is necessary for automatic discovery. |
Just think about openhab/esh. I guess other home automation systems (controllers in homie speak) do it similar. In ESH a thing does have a location. And it does support firmware updates. So you could argue that for IOT devices, OTA update availability and locations are part of the discovery process. |
I have to talk to Marvin about homie-esp8266. I think it should be more modular. One library for homie, one for homie-ota, one for bootstrapping a WiFi device. At the moment it is all in one. A homie library should not prevent a user from publishing and subscribing to custom mqtt topics. |
Yes, there already was the proposal to implement homie-esp8266 in a more modular way (e.g. there). Oh, and Homie-esp8266 can give you a reference to the AsyncMQTTClient instance, so any user can subscribe to other topics. Regarding location:
|
@davidgraeff, again, i dont think ESH should define Homie. Yes its great to get ideas from other place, but i dont think just because ESH has it home needs it. Homie is about core discovery through mqtt, if you want a to have something that is for ESH i recommend you fork this add on to this call it Homie for ESH. You can do the same for the esp8266 implementation. as @ThomDietrich said:
I worried about Homie getting bloated..... I think that the Hopefully soon we will have discover libs in many languages that allow devs to implement homie into any platform (EHS , Home Assistant ...) or their own services. This my hope for homie, and i keep this in perspective when participating in the homie convention, homie is for many platforms and implementations and should not show any bias to certain platforms. |
Timpur. Please do me the favour and read my full posts. I'm using ESH because I know it the best. It is just an example platform among other platforms. You seem to react allergic to every post where I mention ESH, so I leave that out from now on. That's fine. Back to the topic. Of course, capability discovery can be part of homie, as you pointed out it is about discovery. OTA updates should not be part of this spec, nobody actually requested it. You need a software version, free space info, some hardware info like the architecture and one or two more device states for OTA availability discovery. You might be confused because I mentioned modularity of esp8266-homie and the homie-ota part. That has nothing to do with the spec, it is about that specific implementation that supports OTA but mixed all that functionality into one lib. I would appreciate if the OTA part could be separated from the rest. We are on the same side :) |
@davidgraeff I can see that can out as really harsh, and sorry for that, just want to make sure that we keep things into perspective what homie is and isn't. The reason I worry is because in other post you have mentioned that you found boardcast messages 'useless' because you don't know what to do with them in ESH, doesn't mean they don't have a reason and place.
|
@davidgraeff I think it is very important that you continue thinking and discussing from the ESH angle. You are one of the first to develop the controller side of Homie and it is imho important to benefit from your experience there. Other than most you are probably the one focused the most on discoverability and after all, this is the most important goal of Homie. I can agree with @timpur that you should be careful to judge only based on ESH principles. On the other hand I feel like orienting design decisions based on experience-based decisions in ESH will not hurt. |
@ThomDietrich totally behind that :) Though i also have implemented a discovery implementation for Home Assistant (still a work in progress V2.0.1) :( |
I know, I know. "One of the first" was not supposed to exclude you :) |
one question: here it says
|
Hopefully $fw disappears completely from the convention to be honest. It's not enough information to do anything useful with it. |
I think $fw has its use. Allows for tracking of firmware name and version. Though this is way more useful with OTA, some platforms might not have OTA and this is a greater way of tracking manually... http://marvinroger.github.io/homie-esp8266/docs/develop/others/ota-configuration-updates/ Currently we also add a checksum to $fw which isn't allowed in the current version, wondering if we should allow extension ? |
That's what I mean. It is useless in its current form without adding additional information. Why should someone be interested in the version, if the device doesn't support updates? As I understood, the convention is for discovery of available topics and their semantics. Everything else can be specified on top of it. Can't it? |
Close in favour of #130 |
I have the situation in a network where I have two kind of cpu (ESP-32 and ESP-8266) and some of the ESP-8266 boards have different EEPROM sizes (4M and 2M)
Also if the cpu are the same the physical board have different fuinctionality
I have:
So If I want to implement a firmware update I need a different firmware for each board
I need
Where I could put those information?
The text was updated successfully, but these errors were encountered: