AirGradient Forum

Ability to turn off data to external networks

I apologize if this has been asked before, but can there be a feature that allows us to disable the connections to the airgradient servers so that we can solely use home assistant? I have four monitors, and I don’'t need or use the airgradient dashboard for those. Also, I wouldn’t need to worry about all the airgradient server side issues where these monitors can’t connect (which is of no use to me).

If I can disable all external network connections with airgradient using the “share data” API toggle, please let me know if that will stop the attempts to connect and the failure indications when there are issues?

Hi @medtech1 ,

On above image, is a local webpage when setting up monitor’s wifi. There’s a checkbox to disable every connection to our server, but unfortunately its still not disable every connection to our server (only some of it). The fix will be happen on next firmware release maybe next week or two, with a couple other feature and fix added. We’re still on test period.

Or, if you don’t want to wait and comfortable with compiling it yourself, you can do that using this PR branch (https://github.com/airgradienthq/arduino/pull/278).

2 Likes

Is this setting similar/identical to postDataToAirGradient (link to doc)? If yes, my understanding is that sending of data to AG servers can also be disabled post-installation, right?

You’re right, but not quite.

I suggest you read through this thread, there’s a discussion about this too.

2 Likes

Wouldn’t it just be this?

curl -X PUT -H "Content-Type: application/json" -d '{"configurationControl":"local", "postDataToAirGradient":false}' http://airgradient_SERIAL.local/config

Hi @nickf1227 ,

Almost! You can read this reply.

On latest firmware release there’s still a couple request to airgradient server at boot. But if you don’t have a problem with that, those two configuration should suffice. Until we release the fix.

1 Like

Glancing at the codebase, it’s clear that the postDataToAirGradient toggle is DIFFERENT from the disableCloud toggle. The “Prevent COnnection to AirGradient Server” controls disableCloud. Also, disableCloud is hidden from the /config route.

If I understood the code correctly, disableCloud is clearly supposed to disable all communications, while postDataToAirGradient prevents posting data but still allows firmware updates and perhaps other things.

However, I believe there’s a bug, since ticking the box still connects to the server. I think somewhere in the boot process disableCloud is being ignored or being reset back to FALSE.

I am just a customer, not affiliated with AirGradient, and this was a quick code glance. I could be wrong.

1 Like

Hi @hot-air-balloon ,

disableCloud introduced on firmware 3.2.0 and the purpose is to actually disable every communication to airgradient server that fix the issue that you point out. This thread is brought up before firmware 3.2.0

1 Like

You’re completely right and I made an error.

I was looking at 3.2.0 code while trying to figure out the problem in a device running 3.1 code, and the code seemed totally correct and I couldn’t figure out what I was missing.

You saved me lots of headache. Thanks!

2 Likes