Posts: 37
Threads: 17
Joined: Mar 2022
Reputation:
0
Hello,
Some of my LMs reboot unexpectedly. No error seem to happen in the Errors log. I have a KNX object that counts the restart of the LM and I can see that it restarts about 3 times a day. I have another object used for storing the value of 15-minute average CPU load, and I don't see this load growing abnormally before the unexpected restarts.
When I go into system config > Status > System logs, I can only see the system logs since the last restart, so I can't know what happened just before the restart.
Would there be any way to understand what caused the LM to reboot?
Posts: 4721
Threads: 24
Joined: Aug 2017
Reputation:
214
What about memory?
------------------------------
Ctrl+F5
Posts: 37
Threads: 17
Joined: Mar 2022
Reputation:
0
I don't know. I will try to write RAM usage into a KNX object at regular intervals and see if there are memory leaks happening. Thanks for the suggestion.
Posts: 7836
Threads: 42
Joined: Jun 2015
Reputation:
450
If you have an unexpected reboot due to the out-of-memory condition then the system won't be able save last object values. If you have multiple LMs then you can monitor one LM from another by exchanging values via KNX/IP.
Posts: 167
Threads: 20
Joined: Apr 2017
Reputation:
2
25.02.2023, 11:10
(This post was last modified: 25.02.2023, 11:20 by Dré.)
I have a simulair problem with a Wiser.
I don't see any high CPU or memory.
I sent me CPU load to Influx I have every day 1 higher load of 22% at 12am because for saving energy values.
But that is not the time of the problems.
my current value's
CPU/IO: 0.18 0.08 0.02, Memory: 22%, KNX/TP: OK
I have 2 Wiser @home.
first I was testing with 2 of the same programs, but I disabled all script at the 2nd Wiser, these didn't show any problem. (1st show restarts).
Then I run the 2nd Wiser with all scripts run and both show restarts (not at the same time, but simulair).
Now I'm so far it looks like it one of the script who run for raining and or wind.
But these scripts don't create a high CPU. (as far I see)
if it is desired, I could share the 5 scripts.
Posts: 120
Threads: 24
Joined: Sep 2021
Reputation:
2
Hi @all,
I also experiencing system reboots every 10-15 days but I changed nothing in the setup or scripting. Load and memory is between 0.3-0.7 and 40% memory.
How can I find the reason for the restart? Is there a log file stored somewhere? In the fault logs nothing is being raised.
Many thanks for your help!
Best regards
Steffen
Posts: 4721
Threads: 24
Joined: Aug 2017
Reputation:
214
Look for any errors, big amount of logs. It will be very hard to figure it out if it happens so rarely
------------------------------
Ctrl+F5
Posts: 120
Threads: 24
Joined: Sep 2021
Reputation:
2
Hi Daniel,
many thanks for your reply. I watching the memory usage and over the time it rises day by day slightly starting from 40% to 63% today within 7 days.
That's why I used the system load app to analyze the running processes regarding their memory use. And on top of it is the following resident script which is running every 60s and should use: 26880.00MB at least this is shown in the app. I have no idea why this is so memory consuming. Can you please give me your thoughts about it and ideas to improve?
Many thanks for your help!
Best Regards
Steffen
Code: -- API Doku: https://github.com/evcc-io/evcc/blob/master/api/api.go
--https://jsonformatter.org/json-parser
require('user.round')
http = require('socket.http')
ltn12 = require('ltn12')
require('json')
--- Abfrage Health Check EVCC OK = alles in Ordnung
res, code = http.request({
url = 'http://192.168.178.96:7070/api/health',
method = 'GET',
})
if code == 200
then
evcc_health_status = 1 -- i.O.
-- Abfrage Stati
res, code = http.request({
url = 'http://192.168.178.96:7070/api/state',
method = 'GET',
})
--log(res)
data = json.pdecode(res)
--Carport
mode2 = data.result.loadpoints[1].mode --Lademodus "off"/"now"/"minpv"/"pv"
charging_state2 = data.result.loadpoints[1].charging -- Ladevorgang aktiv
plug_connected2 = data.result.loadpoints[1].connected -- Ladekabel verbunden
charging_plan_activ2 = data.result.loadpoints[1].planActive -- Ladetimer gesetzt
charging_power2 = data.result.loadpoints[1].chargePower -- aktuelle Ladeleistung
charged_energy2 = data.result.loadpoints[1].chargedEnergy -- geladende Energiemenge
car_soc2 = data.result.loadpoints[1].vehicleSoc -- Fahrzeug SOC
if car_soc2 == nil then car_soc2 = 0 end
vehicleRange2 = data.result.loadpoints[1].vehicleRange -- Fahrzeug Reichweite
chargePower2 = data.result.loadpoints[1].chargePower -- Ladeleistung
chargedEnergy2 = data.result.loadpoints[1].chargedEnergy -- Energie letzte Ladung
zaehler = grp.getvalue('12/2/4')
grp.checkupdate('12/2/2', chargePower2)
grp.checkupdate('12/2/3', chargedEnergy2)
zaehler = zaehler + chargePower2/60
grp.checkupdate('12/2/4', zaehler)
--minPV einschalten um frühzeitig anfangen zu laden
pvleistung = grp.getvalue ('43/3/1')
pvprognose = grp.getvalue ('43/4/26')
-- log(pvleistung, pvprognose, mode2, plug_connected2)
if mode2 ~= "now" and
plug_connected2 == true and
pvleistung > 5000 and
pvprognose > 20 then
grp.checkwrite('12/0/4', true)
res, code = http.request({
url = 'http://192.168.178.96:7070/api/loadpoints/1/mode/minpv',
method = 'POST',
})
elseif
mode2 ~= "now" and
pvprognose < 12 then
res, code = http.request({
url = 'http://192.168.178.96:7070/api/loadpoints/1/mode/pv',
method = 'POST',
})
end
-- Wallboxen Testeinschalten um Kabel gesteckt zu erkennen und ggf. Mindestreichweite herzustellen
now = os.date('*t')
hour = now.hour
-- Carport
if
(hour == 6 and minute == 1) or
charging_plan_activ2 == true
then
--grp.checkwrite('12/0/4', true)
-- res, code = http.request({
-- url = 'http://192.168.178.96:7070/api/loadpoints/1/mode/pv',
-- method = 'POST',
-- })
end
-- Wallboxen einschalten um 14:00 Uhr wegen Nachhausekommen
now = os.date('*t')
hour = now.hour
-- Carport
if
(hour == 14 and minute == 1)
then
-- grp.checkwrite('12/0/4', true)
-- res, code = http.request({
-- url = 'http://192.168.178.96:7070/api/loadpoints/1/mode/pv',
-- method = 'POST',
-- })
end
-- Wallboxen einschalten wenn wir nach Hause kommen
p_handy_steffen = grp.getvalue ('44/1/8')
p_handy_andrea = grp.getvalue ('44/1/9')
-- Carport
if
p_handy_steffen == true or
p_handy_andrea == true
then
-- grp.checkwrite('12/0/4', true)
-- res, code = http.request({
-- url = 'http://192.168.178.96:7070/api/loadpoints/1/mode/pv',
-- method = 'POST',
-- })
end
-- Herstellen Mindestreichweite von 80 km
notladen_wb2 = grp.getvalue ('12/3/1')
-- Carport
if
plug_connected2 == true and
car_soc2 > 1 and
vehicleRange2 < 90
then
-- res, code = http.request({
-- url = 'http://192.168.178.96:7070/api/loadpoints/1/mode/now',
-- method = 'POST',
-- })
grp.checkwrite('12/3/1', true) -- Notladen aktivieren
elseif
plug_connected2 == true and
car_soc2 > 1 and
vehicleRange2 > 80 and
notladen_wb2 == true
then
-- res, code = http.request({
-- url = 'http://192.168.178.96:7070/api/loadpoints/1/mode/pv',
-- method = 'POST',
-- })
grp.checkwrite('12/3/1', false) -- Notladem deaktivieren
end
-- Wallboxen ausschalten
now = os.date('*t')
hour = now.hour
minute = now.min
solar_forecast_today = grp.getvalue ('43/4/26')
st_wb_carport = grp.getvalue('12/0/5')
-- Carport
if
(charging_plan_activ2 == false and -- Ausschalten wenn nicht gesteckt und keine Ladetimer gesetzt
plug_connected2 == false and
(hour >= 19 or hour == 7 ))
or
(charging_state2 == true and
car_soc2 == 100) -- Ausschalten wenn Auto voll geladen ist
or
(charging_state2 == false and
solar_forecast_today < 4) and
st_wb_carport == true
then
-- res, code = http.request({
-- url = 'http://192.168.178.96:7070/api/loadpoints/1/mode/off',
-- method = 'POST',
-- })
-- os.sleep(55)
-- grp.checkwrite('12/0/4', false)
end
else
evcc_health_status = 0 -- n.i.O.
--grp.checkwrite('12/0/4', false) --Wallbox ausschalten
-- grp.checkwrite('12/0/0', false) --Wallbox ausschalten
grp.checkwrite('12/2/1', 'evcc Fehler')
grp.checkwrite('12/2/0', 'evcc Fehler')
end
-- Status für die Schalter Küche aufbereiten und senden
--Carport:
if plug_connected2 == true then plug_connected2 = "y" else plug_connected2 = "n" end
st_schalter_wallbox = mode2.."/"..plug_connected2.."/"..round(car_soc2,0).."/"..round(charging_power2/1000,1)
grp.checkwrite('12/2/1', st_schalter_wallbox)
--log(res, code, evcc_health_status, mode2, charging_state2, plug_connected2,charging_plan_activ2, charging_power2, charged_energy2, car_soc2, vehicleRange2)
Posts: 4721
Threads: 24
Joined: Aug 2017
Reputation:
214
Try using scheduled script instead of resident.
------------------------------
Ctrl+F5
Posts: 1773
Threads: 6
Joined: Jul 2015
Reputation:
118
Also the user lib round is not needed (no idea what the content is) but you can simply use math.round(...)
Posts: 120
Threads: 24
Joined: Sep 2021
Reputation:
2
Hi Daniel,
hi Erwin,
many thanks for your reply.
I switched four resident scripts to scheduled script and in the "system load app" I saw a massive reduction in the memory consumption by 30%.
BUT when I look in the configurator app bottom right the "memory" value was unchanged. What is this value referring to? How can I look inside this value, which process/script is consuming what amount of memory?
Many thanks for your help!
Best Regards
Steffen
Posts: 4721
Threads: 24
Joined: Aug 2017
Reputation:
214
System Load app is the best tool to look on individual processes.
------------------------------
Ctrl+F5
|