sonnen-tools / node-red

Node Red Flows for use with Sonnenbatterie
GNU General Public License v3.0
8 stars 1 forks source link

Analysis - Battery not charging above 74% #6

Closed markusjnagel closed 10 months ago

markusjnagel commented 10 months ago

So, last night it looked great - Battery discharge was stopped, because Tibber was cheaper than battery.

Car charged fine (out of scope here, but identified hours <= 32ct, which is "cheap" currently).

Battery started charging when cheap hours were identified (see below) but didn't charge above 74%, even though Target SoC is 97%. Kept it at 74% during the cheap hours.

image

image

markusjnagel commented 10 months ago
mnagel@rpizero:~ $ journalctl --since "2024-01-08 02:00:00" --until "2024-01-08 06:00:00" -u nodered > logs_only74%.log
mnagel@rpizero:~ $ pwd
/home/mnagel

from other computer:

[🎩︎mnagel logs]$ scp mnagel@rpizero.local:/home/mnagel/logs_only74%.log .
mnagel@rpizero.local's password: 
logs_only74%.log                              100%  369KB   2.1MB/s   00:00    
[🎩︎mnagel logs]$ ll
total 372
-rw-r--r--. 1 mnagel mnagel 378098 Jan  8 10:20 logs_only74%.log
[🎩︎mnagel logs]$ 

logs_only74%.log

markusjnagel commented 10 months ago

Seems the battery API Server had a hiccup "Connection Refused"

8 Jan 03:41:24 - [error] [http request:Generic HTTP Request] RequestError: connect ECONNREFUSED 192.168.2.108:80

and the charging logic in the flow doesn't recover from the undefined values this results in...

