MQTT Improvements / Autodiscovery #333
Replies: 6 comments 12 replies
-
Thanks a lot for your contribution, I have already asked @dukess and @Luposoft63 to have a look at your PR because they have been writing most of the MQTT code so far and I'm not actively using it so I'm not an expert when it comes to MQTT and its best use cases. |
Beta Was this translation helpful? Give feedback.
-
@fredlcore I agree, that MQTT is really valuable, especially, since it is a push-based, not polling all along. I've got good experience with a few shelly switches via MQTT as well. Regarding half-ready features: Don't worry, I've been in the business for over 20 years now and I had my share of these things. I'll do my best and try to get one feature-complete change at a time into the codebase. I won't send you anything incomplete, wouldn't be my style anyway ;-) What I wonder: Is there a specific (arduino?) reason that leads to the whole code being in a single file and not separated into various C-files for better managebility? I'm having a hard time when merging upstream changes in that big file. Also, having the code separated a bit problably will make it easier tracking changes. Do I miss something here? If yes, please just point me into the right direction (y'know, RTFM and such). |
Beta Was this translation helpful? Give feedback.
-
Thank you, @torbennehmer! Maybe with a more professional/experienced background, it is more obvious where to look for certain kinds of code and then the benefits of your suggestion certainly outweigh anything else. Even though several people have contributed valuable pieces of code to the project, in the end very few of them stayed on contributing regularly. That's why so far I have addressed the programming needs based on my own preferences, and for reasons stated above, I prefer the actual code to stay in one place. That does not mean that the code doesn't need cleanup, of course! The way functions are scattered across the code has no longer any reasonable order, and once we have dropped Mega support, quite a bit of code could go for good and be rewritten in a more readable way. Having said that, the MQTT and JSON code are the two sections of code which have advanced so much that my original approaches are hardly visible anymore (which is good :)!). So I'd agree to move these two parts of the code to new files if those people mainly working with it would want that, too (@dukess and others). |
Beta Was this translation helpful? Give feedback.
-
@torbennehmer I am pleased to read to read your ideas on this matter and would love to see a more advanced MQTT functionality in BSB-LAN to integrate in Homeassistant with auto discovery. Did you progress during the last three years? |
Beta Was this translation helpful? Give feedback.
-
Since these points originally raised by @torbennehmer...
...have now all been implemented, I guess we can close this topic now. Thanks everyone for all the contributions and ideas! |
Beta Was this translation helpful? Give feedback.
-
BTW, I have now created a tutorial video on how to integrate BSB-LAN into Home Assistant using auto-discovery: |
Beta Was this translation helpful? Give feedback.
-
Good evening together,
I've been thinking (and working) on the MQTT interface of BSB-LAN, #332 is a first attempt on moving MQTT further along. The reasoning behind this is the flexibiliity MQTT gives you. I've been using it to integrate with Home Assistant as the existing integration doesn't work for me as I don't have a room thermostat in my BSB.
The idea behind all this is to move the async MQTT interface (much better than polling anyway) to a point where it gets more transparent and feature rich. For example:
I'm still working my way into the codebase, but I believe this should be possible at least with the resources a Due provides (which I am using for myself here).
What I would like to know if this is something you can make use of or if it is outside the scope of what you want to achive. I cannot promise you how quickly I can build any further changes - as a family father my time is limited. But I'd like to contribute a bit, since what you're doing here is really cool (thanks!!!).
Best regards, Torben
Beta Was this translation helpful? Give feedback.
All reactions