Since the miniserver has only a SD-card as internal storage and it’s prone to wear I’m thinking about logging of data outside the miniserver. Loxone offers so called loggers. One possibility is to set the storage location to a syslog target outside the miniserver. so now the data is in /var/log/syslog of alix.
What I need next is a possibility to store the data over a long time and a possibility to display it.
Possibilities I see:
- Do everything on my own
Since #1 means work and maintenance and #2 & #3 mean quite a big installation on a small system I’m very open to suggestions of something in between.
As mentioned by Alex the link was down. Two things happened:
- The raspberry pi was not running anymore.
- The Internet connection was down.
For the second problem I don’t have a solution yet. For the not running raspberry pi there might be one:
The internal watchdog of the raspberry pi. It can be activated by loading the module, making sure it gets reloaded after a restart and installing the triggering software.
$ sudo modprobe bcm2708_wdog
$ echo "bcm2708_wdog" | sudo tee -a /etc/modules
$ sudo apt-get install watchdog
Configuration happens in the file
by uncommenting the following lines:
watchdog-device = /dev/watchdog
max-load-1 = 24
This is a very basic configuration and it will restart the raspberry pi in case the load is above 24 for a 1 minute interval.
Activation of the demon can be done like this:
$ sudo service watchdog start
Specific in my case is the additional option to check whether the file, that was not working as mentioned above, is written to on a regular basis. This can be achieved by adding the following lines in the configuration:
file = /data/solar/solar.touch.start
change = 300
file = /data/solar/solar.touch.end
change = 600
Each “file” entry specifies a file that will be checked by the watchdog whether it’s been touched and the “change” entry specifies the time that the file can stay untouched before the watchdog will not be triggered any more and by that lead to a system reset. The first file is touched at the start of the script, the second one at the end. So in case the script for updating the yield data is not called any more the system will be reset after 5 minutes. If the script is started, but does not finish properly it’ll be reset after 10 minutes.
Time will tell how reliable the watchdog is.
After a long break I’ve started logging the PVIs in my father’s house again. The main reason for reactivating the scripts was that the two PVIs have shown different yield numbers at the end of the day. Further investigation has shown that the internal clock of one of the PVIs was wrong, so at around noon the yield counter was reset, which of course led to different results. Anyway the graphs are online now. Currently the graphs are generated using google charts. Hints for an alternative are welcome.