Red_Rhino
Member
- Joined
- Feb 23, 2017
- Messages
- 14
- Reaction score
- 1
location of jessie noobs
https://www.homebrewtalk.com/forum/...-taplist-solution.487694/page-80#post-8187169
Thanks so much...FINALLY UP AND RUNNING!
Cheers!!
location of jessie noobs
https://www.homebrewtalk.com/forum/...-taplist-solution.487694/page-80#post-8187169
Excellent, thanks for this. I have some parallel builds going on so will try this on one of them when I get a chance. I ended up downloading an old version of wheezy and managed to get things working and got my code across to the Alamode board. If I move this board to my other pi running Jessie I assume I don't need to reprogram it as it is already on the board?By chance see the notes in flow_monitor.py? (in the python folder).
#The following line is for serial over GPIO
port = '/dev/ttyS0'
#The following line is for serial over USB
#port = '/dev/ttyACM0'
# Edit this line to point to where your rpints install is
poursdir = '/var/www' <-- THIS is wrong as a normal install is /var/www/html
Following might provide debugging help
#Uncomment next for lines for debugging
#print "Pour:"
#print " - Addr : "+hex(MCP_ADDR)
#print " - Pin : "+str(MCP_PIN)
#print " - Count: "+str(POUR_COUNT)
#print " - Ounces: "+str(POUR_COUNT / 165)
#print " - Mliters: "+str(MLITERS)
Also comments in the python\flowmon file
# Change the next 3 lines to suit where you install your script and what you want to call it
DIR=/var/www/python <-- once again normal RPints install is /var/www/html so this line is /var/www/html/python
DAEMON=$DIR/flow_monitor.py
DAEMON_NAME=RPFlowMon
# The process ID of the script when it runs is stored here:
PIDFILE=/var/run/$DAEMON_NAME.pid
Do you have Raspbian Stretch installed? If not follow https://www.raspberrypi.org/documentation/installation/installing-images/ to install
After that Try running this Script on the pi:
https://raw.githubusercontent.com/rtlindne/RaspberryPints/master/util/installRaspberryPints
simply download it to the pi and run the following commands from Bash
chmod +x installRaspberryPints
sudo ./installRaspberryPints
it will prompt you what you want to install, like flowmeters.
If you have trouble, PM me and I will help you out the best I can
I thought so, so should be able to get Jessie going now even with my IDE issues a long as I don't add any taps I am good to go, but I could keep the Wheezy SD card in case. Quick question, will blowing gently through my SF800 be sufficient to trigger a pour? Also has anyone thought about additionally controlling solenoid valves in their tap lines? ie a way to keep teens out of my kegs?Correct. The sketch travels with the board...
Cheers!
Just an FYI...for some reason, when using your script, I needed to modify /var/www/html/sql/schema.sql on line 567 just before the DB was updated
It didn't like the NULL part.
Quick question, will blowing gently through my SF800 be sufficient to trigger a pour? Also has anyone thought about additionally controlling solenoid valves in their tap lines? ie a way to keep teens out of my kegs?
So...now that I have a working Taplist...I would like to get flow meters working...if I am using RandR+ code on RPi3+, then I think some things are missing/wrong as I can't find /var/www/html/python/flow_monitor.py
@day_trippr, I thought I seen that you use a single image that runs on multiple rpi, can you outline what needs to change on the individual cards to keep them working correctly.
I tried just moving the sd card to a different rpi figuring I might just need to modify the ip address but it seems the raspberrypints and or OS knew the sdcard belonged to a different rpi.
Thanks for clarifying. I had seen one of your posts that you have the same code running on all of your rpi and wishful thinking on my part expanded that to mean a single sdcard that could be used in any one.Aside from having to change a whole plethora of per-machine parameters almost all unrelated to RaspberryPints I don't have to do anything special to get the tap list displayed. The things that do apply are my tap list customizations that aren't present in the out-of-the-box R'Pints kit.
That said I can find complaints in mysql logs on machines that were cloned that the database and log files aren't in sync. I've read that can probably be fixed by going through a table dump exercise but as it hasn't affected the operation on any of the machines I've ignored it...
Cheers!
Anyone have a parts list and instructions for adding a motion sensor? I keep finding info on trouble shooting for the sensor, but cant find the initial instructions.
Thanks!
I think flow_monitor.py was the original name I change to FlowMonitor.py to match other files and yes its heavily modified.
I think what you are looking for is in Config.py in my version. Remove the # infront of this line should enable the USB part to talk to UNO.
#The following line is for serial over USB
config['flowmon.port' ] = '/dev/ttyACM0'
I also have the same problem and Ive gone as far as starting over and have the same results.. Ive found a few posts out there about this and it sounds mainly like some sort of power management issue.. Ive tried disabling power management creating a script that constantly pings my router in the background I've tried changing power supplies I ve tried updating the pi firmware... all of my hardwired ethernet pis work fine and this pi has excellent signal where its at when its responsive. Its just very bizare behavior if i reboot the pi the apache page is accesable but for how long who knows.. strange thing is it shows on my routers active connections table and sometimes i cant get my computer to ssh in via putty but sometimes i can ssh into the problem pi from sshing into another pi on my network and then sshing into the problem pi from that... its very bizare behaviorI am running the jessi raspberrypints on a 3B rpi and it seem the on-board wifi goes to sleep or stops working. It is a somewhat random thing it has gone as long as 24hrs without it happening but it has also happened a couple time in an hour. The unit is running just not connection to the wifi. I first had a static IP then switched to dynamic and it still happens.
Anyone have this issue?
I created a cron task to check for internet access by pinging the router and reboot the rpi if it fails. I tried just bringing the wifi down and back up again but that did work when it was truly sleeping. It seems to work but it is a bit of a hack, hoping there is a config fix.
By chance see the notes in flow_monitor.py? (in the python folder).
#The following line is for serial over GPIO
port = '/dev/ttyS0'
#The following line is for serial over USB
#port = '/dev/ttyACM0'
# Edit this line to point to where your rpints install is
poursdir = '/var/www' <-- THIS is wrong as a normal install is /var/www/html
Following might provide debugging help
#Uncomment next for lines for debugging
#print "Pour:"
#print " - Addr : "+hex(MCP_ADDR)
#print " - Pin : "+str(MCP_PIN)
#print " - Count: "+str(POUR_COUNT)
#print " - Ounces: "+str(POUR_COUNT / 165)
#print " - Mliters: "+str(MLITERS)
Also comments in the python\flowmon file
# Change the next 3 lines to suit where you install your script and what you want to call it
DIR=/var/www/python <-- once again normal RPints install is /var/www/html so this line is /var/www/html/python
DAEMON=$DIR/flow_monitor.py
DAEMON_NAME=RPFlowMon
# The process ID of the script when it runs is stored here:
PIDFILE=/var/run/$DAEMON_NAME.pid
Yes a typo sorry, and yes to using the jessie-setup after running the dos2unix on it.I'm going to assume "cd /var/www/python" is a typo as it should be "cd /var/www/html/python" if your R'Pints root has /html/ in the path.
Did you run the jessie-setup file from the Alamode support package? While you don't need that kit to reflash the Alamode, the setup script sets up a persistent relationship between the physical ttyama0 and ttys0.
And don't forget to run the jessie-setup script through dos2unix first...
Cheers!
Sorry to hear you have the same or similar problem, but also good to know I am not alone. It is weird you can reach the stuck unit from a second rpi. Mine also shows up on the router but does not respond to a ping. Supposedly some people can wake up the wifi by plugging in a ethernet cable. Plugging in an ethernet cable brings the ethernet port up and accessible but the wifi is still down for me.I also have the same problem and Ive gone as far as starting over and have the same results.. Ive found a few posts out there about this and it sounds mainly like some sort of power management issue.. Ive tried disabling power management creating a script that constantly pings my router in the background I've tried changing power supplies I ve tried updating the pi firmware... all of my hardwired ethernet pis work fine and this pi has excellent signal where its at when its responsive. Its just very bizare behavior if i reboot the pi the apache page is accesable but for how long who knows.. strange thing is it shows on my routers active connections table and sometimes i cant get my computer to ssh in via putty but sometimes i can ssh into the problem pi from sshing into another pi on my network and then sshing into the problem pi from that... its very bizare behavior
i was going to do an external usb wifi as my next move as i have good luck with one of those on another pi that is in a poor signal spot so it acts as like an external antenna. Good news is tonight on a hunch I took my pi off the keggerator hooked an hdmi tv to my pi and to my surprise lightning bolts on the display meaning low supply power.... i changed to a different micro usb cable and it went away and so far ive stayed connected... fingers crossed i found the culprit as it might have been a bad cable even though i changed to a more powerful 3 amp power supply.Sorry to hear you have the same or similar problem, but also good to know I am not alone. It is weird you can reach the stuck unit from a second rpi. Mine also shows up on the router but does not respond to a ping. Supposedly some people can wake up the wifi by plugging in a ethernet cable. Plugging in an ethernet cable brings the ethernet port up and accessible but the wifi is still down for me.
I have a second one now so I am letting that one run for a while to see if also does the same thing. If is doesn't I will return the first one. Since I got the second one running the first one has not needed rebooting. If both of my units do the same thing I will try an external usb wifi module to see if that works any better.
I am so close with my jessie installation but not quite there.I'm going to assume "cd /var/www/python" is a typo as it should be "cd /var/www/html/python" if your R'Pints root has /html/ in the path.
Did you run the jessie-setup file from the Alamode support package? While you don't need that kit to reflash the Alamode, the setup script sets up a persistent relationship between the physical ttyama0 and ttys0.
And don't forget to run the jessie-setup script through dos2unix first...
Cheers!
I assume you are saying the script isn’t autostarting on boot? I just redid my setup and for some reason I couldn’t get the script to auto start that way anymore either. I think a lot of those methods of autostarting scripts has been depreciated by systemd or something. I had to do this with my brewpi too recently the good news is getting a script to start on boot with systemd is super easy you can find directions here if that helps you. Otherwise the experts here probably know what’s going on.I am so close with my jessie installation but not quite there.
I fixed my serial port greyed out issue using the following
enable_uart=1
$ sudo systemctl stop [email protected]e
$ sudo systemctl disable [email protected]
$ sudo nano /boot/cmdline.txt
delete "console=serial0,15200"
Now if I go to cd /var/www/html/python
python flow_monitor.py
and then blow in my flow meter and refresh the browser I am recording pours.
My autostart file at /home/pi/.config/lxsession/LXDE-pi/autostart has the last line as @usr/bin/python /var/www/html/python/flow_monitor.py so all looks good there. Any ideas?
-------------------
#!/bin/sh
### BEGIN INIT INFO
# Provides: RaspberryPints flow Monitoring
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Put a short description of the service here
# Description: Put a long description of the service here
### END INIT INFO
# Change the next 3 lines to suit where you install your script and what you want to call it
DIR=/var/www/python
DAEMON=$DIR/flow_monitor.py
DAEMON_NAME=RPFlowMon
# This next line determines what user the script runs as.
# Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python.
DAEMON_USER=pi
# The process ID of the script when it runs is stored here:
PIDFILE=/var/run/$DAEMON_NAME.pid
. /lib/lsb/init-functions
do_start () {
log_daemon_msg "Starting system $DAEMON_NAME daemon"
start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON
log_end_msg $?
}
do_stop () {
log_daemon_msg "Stopping system $DAEMON_NAME daemon"
start-stop-daemon --stop --pidfile $PIDFILE --retry 10
log_end_msg $?
}
case "$1" in
start|stop)
do_${1}
;;
restart|reload|force-reload)
do_stop
do_start
;;
status)
status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $?
;;
*)
echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}"
exit 1
;;
esac
exit 0
sudo update-rc.d flowmon defaults
This is awesome, damn I was closer than I realized as I copied flowmon from /var/www/html/python folder earlier but saw no change so undid it so didn’t include in my earlier post. I didn’t think to open the file and check paths, working finally, thanks everyone for your help! Now need to add my motion sensor but didn’t realise when I added to cart that it was a 3 pack, any suggestions on a use for 2 additional motion sensors? seriously though thanks all, i came so close to giving up on the alamode and buying an uno,We went away from using the LXDE autostart process quite a while ago. Somehow I didn't include it in my list of changes.
And I know this procedure is buried somewhere in this thread but failing to find tonight it I'll repost the gist of it here.
Here's a script that will be installed in /etc/init.d and linked through /etc/init.rc
On boot it will auto-launch flow_monitor.py from its home as user 'pi'
Save the following as file named 'flowmon' and put a copy in /etc/init.d/
Change the value of 'DIR' to match your R'Pints installation root (for Jessie and Stretch it should likely be /var/www/html/python)
Code:------------------- #!/bin/sh ### BEGIN INIT INFO # Provides: RaspberryPints flow Monitoring # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Put a short description of the service here # Description: Put a long description of the service here ### END INIT INFO # Change the next 3 lines to suit where you install your script and what you want to call it DIR=/var/www/python DAEMON=$DIR/flow_monitor.py DAEMON_NAME=RPFlowMon # This next line determines what user the script runs as. # Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python. DAEMON_USER=pi # The process ID of the script when it runs is stored here: PIDFILE=/var/run/$DAEMON_NAME.pid . /lib/lsb/init-functions do_start () { log_daemon_msg "Starting system $DAEMON_NAME daemon" start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON log_end_msg $? } do_stop () { log_daemon_msg "Stopping system $DAEMON_NAME daemon" start-stop-daemon --stop --pidfile $PIDFILE --retry 10 log_end_msg $? } case "$1" in start|stop) do_${1} ;; restart|reload|force-reload) do_stop do_start ;; status) status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? ;; *) echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" exit 1 ;; esac exit 0
With the flowmon file in place, execute the following command to install the flowmon service:
Code:sudo update-rc.d flowmon defaults
From the command line you can now:
Check the service: $ sudo /etc/init.d/flowmon status
Stop the service: $ sudo /etc/init.d/flowmon stop
Start the service: $ sudo /etc/init.d/flowmon start
Cheers!
Yup cheers!Never surrender!
So you're all set then?
Cheers!
I have plenty of issues [emoji12]
Anyone else out there with issues?
Cheers!
No issues as such but I am about to start a motion sensor installation. Is there a variation I should have to start the pir_run.py rather than through autostart? I assume so right?
Anyone else out there with issues?
Cheers!
On Stretch it does work, but you need to create the directory/file first, eg:The only thing I'm aware of is the need to use the autostart file located at /home/pi/.config/lxsession/LXDE-pi/autostart
Among the plethora of LXDE session autostart locations that's the one that seems to actually work under Jessie (and Stretch, I believe).
Add the line
sudo python pir_run.py
at the bottom and you should be in business...
Cheers!
sudo mkdir /home/pi/.config/lxsession
sudo mkdir /home/pi/.config/lxsession/LXDE-pi
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --incognito --start-fullscreen localhost
View attachment 609404
This link for the zip file is broken. Any other way to get these scripts?
Enter your email address to join: