Rob,
I’m unable to reliably sync the environment variables from the note hub to the notecard when in minimum mode.
A brief description of my setup:
- ESP32 Feather board on Notecarrier AF
- Notecard with “version”: “notecard-3.5.1.15545”
- ESP32 app wakes up, reads sensor then
issues {“req”: “hub.sync”}
then does a {“req”: “hub.status”} until the notecard is connected
once notecard is connected is in a loop checking
{
“req”: “hub.sync.status”,
“sync”: true
}
“completed” > 30
The ESP32 app then computes the time to the next reading, issues a card.attn and goes to sleep.
This code is working properly and not generating any errors or unexpected responses.
I’m setting a device environment variable called PollTime, which is the interval between readings in minutes.
Here is an example of what I’m seeing:
- PollTime was 60 minutes (every hour)
- At 5 minutes before the hour, In Notehub I change PollTime to 30 minutes and save it.
- At the hour, the ESP32 wakes up, takes the sensor readings, wires them to a Notefile, then syncs and goes to sleep.
- The environment variable doesn’t change.
Here are the note hub events:
From the WebUI, I then do an env.get and also see PollTime has not changed:
> {"req":"env.get"}
{
"time": 1667943477,
"body": {
"_tri_mins": "1440",
"CL1Enable": "1",
"CL1Offset": "-310",
"CL1Slope": "0.0034",
"CL2Enable": "1",
"CL2Offset": "-175",
"CL2Slope": "0.0005",
"CL3Enable": "0",
"CL3Offset": "-391",
"CL3Slope": "0.0025",
"CL4Enable": "0",
"CL4Offset": "266",
"CL4Slope": "0.0034",
"PollTime": "60"
}
I’m at a loss. Any ideas? A firmware, a missing JSON command, or a dummy programmer (me!)
Thanks,
Karl