Hello,
I'm quit new in this world and get my skills up doing programming the last time about 30 years ago.
I bought a B2.
I installed everthing and the system is working fine at an lan connection and SSH
I connect a smart energy meter with a P1 port to USB0.
This p1 port sends every 10 seconds a bunch of information about energy usage
I did write sw in Python to read the USB port and do write the selected data from the USB0 port in an my made format into an log file and rrdtool data base.
I activated a crontab running this program every 5 minutes.
Beside this I created a website on the raspberry pi showing the data bij text and rrdgraphs.
So far so good everything is running fine and smoothly.
But........
Every day roughly after about 24-25 hr running the Python program isn´t reading the USB port for about 15 a 20 minutes and not filling the logfile and rrdtool database. Or I find out is reading the USB port but the data is corrupted.
After about 15 a 20 minutes the programm is running fine again.
Somebody ideas what is causing this problem?
maybe something with stack overflow or buffers full?
help is appriciated
It is trying to read the
EDIT:
I do have an addition :
The python program is also writing the data to the screen every 5 minutes. By using the crontab command, the writing to the screen is not happening. Can this causing a kind off stack/buffer overflow, because the writing data is stored somewhere, by not displaying?