Hi all,
I've read maybe half of the thread in searching for help and learning about this project, but so much has changed with package support and the awesome maintenance to keep new installs going. I have a Pi3B+ (Raspbian Lite with control via SSH/X11) with fresh install of RPints,
@RandR+ version with flowmeters. I have one Digiten flowmeter I got on Amazon just to test things out, and running it off of a Arduino Mega 2560 R3 I had lying around from from an old project (
RFLink Gateway) with flowmeter on pin 8. Mega is connected to Pi with USB cable and selected USB from install choices on multiple installs. I have Rpints up and running, DB set up, beerXML imported and test keg running. When I start the FlowMon service this is my log:
Code:
pi@raspints:/ $ sudo /etc/init.d/flowmon start
[ ok ] Starting flowmon (via systemctl): flowmon.service.
pi@raspints:/ $ tail -f /var/log/rpints.log
2020-07-06 21:38:37 RPINTS: valve update: RPU:VALVE:0=0
2020-07-06 21:38:37 RPINTS: valve update: RPU:VALVE:1=0
2020-07-06 21:38:37 RPINTS: valve update: RPU:VALVE:2=0
2020-07-06 21:38:37 RPINTS: valve update: RPU:VALVE:3=0
2020-07-06 21:38:37 RPINTS: Could not import RFID Reader, RFID disabled. Assuming SPI not installed/configured
2020-07-06 21:38:39 RPINTS: starting setup...
2020-07-06 21:38:39 RPINTS: Ino new than Hex. manual upload assumed
2020-07-06 21:38:39 RPINTS: starting WS server
2020-07-06 21:38:39 RPINTS: starting device monitors...
2020-07-06 21:38:39 RPINTS: starting command server
2020-07-06 21:38:39 RPINTS: resetting Arduino
2020-07-06 21:38:39 RPINTS: starting fan control
2020-07-06 21:38:39 RPINTS: Fan Control fanControl1 is Running
2020-07-06 21:38:39 RPINTS: Not Configured to run Fan
2020-07-06 21:38:40 RPINTS: waiting for Arduino to come alive
2020-07-06 21:38:41 RPINTS: Arduino alive...
2020-07-06 21:38:41 RPINTS: getting config data for Arduino
2020-07-06 21:38:41 RPINTS: Arduino config, about to send: C:4:8:0:0:0:0:300:200:30:250:0:0:1|
2020-07-06 21:38:41 RPINTS: Waiting for Config Response
2020-07-06 21:38:41 RPINTS: Arduino says: C:4:8:0:0:0:0:300:200:30:250:0:0:1|
2020-07-06 21:38:41 RPINTS: listening to Arduino
2020-07-06 21:38:41 RPINTS: Sending Status;NOTOK;-1;0;0;0;0;0;|
I have tried powering the Arduino with its own power (7.5v), changing the baud in the .ino and config.py to 57600 and back, changing USB cables and ports, but I am seriously grasping at straws now. Response from Arduino is endless StatusCheck; messages, but for every 2 good messages there are maybe 6-10 incomplete messages:
Code:
StatusCheck;
tauCheck;
StatusCheck;
Satttshc;
tttatshek
ttuCettusCek
SauCec;
tttttshck
tattatttshc;
tatshSatsCek;
StatusCheck;
StatusCheck;
ttttttttttSttuCheck;
StatusCheck;
StatusCheck;
ttSatshec;
StatusCheck;
StatusCheck;
StatusCheck;
After that the Arduino puts on a good light show between the AREF/TX/RX lights and the FlowMon log indicates:
Code:
2020-07-06 21:57:22 RPINTS: alive
2020-07-06 21:57:22 RPINTS: Arduino was restarted, restart flowmonitor
2020-07-06 21:57:22 RPINTS: closing serial connection to Arduino...
2020-07-06 21:57:23 RPINTS: flowmonitor aborted, restarting...
2020-07-06 21:57:23 RPINTS: resetting Arduino
2020-07-06 21:57:24 RPINTS: waiting for Arduino to come alive
2020-07-06 21:57:25 RPINTS: Arduino alive...
2020-07-06 21:57:25 RPINTS: getting config data for Arduino
2020-07-06 21:57:25 RPINTS: Arduino config, about to send: C:4:8:0:0:0:0:300:200:30:250:0:0:1|
2020-07-06 21:57:25 RPINTS: Waiting for Config Response
2020-07-06 21:57:25 RPINTS: Arduino says: C:4:8:0:0:0:0:300:200:30:250:0:0:1|
2020-07-06 21:57:25 RPINTS: listening to Arduino
2020-07-06 21:57:25 RPINTS: Sending Status;NOTOK;-1;0;0;0;0;0;|
And finally flowmonitor gets aborted, restarting, and resets the Arduino where it waits for the Arduino to come alive again until intervention.
View attachment 688331
Does the Mega 2560 work for this project? Can I use an ESP32 or ESP8266 for serial that I have lying around? Would I try connecting via serial with level shifters (have those too)? I thought the USB would be the easiest way to go here, but can't figure out what's going wrong. What's giving the NOTOK command?