-
Notifications
You must be signed in to change notification settings - Fork 307
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
Conditional HomieNode creation #706
Comments
Take a look at my homie node collection. There are some examples (e.g. the bme280 node) where the (per node) settings are created at run time. I don't creat the nodes at run time, because I don't have your use case, but maybe it can help you to get started. |
Had the same requirement. |
@luebbe would you be interested in a PR (or just do it - I don't know enough about testing forks of platformio modules yet) to add a Admittedly, I need to work out how to do it soon, as I think I want to take that further :)
|
Sure, go ahead. But I'm not that deep into the homie sources to provide a good review, depending on the complexitiy of the PR. |
well darn. I have something that works for me, but is clearly naive. but at the same time, Platformio (or a vscode plugin) has reformatted so much code as to be a useless diff. guess this will take a few weeks (assuming we get to go on the no-computer easter holiday) I've got some ideas tho :) one of which is that I now want a json settings type... |
Hi, is here any progress? I have a similar use case. I would like to provide a firmware which is able to connect to 1-5 sensors over serial interface. Each sensor has to be paired on its own and has its own serial number. To achieve this my plan was to use five HomieSetting<const char *> for which the end user could write his serial number(s) and leave some blank if he has less than 5 sensors attached. For example he provides the information's with the Android "Homie setup" App. I have to put the serial numbers in a char array too, that is right now a problem I haven't resolved yet. I had already a look into the BME280 Node from @luebbe and in the documentation of the HomieSetting but right now I have no plan if the use-case is possible or not without changes to the Homie esp8266 implementation. Perhaps somebody could give me a few tips? Thanks in advance |
I would like to have one firmware that has code for all the sensors that I use, and then to use the configuration settings to decide which to enable (d1 wemos, and non-technical users)
but atm, it looks like the settings aren't parsed until
Homie.setup()
is called, and the devices need to be created beforeHomie.setup()
is called.is there a right way to do this? or should I look at making a PR to separate out the configuration parsing and the setup?
The text was updated successfully, but these errors were encountered: