Back to Smartcitizen.me

Cannot set readint or pubint in the shell

Hello, I have been trying to use the config -readint XXX and config -pubint XXX to set the read and publish times but the commands do not work. I have been able to set the read times of the sensors individually after these commands fail. Here is a copy of the shell, it says config saved, but the intervals do not change. And the error for pubint says “For now we can only store safely 3 set of readings on RAM memory, sorry”. Can anyone help me understand what is going on?

(2021-07-13T08:58:47Z) Published OK, erasing from memory
shell -on
Shell mode: on
SCK > version
Hardware Version: 2.1
SAM Hardware ID: A91B59E50573738352E3120FF15180F
SAM version: 0.9.7-1b30422
SAM build date: 2020-06-23T16:08:01Z
ESP MAC address:
ESP version: 0.9.2-a91f850
ESP build date: 2019-08-20T13:17:16Z
SCK >
SCK > config -readint 300
Saved configuration on eeprom!!
– New config –
Mode: network
Publish interval: 180
Reading interval: 60
Wifi credentials: xxxxxxxxxxxxxxxxxxxx
Token: xxxxxxxxxxxxxxx
Mac address: xxxxxxxxxxxxxxx
SCK > Synced config with ESP!!
config -pubint 1800
For now we can only store safely 3 set of readings on RAM memory, sorry.
Saved configuration on eeprom!!
– New config –
Mode: network
Publish interval: 180
Reading interval: 60
Wifi credentials: xxxxxxxxxxxx
Token: xxxxxxxxxxxxxx
Mac address: xxxxxxxxxxxxxxxx
SCK > Synced config with ESP!!

It’s interesting.
Please can you determine your firmware versions.

From some earlier discussions with @oscgonfer I understand today’s standard publish interval is 5 minutes ( 300 seconds) and based on the output from your kit is limited to 3 readings in between, therefore reading interval 100 seconds. But there are limits I am unsure of at the moment.

This is done to reduce power requirements especially for SCS.
May I suggest you try making the reading/publish intervals 1:3 ratio and see if you are able to successfully set it.

@oscgonfer is offline at the moment, so I am trying to help, but have less expertise (sorry)

Thank you for considering my issue. When posted I had the recent firmware for both SAM and ESP. This gave some very inconsitent results with read/pub and my data had some zero readings being published. I have since been using the pre-release versions of both, SAM 0.9.8 and ESP 0.9.3.
I have noted the details on the releases which state:
** Kit now go to sleep with and without battery after sleep timer (solar panel friendly).*
** Shell configurable sleep timer (30 min default).*
** Button or sd card events keep kit awake.*
** While wakeup kit will publish as soon as readings are available.*
** After timer, kit will publish every 3 min as default.*

So, I understand from this that while awake, the kit will publish when readings are available (not certain what frequency this is supposed to be, but my kit will take readings every 60s). It will then sleep after 30 minutes (default value) and take on a different read/pub interval after this. This makes it trickier to observe any changes made to read/pub intervals! I have changed the default sleep to 5 minutes successfully. I have observed the LEDs over time in sleep mode, it is clear when sleep starts as the Status LED changes from a ‘heartbeat’ to a single flash approx every 3 seconds and the Wifi LED turns off. In sleep mode, the Status LED changes to a heartbeat every minute suggesting a reading, and the Wifi LED flashes in sync with the heartbeat every 4 minutes, after I have tried to set a pub time of 600s.
I will experiment as you suggest with a read of 300s and a pub of 900s, this should give enough to observe the change being successful or not.

@oscgonfer @pral2a1
Note issues observed with the pre release firmware

Hi, maybe an update to the newest firmware release?