Jan 08 03:40:07 rpizero Node-RED[4813]: 8 Jan 03:40:07 - [info] [function:stillCharging?] Current SoC: 73
Jan 08 03:40:07 rpizero Node-RED[4813]: 8 Jan 03:40:07 - [info] [function:stillCharging?] OperatingMode: 1
Jan 08 03:40:07 rpizero Node-RED[4813]: 8 Jan 03:40:07 - [info] [function:stillCharging?] Global: isBatteryCharging:true
Jan 08 03:40:07 rpizero Node-RED[4813]: 8 Jan 03:40:07 - [info] [function:stillCharging?] Still charging, in charging loop
Jan 08 03:41:24 rpizero Node-RED[4813]: 8 Jan 03:41:24 - [error] [http request:Generic HTTP Request] RequestError: connect ECONNREFUSED 192.168.2.108:80
Jan 08 03:41:24 rpizero Node-RED[4813]: 8 Jan 03:41:24 - [info] [function:stillCharging?] Target SoC: 97
Jan 08 03:41:24 rpizero Node-RED[4813]: 8 Jan 03:41:24 - [info] [function:stillCharging?] Current SoC: undefined
Jan 08 03:41:24 rpizero Node-RED[4813]: 8 Jan 03:41:24 - [info] [function:stillCharging?] OperatingMode: undefined
Jan 08 03:41:24 rpizero Node-RED[4813]: 8 Jan 03:41:24 - [info] [function:stillCharging?] Global: isBatteryCharging:true
Jan 08 03:41:24 rpizero Node-RED[4813]: 8 Jan 03:41:24 - [info] [function:stillCharging?] Not charging, breaking charging loop
Jan 08 03:41:24 rpizero Node-RED[4813]: 8 Jan 03:41:24 - [warn] [function:nothingToDo_chargingStopped] Charging has been stopped
Jan 08 03:41:24 rpizero Node-RED[4813]: 8 Jan 03:41:24 - [warn] [function:nothingToDo_chargingStopped] Current SoC: undefined
Jan 08 03:41:24 rpizero Node-RED[4813]: 8 Jan 03:41:24 - [warn] [function:nothingToDo_chargingStopped] Desired SoC: 97
Jan 08 03:42:02 rpizero Node-RED[4813]: 8 Jan 03:42:02 - [info] [function:shouldIBeCharging?] 2 cheapHours found
Jan 08 03:42:02 rpizero Node-RED[4813]: 8 Jan 03:42:02 - [warn] [function:shouldIBeCharging?] In a cheap hour? true
Jan 08 03:42:02 rpizero Node-RED[4813]: 8 Jan 03:42:02 - [warn] [function:shouldIBeCharging?] {
Jan 08 03:42:02 rpizero Node-RED[4813]:   "total": 0.3088,
Jan 08 03:42:02 rpizero Node-RED[4813]:   "startsAt": "2024-01-08T03:00:00.000+01:00"
Jan 08 03:42:02 rpizero Node-RED[4813]: }
Jan 08 03:42:02 rpizero Node-RED[4813]: 8 Jan 03:42:02 - [info] [function:shouldIBeCharging?] GREEN - yes - charge
Jan 08 03:42:21 rpizero Node-RED[4813]: 8 Jan 03:42:21 - [info] [function:logSBStatus] Target SoC: 97
Jan 08 03:42:21 rpizero Node-RED[4813]: 8 Jan 03:42:21 - [info] [function:logSBStatus] Current SoC: 74
Jan 08 03:42:21 rpizero Node-RED[4813]: 8 Jan 03:42:21 - [info] [function:logSBStatus] SB Status: -------------------------------
Jan 08 03:42:21 rpizero Node-RED[4813]: 8 Jan 03:42:21 - [info] [function:logSBStatus] {
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Apparent_output": 91,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "BackupBuffer": "0",
Jan 08 03:42:21 rpizero Node-RED[4813]:   "BatteryCharging": false,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "BatteryDischarging": false,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Consumption_Avg": 206,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Consumption_W": 224,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Fac": 50.025001525878906,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "FlowConsumptionBattery": false,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "FlowConsumptionGrid": true,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "FlowConsumptionProduction": true,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "FlowGridBattery": false,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "FlowProductionBattery": false,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "FlowProductionGrid": false,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "GridFeedIn_W": -221,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "IsSystemInstalled": 1,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "OperatingMode": "1",
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Pac_total_W": -1,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Production_W": 5,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "RSOC": 76,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "RemainingCapacity_Wh": 17309,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Sac1": 91,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Sac2": null,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Sac3": null,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "SystemStatus": "OnGrid",
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Timestamp": "2024-01-08 03:42:21",
Jan 08 03:42:21 rpizero Node-RED[4813]:   "USOC": 74,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Uac": 230,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "Ubat": 213,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "dischargeNotAllowed": false,
Jan 08 03:42:21 rpizero Node-RED[4813]:   "generator_autostart": false
Jan 08 03:42:21 rpizero Node-RED[4813]: }
Jan 08 03:42:21 rpizero Node-RED[4813]: 8 Jan 03:42:21 - [info] [function:logSBStatus] ------------------------------------------
Jan 08 03:42:21 rpizero Node-RED[4813]: 8 Jan 03:42:21 - [warn] [function:nothingToDo_alreadyCharging] Nothing To Do, already charging
Jan 08 03:42:21 rpizero Node-RED[4813]: 8 Jan 03:42:21 - [warn] [function:nothingToDo_alreadyCharging] Current SoC: 74
Jan 08 03:42:21 rpizero Node-RED[4813]: 8 Jan 03:42:21 - [warn] [function:nothingToDo_alreadyCharging] Desired SoC: 97
Jan 08 03:42:21 rpizero Node-RED[4813]: 8 Jan 03:42:21 - [warn] [function:nothingToDo_alreadyCharging] Current Cost: 0.3088
Jan 08 03:44:02 rpizero Node-RED[4813]: 8 Jan 03:44:02 - [info] [function:shouldIBeCharging?] 2 cheapHours found
Jan 08 03:44:02 rpizero Node-RED[4813]: 8 Jan 03:44:02 - [warn] [function:shouldIBeCharging?] In a cheap hour? true
Jan 08 03:44:02 rpizero Node-RED[4813]: 8 Jan 03:44:02 - [warn] [function:shouldIBeCharging?] {
Jan 08 03:44:02 rpizero Node-RED[4813]:   "total": 0.3088,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "startsAt": "2024-01-08T03:00:00.000+01:00"
Jan 08 03:44:02 rpizero Node-RED[4813]: }
Jan 08 03:44:02 rpizero Node-RED[4813]: 8 Jan 03:44:02 - [info] [function:shouldIBeCharging?] GREEN - yes - charge
Jan 08 03:44:02 rpizero Node-RED[4813]: 8 Jan 03:44:02 - [info] [function:logSBStatus] Target SoC: 97
Jan 08 03:44:02 rpizero Node-RED[4813]: 8 Jan 03:44:02 - [info] [function:logSBStatus] Current SoC: 74
Jan 08 03:44:02 rpizero Node-RED[4813]: 8 Jan 03:44:02 - [info] [function:logSBStatus] SB Status: -------------------------------
Jan 08 03:44:02 rpizero Node-RED[4813]: 8 Jan 03:44:02 - [info] [function:logSBStatus] {
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Apparent_output": 91,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "BackupBuffer": "0",
Jan 08 03:44:02 rpizero Node-RED[4813]:   "BatteryCharging": false,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "BatteryDischarging": false,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Consumption_Avg": 221,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Consumption_W": 219,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Fac": 50.020999908447266,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "FlowConsumptionBattery": false,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "FlowConsumptionGrid": true,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "FlowConsumptionProduction": true,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "FlowGridBattery": false,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "FlowProductionBattery": false,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "FlowProductionGrid": false,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "GridFeedIn_W": -216,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "IsSystemInstalled": 1,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "OperatingMode": "1",
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Pac_total_W": -2,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Production_W": 5,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "RSOC": 76,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "RemainingCapacity_Wh": 17285,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Sac1": 91,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Sac2": null,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Sac3": null,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "SystemStatus": "OnGrid",
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Timestamp": "2024-01-08 03:44:02",
Jan 08 03:44:02 rpizero Node-RED[4813]:   "USOC": 74,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Uac": 230,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "Ubat": 213,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "dischargeNotAllowed": false,
Jan 08 03:44:02 rpizero Node-RED[4813]:   "generator_autostart": false
Jan 08 03:44:02 rpizero Node-RED[4813]: }
markusjnagel commented 10 months ago

