-
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
Saving custom setting from device #457
Comments
Im working on alot to enable using settings better with homie, ill add this to the list ( #458 ) |
@timpur awesome 👍 thank you!! |
Added this to my fork. You can test it if you like |
Yup I noticed that, i've actually been using your 2.1 branch fork for a while now, haven't had a chance to test this part yet, but will do so here this weekend and let you know |
@tripflex |
@timpur will do .. is the plan to keep the |
Yes, I believe put should be for putting a file on the server and not setting a setting. So I think post makes more sense here |
As mentioned in my other issues/comments, I have a custom node that relies on a custom config value that is stored by Homie.
The issue is that, I also have exposed this setting in a node property, to allow configuring that one property via MQTT, but can't find any way to save a custom setting value (without using incremental json to do so).
Is there no way to set a custom setting value and have that save to the config file ... from inside my code base? IF not, i'll just have to use a lib I created from my old project to save json values to a file ... would just be nicer to be able to save that value in the same homie config to not have to use multiple configuration files.
Case and point, I have a RelayNode (which controls a pump), and I have a custom setting setup for
runDuration
... thisrunDuration
is also exposed as a property of the node, ie:/homie/test-device/pump/duration
which is settable, and when that value is set, I need it to update therunDuration
saved to the HomieConfiguration, that way that value that was set is used instead of the default value.Yes when the device connects back via MQTT and it subscribes it will receive the last set value, but if the device does not have internet, I still need it to be able to run and use the last set value, thus, the reason I need to be able to save the value to the configuration.
Is this something that would be possible already with the existing Homie codebase, or do I need to just go ahead and setup another way to handle saving my own custom configurations?
The text was updated successfully, but these errors were encountered: