Platform information:
Hardware: RBP4
OS: OH
Java Runtime Environment: Java 8
openHAB version: 2.5.9
I do have basically two problems.
The first problem is, that it seems that openhab restarts every 45 minutes
2020-11-02 23:59:50.366 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_house.py'
2020-11-02 23:59:55.549 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_heatpump.py'
2020-11-03 00:00:28.031 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.items'
2020-11-03 00:00:28.121 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Systemair.items'
2020-11-03 00:00:28.142 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'House_Electricity.items'
2020-11-03 00:00:28.174 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Sma_Inverter.items'
2020-11-03 00:00:28.198 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Heatpump_Electricity.items'
2020-11-03 00:00:28.225 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Total_Electricity.items'
2020-11-03 00:00:28.835 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2020-11-03 00:00:29.412 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'
2020-11-03 00:00:29.612 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'systemair_modbus.things'
2020-11-03 00:00:29.641 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'sma_inverter_modbus.things'
2020-11-03 00:00:29.674 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'my.things', using it anyway:
Provide a thing type ID and a thing ID in this format:
<thingTypeId> <thingId>
2020-11-03 00:00:29.677 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.things'
2020-11-03 00:00:33.029 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.rules'
2020-11-03 00:00:33.779 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'heatpump_electricity_calculation.rules'
2020-11-03 00:00:34.590 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'total_electricity_calculation.rules'
2020-11-03 00:00:34.935 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'house_electricity_calculation.rules'
2020-11-03 00:00:35.073 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'openhab_backup.rules'
2020-11-03 00:00:35.344 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2020-11-03 00:00:35.481 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'systemair_modbus.things' is either empty or cannot be parsed correctly!
2020-11-03 00:00:36.517 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.27:8080
2020-11-03 00:00:36.518 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.27:8443
2020-11-03 00:00:38.339 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'localhost' with clientid 60592de3-0a50-4726-a569-ffa5931506ff
2020-11-03 00:00:38.570 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Modbus manager activated
2020-11-03 00:00:40.668 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2020-11-03 00:00:50.114 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_heatpump.py'
2020-11-03 00:00:50.118 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_house.py'
2020-11-03 00:00:52.253 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Total Electricity Consumption': Could not cast NULL to java.lang.Number; line 11, column 82, length 39
2020-11-03 00:01:00.015 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_heatpump.py'
2020-11-03 00:01:00.022 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_house.py'
---
2020-11-03 00:44:33.328 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_heatpump.py'
2020-11-03 00:45:07.511 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.items'
2020-11-03 00:45:07.599 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Systemair.items'
2020-11-03 00:45:07.621 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'House_Electricity.items'
2020-11-03 00:45:07.651 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Sma_Inverter.items'
2020-11-03 00:45:07.674 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Heatpump_Electricity.items'
2020-11-03 00:45:07.699 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Total_Electricity.items'
2020-11-03 00:45:08.281 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2020-11-03 00:45:08.827 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'
2020-11-03 00:45:09.020 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'systemair_modbus.things'
2020-11-03 00:45:09.050 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'sma_inverter_modbus.things'
2020-11-03 00:45:09.084 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'my.things', using it anyway:
Provide a thing type ID and a thing ID in this format:
<thingTypeId> <thingId>
2020-11-03 00:45:09.086 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.things'
2020-11-03 00:45:11.245 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2020-11-03 00:45:12.668 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.rules'
2020-11-03 00:45:13.449 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'heatpump_electricity_calculation.rules'
2020-11-03 00:45:14.307 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'total_electricity_calculation.rules'
2020-11-03 00:45:14.763 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'house_electricity_calculation.rules'
2020-11-03 00:45:14.810 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'openhab_backup.rules'
2020-11-03 00:45:15.060 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'systemair_modbus.things' is either empty or cannot be parsed correctly!
2020-11-03 00:45:16.153 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.27:8080
2020-11-03 00:45:16.155 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.27:8443
2020-11-03 00:45:18.003 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'localhost' with clientid 757ac3b3-1915-4f6a-915e-05c879305c6f
2020-11-03 00:45:18.224 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Modbus manager activated
2020-11-03 00:45:20.275 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2020-11-03 00:45:30.113 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_heatpump.py'
2020-11-03 00:45:30.119 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_house.py'
2020-11-03 00:45:31.874 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Total Electricity Consumption': Could not cast NULL to java.lang.Number; line 11, column 82, length 39
2020-11-03 00:45:40.013 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_heatpump.py'
2020-11-03 00:45:40.026 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_house.py'
2020-11-03 00:45:50.004 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_heatpump.py'
2020-11-03 00:45:50.008 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python
---
2020-11-03 01:29:00.922 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_house.py'
2020-11-03 01:29:24.428 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.items'
2020-11-03 01:29:24.510 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Systemair.items'
2020-11-03 01:29:24.533 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'House_Electricity.items'
2020-11-03 01:29:24.565 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Sma_Inverter.items'
2020-11-03 01:29:24.587 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Heatpump_Electricity.items'
2020-11-03 01:29:24.611 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Total_Electricity.items'
2020-11-03 01:29:25.182 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2020-11-03 01:29:25.736 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'
2020-11-03 01:29:25.950 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'systemair_modbus.things'
2020-11-03 01:29:25.979 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'sma_inverter_modbus.things'
2020-11-03 01:29:26.012 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'my.things', using it anyway:
Provide a thing type ID and a thing ID in this format:
<thingTypeId> <thingId>
2020-11-03 01:29:26.015 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.things'
2020-11-03 01:29:28.107 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2020-11-03 01:29:29.540 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.rules'
2020-11-03 01:29:30.338 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'heatpump_electricity_calculation.rules'
2020-11-03 01:29:31.187 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'total_electricity_calculation.rules'
2020-11-03 01:29:31.632 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'house_electricity_calculation.rules'
2020-11-03 01:29:31.679 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'openhab_backup.rules'
2020-11-03 01:29:31.909 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'systemair_modbus.things' is either empty or cannot be parsed correctly!
2020-11-03 01:29:32.952 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.27:8080
2020-11-03 01:29:32.954 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.27:8443
2020-11-03 01:29:34.730 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'localhost' with clientid 5f1eaabf-bcf7-4d05-be21-4e667e7e55b5
2020-11-03 01:29:35.040 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Modbus manager activated
2020-11-03 01:29:37.237 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2020-11-03 01:29:44.676 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_heatpump.py'
2020-11-03 01:29:44.681 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_house.py'
2020-11-03 01:29:48.715 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Total Electricity Consumption': Could not cast NULL to java.lang.Number; line 11, column 82, length 39
2020-11-03 01:29:49.689 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Total Electricity Consumption': Could not cast NULL to java.lang.Number; line 17, column 76, length 39
2020-11-03 01:29:49.704 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Total Electricity Consumption': Could not cast NULL to java.lang.Number; line 17, column 76, length 39
2020-11-03 01:29:50.007 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_heatpump.py'
2020-11-03 01:29:50.010 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '/usr/bin/python /etc/openhab2/scripts/smartmeter_house.py'
The second problem is, that I do have a cronjob at 00:00 o clock and unfortunately it seems that exactly at this time one of the restarts mentioned above happened.
So the items did not get persisted.
Strategies {
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
}
Items {
Total_Todays_Electricity_Consumption,
Total_Todays_Electricity_Consumption_PV,
Total_Todays_Electricity_Consumption_Obtain,
Total_Todays_Electricity_Supply,
Smartmeter_Heatpump_Total_Consumption,
Smartmeter_Heatpump_Total_Supply,
Smartmeter_House_Total_Consumption,
Smartmeter_House_Total_Supply,
Heatpump_Today_Consumption,
Heatpump_Today_Consumption_PV,
Heatpump_Today_Consumption_Obtain,
House_Today_Consumption,
House_Today_Consumption_PV,
House_Today_Consumption_Obtain,
SMA_Inverter_Today_Production,
SMA_Inverter_Total_Production: strategy = everyDay, restoreOnStartup
}
So my questions are:
- How can I solve the restarting problem.
- What to to if a restart or a system crash happens exactly at the time a cronjob should get executed - is there any smart way to handle this? E.g. check if cronjob has been executed and if not, execute it a bit later…?
Thank you very much in advance and kind regards
Alex