added an errorhandler (10 retries max, with a 10sec delay). Under testing. image

markusjnagel commented 10 months ago

Better, but still... at roughly 03:40am, it stopped charging at 87%, although the targetSoc was 97%.

image

log for the charging period until Tibber becomes more expensive than battery at 7am

journalctl --since "2024-01-09 01:55:00" --until "2024-01-09 07:15:00" -u nodered > logs_notfullycharging_3-40am.log

logs_notfullycharging_3-40am.log

markusjnagel commented 10 months ago

ah, ok..... seems that the battery is undergoing a reset or restart at night.... first we see unreachable errors, then internal server errors (502) until it becomes available again. The error handling routine caught those errors, which is fine.

However, the battery doesn't continue to charge - and since we avoid calling it again if we set the global "isBatteryCharging" flag (assuming it will continue to do its job) we don't tell it to charge again. But - it has a severe cause of amnesia after it comes back from its restart....

Jan 09 03:39:28 rpizero Node-RED[4813]: 9 Jan 03:39:28 - [warn] [function:nothingToDo_alreadyCharging] Current Cost: 0.3148
Jan 09 03:39:39 rpizero Node-RED[4813]: 9 Jan 03:39:39 - [info] [function:stillCharging?] Target SoC: 97
Jan 09 03:39:39 rpizero Node-RED[4813]: 9 Jan 03:39:39 - [info] [function:stillCharging?] Current SoC: 87
Jan 09 03:39:39 rpizero Node-RED[4813]: 9 Jan 03:39:39 - [info] [function:stillCharging?] OperatingMode: 1
Jan 09 03:39:39 rpizero Node-RED[4813]: 9 Jan 03:39:39 - [info] [function:stillCharging?] Global: isBatteryCharging:true
Jan 09 03:39:39 rpizero Node-RED[4813]: 9 Jan 03:39:39 - [info] [function:stillCharging?] Still charging, in charging loop
Jan 09 03:40:57 rpizero Node-RED[4813]: 9 Jan 03:40:57 - [error] [http request:Generic HTTP Request] RequestError: connect EHOSTUNREACH 192.168.2.108:80
Jan 09 03:40:57 rpizero Node-RED[4813]: 9 Jan 03:40:57 - [info] [function:testForErrors] Error EHOSTUNREACH encountered, retrying
Jan 09 03:40:57 rpizero Node-RED[4813]: 9 Jan 03:40:57 - [info] [function:testForErrors] Retry # 1
Jan 09 03:41:10 rpizero Node-RED[4813]: 9 Jan 03:41:10 - [error] [http request:Generic HTTP Request] RequestError: connect EHOSTUNREACH 192.168.2.108:80
Jan 09 03:41:10 rpizero Node-RED[4813]: 9 Jan 03:41:10 - [info] [function:testForErrors] Error EHOSTUNREACH encountered, retrying
Jan 09 03:41:10 rpizero Node-RED[4813]: 9 Jan 03:41:10 - [info] [function:testForErrors] Retry # 2
Jan 09 03:41:22 rpizero Node-RED[4813]: 9 Jan 03:41:22 - [warn] [http request:Generic HTTP Request] JSON parse error
Jan 09 03:41:22 rpizero Node-RED[4813]: 9 Jan 03:41:22 - [info] [function:testForErrors] Error 502 encountered, retrying
Jan 09 03:41:22 rpizero Node-RED[4813]: 9 Jan 03:41:22 - [info] [function:testForErrors] Retry # 3
Jan 09 03:41:28 rpizero Node-RED[4813]: 9 Jan 03:41:28 - [info] [function:shouldIBeCharging?] 2 cheapHours found
Jan 09 03:41:28 rpizero Node-RED[4813]: 9 Jan 03:41:28 - [warn] [function:shouldIBeCharging?] In a cheap hour? true
Jan 09 03:41:28 rpizero Node-RED[4813]: 9 Jan 03:41:28 - [warn] [function:shouldIBeCharging?] {
Jan 09 03:41:28 rpizero Node-RED[4813]:   "total": 0.3148,
Jan 09 03:41:28 rpizero Node-RED[4813]:   "startsAt": "2024-01-09T03:00:00.000+01:00"
Jan 09 03:41:28 rpizero Node-RED[4813]: }
Jan 09 03:41:28 rpizero Node-RED[4813]: 9 Jan 03:41:28 - [info] [function:shouldIBeCharging?] GREEN - yes - charge
Jan 09 03:41:28 rpizero Node-RED[4813]: 9 Jan 03:41:28 - [warn] [http request:Generic HTTP Request] JSON parse error
Jan 09 03:41:28 rpizero Node-RED[4813]: 9 Jan 03:41:28 - [info] [function:testForErrors] Error 502 encountered, retrying
Jan 09 03:41:28 rpizero Node-RED[4813]: 9 Jan 03:41:28 - [info] [function:testForErrors] Retry # 1
Jan 09 03:41:32 rpizero Node-RED[4813]: 9 Jan 03:41:32 - [warn] [http request:Generic HTTP Request] JSON parse error
Jan 09 03:41:32 rpizero Node-RED[4813]: 9 Jan 03:41:32 - [info] [function:testForErrors] Error 502 encountered, retrying
Jan 09 03:41:32 rpizero Node-RED[4813]: 9 Jan 03:41:32 - [info] [function:testForErrors] Retry # 4
Jan 09 03:41:38 rpizero Node-RED[4813]: 9 Jan 03:41:38 - [warn] [http request:Generic HTTP Request] JSON parse error
Jan 09 03:41:38 rpizero Node-RED[4813]: 9 Jan 03:41:38 - [info] [function:testForErrors] Error 502 encountered, retrying
Jan 09 03:41:38 rpizero Node-RED[4813]: 9 Jan 03:41:38 - [info] [function:testForErrors] Retry # 2
Jan 09 03:41:42 rpizero Node-RED[4813]: 9 Jan 03:41:42 - [warn] [http request:Generic HTTP Request] JSON parse error
Jan 09 03:41:42 rpizero Node-RED[4813]: 9 Jan 03:41:42 - [info] [function:testForErrors] Error 502 encountered, retrying
Jan 09 03:41:42 rpizero Node-RED[4813]: 9 Jan 03:41:42 - [info] [function:testForErrors] Retry # 5
Jan 09 03:41:48 rpizero Node-RED[4813]: 9 Jan 03:41:48 - [warn] [http request:Generic HTTP Request] JSON parse error
Jan 09 03:41:48 rpizero Node-RED[4813]: 9 Jan 03:41:48 - [info] [function:testForErrors] Error 502 encountered, retrying
Jan 09 03:41:48 rpizero Node-RED[4813]: 9 Jan 03:41:48 - [info] [function:testForErrors] Retry # 3
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:stillCharging?] Target SoC: 97
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:stillCharging?] Current SoC: 87
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:stillCharging?] OperatingMode: 1
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:stillCharging?] Global: isBatteryCharging:true
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:stillCharging?] Still charging, in charging loop
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:logSBStatus] Target SoC: 97
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:logSBStatus] Current SoC: 87
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:logSBStatus] SB Status: -------------------------------
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:logSBStatus] {
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Apparent_output": 92,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "BackupBuffer": "0",
Jan 09 03:42:05 rpizero Node-RED[4813]:   "BatteryCharging": false,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "BatteryDischarging": false,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Consumption_Avg": 496,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Consumption_W": 626,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Fac": 50.013999938964844,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "FlowConsumptionBattery": false,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "FlowConsumptionGrid": true,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "FlowConsumptionProduction": true,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "FlowGridBattery": false,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "FlowProductionBattery": false,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "FlowProductionGrid": false,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "GridFeedIn_W": -627,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "IsSystemInstalled": 1,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "OperatingMode": "1",
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Pac_total_W": -2,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Production_W": 0,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "RSOC": 88,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "RemainingCapacity_Wh": 19639,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Sac1": 92,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Sac2": null,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Sac3": null,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "SystemStatus": "OnGrid",
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Timestamp": "2024-01-09 03:42:04",
Jan 09 03:42:05 rpizero Node-RED[4813]:   "USOC": 87,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Uac": 231,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "Ubat": 213,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "dischargeNotAllowed": false,
Jan 09 03:42:05 rpizero Node-RED[4813]:   "generator_autostart": false
Jan 09 03:42:05 rpizero Node-RED[4813]: }
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [info] [function:logSBStatus] ------------------------------------------
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [warn] [function:nothingToDo_alreadyCharging] Nothing To Do, already charging
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [warn] [function:nothingToDo_alreadyCharging] Current SoC: 87
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [warn] [function:nothingToDo_alreadyCharging] Desired SoC: 97
Jan 09 03:42:05 rpizero Node-RED[4813]: 9 Jan 03:42:05 - [warn] [function:nothingToDo_alreadyCharging] Current Cost: 0.3148
Jan 09 03:43:05 rpizero Node-RED[4813]: 9 Jan 03:43:05 - [info] [function:stillCharging?] Target SoC: 97
Jan 09 03:43:05 rpizero Node-RED[4813]: 9 Jan 03:43:05 - [info] [function:stillCharging?] Current SoC: 87
Jan 09 03:43:05 rpizero Node-RED[4813]: 9 Jan 03:43:05 - [info] [function:stillCharging?] OperatingMode: 1
Jan 09 03:43:05 rpizero Node-RED[4813]: 9 Jan 03:43:05 - [info] [function:stillCharging?] Global: isBatteryCharging:true
Jan 09 03:43:05 rpizero Node-RED[4813]: 9 Jan 03:43:05 - [info] [function:stillCharging?] Still charging, in charging loop
markusjnagel commented 10 months ago

added a global flag ("sbErrorCode") to error handling code in the "SB Get Status" Node.

If set, the "alreadyCharging?" node in the "SB Start Charging" node will send the message to the "Prepare Charging" node, even though we are already charging (at least, that's what we should be doing, but after the error SB has amnesia).

image

markusjnagel commented 10 months ago

Okay, seems that this is fixed now... will continue to monitor. Battery had hiccups again, but charge was ok to 97% and kept at 97% during cheap hours (resulting in a rather long charge log, when it was losing one percent, it directly recharged).

journalctl --since "2024-01-10 00:00:00" --until "2024-01-10 07:15:00" -u nodered | grep -B 5 -A 5 --group-separator="===========================================================================================" "retry" > working_restart.log

working_restart.log

image

image