-
Notifications
You must be signed in to change notification settings - Fork 124
Fully disable cloud connection to airgradient server option #278
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
Conversation
fetch configuration, post data and ota will be ignored
Notes about offlineMode and disableCloudConnection
That accomodate ApiClient changes Fix apiClient begin on OneOpenAir
"or configurationControl set to local"); | ||
apiClient.resetFetchConfigureState(); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore vs reset
also propose to log what the mode is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore vs reset
Relate to this comment #278 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much redundancy code added to only log the exact mode. I think it's enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method should start with a verb. e.g.
update ConfigurationSchedule()
it this is what it does. Within the method we then say resetFetchConfigurationStatus() so we have update vs. reset. Not entirely sure how to resolve this.
docs/local-server.md
Outdated
| `monitorDisplayCompensatedValues` | Set the display show the PM value with/without compensate value (only on [3.1.9]()) | Boolean | `false`: Without compensate (default) <br> `true`: with compensate | `{"monitorDisplayCompensatedValues": false }` | | ||
| `corrections` | Sets correction options to display and measurement values on local server response. (version >= [3.1.11]()) | Object | _see corrections section_ | _see corrections section_ | | ||
|
||
|
||
**Notes** | ||
|
||
- `offlineMode` : device will disable all network operation, and only show measurements on display and ledbar; Read-Only; Change can be apply using reset button on boot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Propose to make full sentences
The device ... on the display ....
examples/BASIC/BASIC.ino
Outdated
if (configuration.isPostDataToAirGradient() == false || | ||
configuration.isOfflineMode()) { | ||
if (configuration.isOfflineMode() || !configuration.isPostDataToAirGradient()) { | ||
Serial.println("Ignore send data to server. Either mode is offline " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipping transmission of data to AG server. ?
examples/BASIC/BASIC.ino
Outdated
} | ||
|
||
if (wifiConnector.isConnected() == false) { | ||
Serial.println("WiFi not connected, skip post data to server"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. skipping data transmission to AG server
?
src/AgWiFiConnector.cpp
Outdated
"<p>Prevent connection to the AirGradient Server. Important: Only enable " | ||
"it if you are sure you don't want to use any AirGradient cloud " | ||
"features. As a result you will not receive automatic firmware updates " | ||
"and your data will not reach the AirGradient dashboard.</p>"); | ||
WIFI()->addParameter(&postToAgInfo); | ||
"configure from cloud and your data will not reach the AirGradient dashboard.</p>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it needs an extra comma here and
configure -> configuration (or maybe configuration settings)
examples/OneOpenAir/OneOpenAir.ino
Outdated
@@ -505,15 +466,21 @@ static bool sgp41Init(void) { | |||
|
|||
static void firmwareCheckForUpdate(void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propose to rename to
checkForFirmwareUpdate
examples/OneOpenAir/OneOpenAir.ino
Outdated
// Initialize api client | ||
apiClient.begin(); | ||
|
||
// Check and process if AirGradient server is reachable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment doesn't seem to be in line with what we then do, we "send"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
examples/OneOpenAir/OneOpenAir.ino
Outdated
@@ -870,7 +870,7 @@ void initializeNetwork() { | |||
// Initialize api client | |||
apiClient.begin(); | |||
|
|||
// Check and process if AirGradient server is reachable | |||
// Send data for the first time to airgradient at boot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to AG server
?
Changes
disableCloudConnection
config added to disable every cloud connection to airgradient serverdisableCloudConnection
not applied for DIY modellocal-server.md
updated, describingofflineMode
anddisableCloudConnection