This is so very very frustrating. Works for a few days and then stops again. Im back to getting this error message and don't know why.
2020-05-20 18:46:57 RPINTS: No such device - Sleeping to try again
2020-05-20 18:47:07 RPINTS: valve update: RPU:VALVE:0=0
2020-05-20 18:47:07 RPINTS: valve update: RPU:VALVE:1=0
2020-05-20 18:47:07 RPINTS: valve update: RPU:VALVE:2=0
2020-05-20 18:47:07 RPINTS: valve update: RPU:VALVE:3=0
2020-05-20 18:47:07 RPINTS: Could not import RFID Reader, RFID disabled. Assuming SPI not installed/configured
2020-05-20 18:47:09 RPINTS: starting setup...
2020-05-20 18:47:09 RPINTS: resetting alamode to try to force it to listen to us...
2020-05-20 18:47:11 RPINTS: giving it a short break to wake up again...
2020-05-20 18:47:13 RPINTS: reflashing Arduino via:
/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -patmega328p -calamode -P/dev/ttyACM0 -b115200 -D -Uflash:w:/var/www/html//arduino/raspberrypints/raspberrypints.cpp.hex:i
RPINTS: reflashing Arduino failed, moving on anyways, error was: Command '/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -patmega328p -calamode -P/dev/ttyACM0 -b115200 -D -Uflash:w:/var/www/html//arduino/raspberrypints/raspberrypints.cpp.hex:i' returned non-zero exit status 1
2020-05-20 18:47:13 RPINTS:
2020-05-20 18:47:13 RPINTS: starting WS server
2020-05-20 18:47:13 RPINTS: starting device monitors...
2020-05-20 18:47:13 RPINTS: starting command server
2020-05-20 18:47:13 RPINTS: resetting Arduino
2020-05-20 18:47:13 RPINTS: starting fan control
2020-05-20 18:47:13 RPINTS: Fan Control fanControl1 is Running
2020-05-20 18:47:14 RPINTS: Not Configured to run Fan
2020-05-20 18:47:15 RPINTS: serial connection stopped...
2020-05-20 18:47:15 RPINTS: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
2020-05-20 18:47:16 RPINTS: flowmonitor aborted, restarting...
2020-05-20 18:47:16 RPINTS: resetting Arduino
2020-05-20 18:47:17 RPINTS: serial connection stopped...
2020-05-20 18:47:17 RPINTS: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
2020-05-20 18:47:31 RPINTS: flowmonitor aborted, restarting...
2020-05-20 18:47:31 RPINTS: resetting Arduino
2020-05-20 18:47:32 RPINTS: serial connection stopped...
2020-05-20 18:47:32 RPINTS: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
2020-05-20 18:47:33 RPINTS: flowmonitor aborted, restarting...
2020-05-20 18:47:34 RPINTS: resetting Arduino
2020-05-20 18:47:36 RPINTS: serial connection stopped...
2020-05-20 18:47:36 RPINTS: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
2020-05-20 18:47:37 RPINTS: flowmonitor aborted, restarting...
2020-05-20 18:47:37 RPINTS: resetting Arduino
2020-05-20 18:47:38 RPINTS: serial connection stopped...
2020-05-20 18:47:38 RPINTS: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
2020-05-20 18:47:39 RPINTS: flowmonitor aborted, restarting...
2020-05-20 18:47:39 RPINTS: resetting Arduino
EDIT- So I shut everything down for a few minutes. Rebooted the pi and Arduino and then it works and this is the log file.
2020-05-20 18:52:55 RPINTS: No such device - Sleeping to try again
2020-05-20 18:53:02 RPINTS: valve update: RPU:VALVE:0=0
2020-05-20 18:53:02 RPINTS: valve update: RPU:VALVE:1=0
2020-05-20 18:53:02 RPINTS: valve update: RPU:VALVE:2=0
2020-05-20 18:53:02 RPINTS: valve update: RPU:VALVE:3=0
2020-05-20 18:53:02 RPINTS: Could not import RFID Reader, RFID disabled. Assuming SPI not installed/configured
2020-05-20 18:53:04 RPINTS: starting setup...
2020-05-20 18:53:04 RPINTS: resetting alamode to try to force it to listen to us...
2020-05-20 18:53:06 RPINTS: giving it a short break to wake up again...
2020-05-20 18:53:08 RPINTS: reflashing Arduino via:
/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -patmega328p -calamode -P/dev/ttyACM0 -b115200 -D -Uflash:w:/var/www/html//arduino/raspberrypints/raspberrypints.cpp.hex:i
2020-05-20 18:53:13 RPINTS:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f
avrdude: reading input file "/var/www/html//arduino/raspberrypints/raspberrypints.cpp.hex"
avrdude: writing flash (11866 bytes):
Writing | ################################################## | 100% 2.29s
avrdude: 11866 bytes of flash written
avrdude: verifying flash memory against /var/www/html//arduino/raspberrypints/raspberrypints.cpp.hex:
avrdude: load data flash data from input file /var/www/html//arduino/raspberrypints/raspberrypints.cpp.hex:
avrdude: input file /var/www/html//arduino/raspberrypints/raspberrypints.cpp.hex contains 11866 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.74s
avrdude: verifying ...
avrdude: 11866 bytes of flash verified
avrdude done. Thank you.
2020-05-20 18:53:13 RPINTS: starting WS server
2020-05-20 18:53:13 RPINTS: starting device monitors...
2020-05-20 18:53:13 RPINTS: starting command server
2020-05-20 18:53:13 RPINTS: resetting Arduino
2020-05-20 18:53:13 RPINTS: starting fan control
2020-05-20 18:53:13 RPINTS: Fan Control fanControl1 is Running
2020-05-20 18:53:13 RPINTS: Not Configured to run Fan
2020-05-20 18:53:14 RPINTS: 1Wire Temperature Thread 1 is Running
2020-05-20 18:53:14 RPINTS: waiting for Arduino to come alive
2020-05-20 18:53:16 RPINTS: Arduino alive...
2020-05-20 18:53:16 RPINTS: getting config data for Arduino
2020-05-20 18:53:16 RPINTS: Arduino config, about to send: C:4:3:4:5:6:0:200:25:25:50:0:0:1|
2020-05-20 18:53:16 RPINTS: Waiting for Config Response
2020-05-20 18:53:16 RPINTS: Arduino says: C:4:3:4:5:6:0:200:25:25:50:0:0:1|
2020-05-20 18:53:16 RPINTS: listening to Arduino
2020-05-20 18:53:16 RPINTS: Sending Status;NOTOK;-1;0;0;0;0;0;|
2020-05-20 19:46:22 RPINTS: got a update: U;-1;3;51
2020-05-20 19:46:22 RPINTS: Sending Status;NOTOK;-1;0;0;0;0;0;|
2020-05-20 19:46:25 RPINTS: got a pour: P;-1;3;88
Pourpour on pin: 3, count: 88, conversion: 575, amount: 0.15304347826087, amountUnit: ml, user: N/A
2020-05-20 19:46:25 RPINTS: restarting fan timer after pour
2020-05-20 19:46:25 RPINTS: count update: RPU:FLOW:3=88:-1
2020-05-20 19:46:25 RPINTS: Reset Tap during loop Pin 3 0
2020-05-20 19:46:26 RPINTS: Sending Status;NOTOK;-1;0;0;0;0;0;|
EDIT-2. So 24 hrs later stopped working and this was the log lines straight after the ones above
('Unexpected error:', <class 'serial.serialutil.SerialException'>)
Traceback (most recent call last):
File "/var/www/html/python/FlowMonitor.py", line 269, in monitor
msg = self.readline_notimeout()
File "/var/www/html/python/FlowMonitor.py", line 74, in readline_notimeout
c = self.arduino.read(1)
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 501, in read
'device reports readiness to read but returned no data '
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2020-05-20 20:11:44 RPINTS: flowmonitor aborted, restarting...
2020-05-20 20:11:44 RPINTS: NOT resetting Arduino
2020-05-20 20:11:45 RPINTS: waiting for Arduino to come alive
2020-05-20 20:11:45 RPINTS: serial connection stopped...
2020-05-20 20:11:45 RPINTS: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2020-05-20 20:11:46 RPINTS: flowmonitor aborted, restarting...
2020-05-20 20:11:46 RPINTS: resetting Arduino
2020-05-20 20:11:47 RPINTS: serial connection stopped...
2020-05-20 20:11:47 RPINTS: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
2020-05-20 20:11:48 RPINTS: flowmonitor aborted, restarting...
2020-05-20 20:11:48 RPINTS: resetting Arduino
Then every now and again this...
2020-05-21 17:47:29 RPINTS: resetting Arduino
[2020-05-21 17:47:29,808] [ERROR] mod_pywebsocket.standalone.WebSocketServer: Exception in processing request from: ('::1', 55246, 0, 0)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 610, in process_request
t.start()
File "/usr/lib/python2.7/threading.py", line 736, in start
_start_new_thread(self.__bootstrap, ())
error: can't start new thread
2020-05-21 17:47:31 RPINTS: serial connection stopped...
2020-05-21 17:47:31 RPINTS: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'
2020-05-21 17:47:32 RPINTS: flowmonitor aborted, restarting...
2020-05-21 17:47:32 RPINTS: resetting Arduino
Surely this is enough to tell what the hell is going on here??