-
Notifications
You must be signed in to change notification settings - Fork 306
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
Wishlist for v2.0.0 #87
Comments
+1 (and very much appreciated) for embedding the magic bytes for homie-ota; this will make our sketches look neater. Regarding TLS (SSL): in spite of the huge amount of work you went to to get it to work, I have since reconsidered. Within a home, It's more important that devices are stable and "unbreakable" (eg killing them with PUBs) than having TLS. Furthermore I have the feeling that most people don't care about the security anyhow... In other words: drop TLS until ESP8266 supports it natively and asynchronously. |
Hi, once again thanks for great work. If it is the right place for some kind of wish list: Best regards, Piotr |
I wouldn't add custom settings. I think that we should allow to use WPS to connect to the WiFi network and use mDNS to discover a default mqtt broker service. Then, the remaining options can be configured with mqtt messages. This way we didn't need any special BootConfig mode. |
+1 for configuration via MQTT. |
@unaiur this would be ideal, but I am not sure it would fit everyone. WPS is probably not supported by all routers, and who actually advertise its MQTT broker via mDNS? |
Regarding API: Make the callback function a virtual method of HomieNode. This would allow for a more modular design. You still can have the default implementation to call a NodeInputHandler. |
@euphi Can you provide a sample code of how it would look like? |
Proof of concept (on tag v1.5.0) It was necessary to remove some const. Since I haven't coded for almost 6 years, I am a little bit out of practice, but I think the const was wrong there anyhow. With the call via the method pointer, you discard the const of the Homienode object - with the member function, this is no longer possible. I did not had the time to create a class derived from Homienode, but this patch at least do not break anything :-) |
Due to bad weather today I found some time to make use of the new HomieNode::Inputhandler(..) I created a new project at GitHub. Especially have a look at https://github.com/euphi/BalkonController/blob/master/src/RGBWNode.cpp and It is work in progress, there are still some nodes with the old style of callback. To use them with OpenHab, I use the following items configuration:
|
I've evolved the proposal from @euphi in a project I'm doing to control led strips with Homie. |
To be able to run Homie on a battery powered device would be a great addition especially for simple environmental sensors around the house. |
My wishlist item is to log/send messages to a local / remote syslog server. |
@powerwade I think that would be out of scope, in particular as it'd mean implementing syslog protocol: Homie is MQTT. This can very easily be accomplished by creating a subscriber (server-side) which subscribes to your MQTT messages and pushes them out via syslog; a few lines of, say, Python would do the trick. |
I could see syslog being handy and have thought of a few use cases where it would/could be. At least for prototyping when I don't have serial output. I've been fighting with a faulty pn532 board and it would have been handy to get some debugging info over syslog. |
I like Homie API names and the code style very much. I made a feature request on #26 regarding to captive portal. |
Regarding syslog: It would be nice, if Homie could use another logger. Therefore it should be possible to set a logger class, e.g. any class implemting the "Print" class. So, it is possible to create a syslog logger from another library and set it as preferred logger for Homie. |
I love the proposed Idea to set a configuration via mqtt. |
I'm working in wifi wps setup. I'm planning to add a new configuration option EnableWPS. When defined it will use the integrated settings in the ESP8266WiFi library, or start WPS pairing if no network is configured. It's nearly done and it uses very little code. |
Another future ticket I would like to work at in the future is startup time. I'm planning to implement a button on battery. When the button is pressed, the ESP will wake up from deep sleep, connect to the MQTT server and publish a topic. The problem is that it needs about 4 seconds. I will try to: These steps can halve the startup time. Do you have any other idea to try to reduce startup time even more? |
You can see my WPS implementation at https://github.com/unaiur/homie-esp8266/tree/wps |
@unaiur it seems we can cut down the time needed to connect to the Wi-Fi by not calling |
I am also considering removing the @jpmens what do you think about it? |
@marvinroger am I understanding correctly that the new binary firmware would be sent to Homie via an MQTT publish? If so, I'm all for it, and we can easily change |
@unaiur has there been any progress with WPS for homie-esp8266? I am in a situation where this would probably be extremely useful for us. |
Would it make sense to implement a captive portal while in Configure mode? I think it would only require capturing the iOS and Android test URL's, and returning a HTTP redirect. |
@shogsbro the captive portal is already implemented in the latest git, but this is only useful if you've embedded the |
I too would love a battery friendly deep sleep. Is that possible? I have a custom code for temperature sensing using ESP and MQTT. I would love to swap out the plumbing for Homie. |
Deep sleep will be possible with #138, I don't know if there's something else you would like for deep sleep? |
Where's the documentation on the "ui_bundle.gz" ? I can't find it in the 2.0 docs online. |
@karlp just added a page: https://homie-esp8266.readme.io/v2.0.0/docs/ui-bundle |
@tiagostutz, see what an amazing v2.0 planning and execution for Homie 2.0... |
Awesome! Great expectations here...! |
The first version of the emulator is ready. It's not a big deal, but maybe it can be useful: |
The only point I don't like for v2 is removing SSL. We can't have a IoT device exchanging data with Internet with no security. |
@averri quite right, which is why you probably shouldn't be sending this kind of data over the Internet in the first place. Marvin has profusely explained why TLS is currently not possible. IMO you have three options:
|
Where is this? I was trying to touch AWS's IoT service, but ended up having to use a proxy. |
Hi @jpmens, I sincerely don't understand the rationale of having an IoT device which we can't use for sending data to the internet. So going through the options:
I do understand the difficulties for adding TLS to Homie at the moment, but I would like to say: don't give up because it is complex. Maybe you may not add it to v2.0.0, but I strongly recommend Homie developers to consider it as the next big feature. Bear in mind: security will be a decision factor for adoption by many people. |
I have a use case that may already be covered, but I'm not sure of the canonical way to approach it. I have a device controlling a strip of NeoPixels. One function is that it will cycle through the colors (a rainbow). The speed at which it cycles is currently configurable at a setting. I could change the speed by exposing a property on a Ideas:
|
...I'm not sure if I can actually write a setting from my code other than to broadcast? |
@averri we don't give up, we will probably add it back in the future. 😉 |
@marvinroger Good idea. I'm an MQTT novice. |
Is it already possible to use platformio for latest v2.0.0? It seems there is a platformio added some versioning support recently, but I'm unsure how it works? Note: I ask here first to get some explanation. If no one knows if it is possible and how, I will ask again at that platformio community. |
Try this in platformio.ini:
|
in the 'Migration guide' I read the Homie.setNodeProperty() signature has changed. |
What about an UDP logger so even debug will be completely over the air? |
Could we close this endless issue? |
Go ahead! |
TODO
1st step
The framework must be completely asynchronous. It was not doable before because TCP stuff was synchronous, now with ESPAsyncTCP, we can. The only drawback is SSL is not supported. This is currently not stable enough anyway, and it probably won't be production ready due to limited memory, something that might change with the ESP32.
More modular design (implemented in Add several virtual methods to HomieNode #91, thanks to @euphi and @unaiur)
The configuration UI must be embeddable, optionally. Captive portal must be working, so everything would be transparent to the user (implemented in Load the configuration UI into ESP8266 flash chip #84, thanks to @unaiur!)
There must be custom settings support (Interface for adding extra settings #26)
There must be a way to change configuration while in normal mode. This is achievable with AsyncMqttClient because there are no hard limits like PubSubClient has (change configuration in normal mode #36)
@euphi (implemented in f1110fb):
Embed the magic bytes (useful for homie-ota for example) as a macro (implemented for firmware name, version and brand in e73b3af)
No need to call
registerNode
(implemented in Proposal for autoregistration of HomieNodes #96, thanks to @euphi and @unaiur)Transparent proxy for captive portal custom configurations (implemented in Transparent proxy for captive portal custom configurations #95, thanks to @flaviostutz )
Optimize Wi-Fi (implemented in 56088cd)
2nd step
Breaking changes (or migration guide from v1.5.0 to v2.0.0)
Homie.setFirmware(name, version)
must be replaced byHomie_setFirmware(name, version)
Homie.setBrand(brand)
must be replaced byHomie_setBrand(brand)
Homie.registerNode()
must be removedSerial.begin()
must be called explicitely in your sketchHOMIE_OTA_MODE
in your event handler, if you have oneconfig.json
changes:mqtt
section:mdns
must be removed. Set thehost
andport
fieldsssl
andfingerprint
must be removed. No SSL support anymoreota
section:enabled
. OTA is now done over MQTT nowHomie.setNodeProperty()
signature changed fromconst HomieNode& node, const char* property, const char* value, bool retained
toconst HomieNode& node, const char* property, const char* value, uint8_t qos, bool retained
Let's discuss
The 2.0.0 will be a breaking change. As such, we can safely change the API, the functions name, the order of the parameters... Let me know if you think there is any weirdness with the API, or the HTTP API of the config mode, etc. 😃
The text was updated successfully, but these errors were encountered: