Skip to content
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

Inform AG server of configuration source setting #216

Open
airgradienthq opened this issue Aug 24, 2024 · 4 comments
Open

Inform AG server of configuration source setting #216

airgradienthq opened this issue Aug 24, 2024 · 4 comments
Labels
question Further information is requested

Comments

@airgradienthq
Copy link
Owner

If the user set the device up on home assistant and controls it from there, the configuration from airgradient server is not accepted because it is set to "local":

image

However, currently there is no notification on the airgradient server on this which confuses users. Can we send the current configuration setting to airgradient server somehow? Maybe as part of the POST measures?

@pnt325
Copy link
Contributor

pnt325 commented Aug 25, 2024

Yes we can send the device configuration to cloud like sync measure data to cloud. But from server should accept and store the configuration then if the configuration change form local will be sync to cloud and change from cloud will be send to local

@pnt325 pnt325 added the question Further information is requested label Sep 5, 2024
@airgradienthq
Copy link
Owner Author

@nick-4711 Let me know your thoughts on this. Background is that we have a couple of people that set on Home Assistant to ignore cloud configuration but then also use our cloud and try to change things that are then ignored on the device.

So it would be good if we can show a message on our dashboard that the control is local.

What would be the best way to transmit that setting?

@nick-4711
Copy link
Collaborator

I think the device shouldn't attempt to fetch the configuration in the first place, it will discard it anyway. This can then be detected on the server side: The device does post data but never fetches the configuration, this means it is configured through a third party system. It might take some time though until the backend reacts on the configuration change. Maybe this works

  • let the device restart if it is switched to local configuration (if not already the case)
  • prevent it from posting data until the configuration is fetched

then look at the uptime counter in the data posted to the AG backend, if it is 1 and there was no config fetch in the last few minutes then it is no longer fetching the configuration from the AG backend

@airgradienthq
Copy link
Owner Author

Discussed today to go ahead with the server side implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants