r-map / rmap

rete monitoraggio ambientale partecipativo documentation at https://doc.rmap.cc
https://rmap.cc
53 stars 42 forks source link

firmware: i2c-rain wrong precipitation on restart #341

Closed pat1 closed 3 years ago

pat1 commented 3 years ago

con la stazione funzionante da un po' di tempo se il modulo si riavvia e successivamente piove il report successivo riporta zero invece che mancante; i motivi di un restart possono essere vari, ma in primis il watchdog.

Log della stazione

#Sensors reading...
#Next acquisition scheduled at: 10:45:00
#Sensors reading...
#Restart I2C BUS
#[ 12 ] data stored in sdcard... [ OK ]
#SIM800 switching ON... [ OK ] [ ON ]
#SIM800 reset to factory default [ OK ]
#SIM800 echo mode off [ OK ]
#SIM800 signal [ OK ] [ rssi 17, ber 5 ]
#SIM800 network registered... [ OK ]
#SIM800 setup... [ OK ]
#SIM800 GPRS attach... [ OK ] [ NO ]
#SIM800 attach GPRS... [ OK ]
#SIM800 single IP mode... [ OK ]
#SIM800 switch to data mode... [ OK ]
#SIM800 transparent mode... [ OK ]
#SIM800 set APN, username and password... [ OK ]
#SIM800 setting up connection... [ OK ]
#SIM800 IP... [ OK ] [ 10.72.103.8 ]
#SIM800 start connection... [ OK ]
#Data pointer... [ 10/04/2021 10:15:01 ] [ OK ]
#SIM800 TCP status... [ OK ] [ CONNECT ]
#Data pointer... [ 10/04/2021 10:30:01 ] [ UPDATE ]
#[ 12 ] data published through mqtt... [ OK ]
#SIM800 stop connection... [ OK ]
#SIM800 PDP close... [ OK ]
#SIM800 detach GPRS... [ OK ]
#SIM800 stop connection... [ OK ]
#SIM800 switching OFF... [ OK ] [ OFF ]
#Sensors reading...
#Sensors reading...

log del modulo

#Load configuration... [ OK ]
#--> type: i2c-rain
#--> version: 3
#--> i2c address: 0x21 (33)
#--> oneshot: ON
#--> continuous: OFF
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Rain tips!
#Total rain : 0

dati sul broker mqtt:

report/pat1/1165625,4485892/fixed/254,0,0/103,2000,-,-/B12101 {"v":29426,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/254,0,0/103,2000,-,-/B13003 {"v":37,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/3,0,900/103,2000,-,-/B12101 {"v":29424,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/3,0,900/103,2000,-,-/B13003 {"v":37,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/0,0,900/103,2000,-,-/B12101 {"v":29426,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/0,0,900/103,2000,-,-/B13003 {"v":37,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/2,0,900/103,2000,-,-/B12101 {"v":29427,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/2,0,900/103,2000,-,-/B13003 {"v":37,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/1,0,900/1,-,-,-/B13011 {"v":0,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/254,0,0/265,1,-,-/B25192 {"v":null,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/254,0,0/265,1,-,-/B25025 {"v":null,"t":"2021-04-10T10:30:00"}
report/pat1/1165625,4485892/fixed/254,0,0/265,1,-,-/B25194 {"v":null,"t":"2021-04-10T10:30:00"}