I’m having a non-reproducible problem with Pimatic. From time to time (happens every 1 to 2 weeks, happened in total for the third time today), a SQLITE_BUSY error is thrown, and Pimatic seems to crash.
The last two times, I just restarted Pimatic and didn’t think too hard about it. But since I wasn’t home this evening and my wife called me about the lights not turning on in the house, I think it’s time to get to the root of the problem (had to use VPN and ssh onto the Pi from the road to restart this time ).
This is the log from today, representing the usual work day (getting up 6:30, some refreshing rules for temperature logging, opening shutters at sunrise) and crashing at 9:19. I finally restarted Pimatic at 18:28 (sudo service pimatic restart
).
pi@raspberrypi:~ $ sudo tail -f -n 200 /home/pi/pimatic-app/pimatic-daemon.log
06:00:01.209 [pimatic] info: rule auen-an-morgens: Außen eingeschaltet
06:33:31.620 [pimatic] info: rule return-ping-when-present: set $ping to 1
06:33:31.711 [pimatic] info: rule morgens-an: Flur eingeschaltet
06:33:32.094 [pimatic] info: rule morgens-an: Bad eingeschaltet
06:33:32.712 [pimatic] info: rule morgens-an: changed color temperature to 153 mired
06:39:17.228 [pimatic] info: rule rolladen-hoch-schlz: ▤ Schlafzimmer hochgefahren
06:56:45.804 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.25
07:00:48.010 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.312
07:03:49.589 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.375
07:18:00.131 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.437
07:22:02.884 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.5
07:36:25.302 [pimatic] info: rule lo-indoor: set $lo-indoor to 21
07:36:25.440 [pimatic] info: rule display-lo-hi-indoor: displaying "LO 21'C HI 21.2'C" on lcd line 2
07:51:57.981 [pimatic] info: rule check-if-somebody-is-at-home: set $ping to 0
07:51:58.647 [pimatic] info: rule sonos-off: Sonos ausgeschaltet
07:51:58.803 [pimatic] info: rule sonos-off: pushbullet message sent successfully
08:02:23.682 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.562
08:05:25.470 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.625
08:06:25.994 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.687
08:26:02.728 [pimatic] info: rule rolladen-hoch-wz: set $verdunkelung to 0
08:26:03.109 [pimatic] info: rule auen-aus-morgens: Außen ausgeschaltet
08:26:03.192 [pimatic] info: rule sonnenaufgang: pushbullet message sent successfully
08:26:03.418 [pimatic] info: rule rolladen-hoch-wz: ▤ Wohnzimmer hochgefahren
08:26:03.720 [pimatic] info: rule rolladen-hoch-az: ▤ Arbeitszimmer (West) hochgefahren
08:26:04.012 [pimatic] info: rule rolladen-hoch-sz: ▤ Sportzimmer hochgefahren
08:26:04.311 [pimatic] info: rule rolladen-hoch-az: ▤ Arbeitszimmer (Süd) hochgefahren
08:46:47.516 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.75
08:54:51.652 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.812
08:56:52.773 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.875
08:58:53.166 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 1.937
09:05:56.950 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 2
09:07:58.477 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 2.062
09:12:01.129 [pimatic] info: rule hi-outdoor: set $hi-outdoor to 2.125
Fatal Error: update "deviceAttribute" set "lastUpdate" = '2017-01-10 09:19:36.569', "lastValue" = 21 where "id" = 31 - SQLITE_BUSY: database is locked
18:28:17.960 2017-01-10 Tuesday
18:28:28.480 [pimatic] info: Starting pimatic version 0.9.38
...
Does anyone have an idea on what could cause this behavior? I’m having problems tracing it back to any change I made recently. Pimatic and all plugins are up to date.
Any help is appreciated, and my wife says hi.