Thanks. I did that, too. I used my old rpi and upgraded everything. I have done the rpi- update since my last post. When it starts, the power light comes on. The yellow/green light blinks once, then nothing.
OK, now I am confident my motion detection script enabling HDMI signal enable/disable is working correctly. For the info of anyone not up to date on the thread there have been a few attempts to get the motion sensor to put the monitor in and out of sleep mode when no motion is detected from the sensor. I came up with the script below that has been working for me.
Anyone interested in giving it a try can simply backup the existing pir_run.py script in /home/pi and then paste in the code below.
@ day_trippr. I know you have not had much luck but I am curious is changing the order of the commands would work any better? My theory is changing to another Virtual Terminal before killing the HDMI signal may hopefully save the colour settings for your X session?
Hope this helps others trying to get their monitor in and out of sleep mode via the PIR.
Code:#!/usr/bin/env python import pwd,os import time import RPi.GPIO as GPIO pir_pin = 7 GPIO.setmode(GPIO.BCM) GPIO.setup(pir_pin, GPIO.IN) global start_time start_time=time.time() sleep_threshold = 60 monitor_status = 1 cmd_sleep = 'chvt 6 && tvservice -o' cmd_awake = 'tvservice -p && chvt 7' time.sleep(10) while 1: time.sleep(10) elapsed_time = time.time() - start_time print elapsed_time print monitor_status # turn off monitor after the sleep threshold # monitor_status value avoids turning of HDMI signal if it is already off if elapsed_time > sleep_threshold and monitor_status == 1: print "Turning Off HDMI" monitor_status = 0 os.system(cmd_sleep) # turn monitor back on upon detection if GPIO.input(pir_pin) and monitor_status == 0: os.system(cmd_awake) print "Turning on HDMI" monitor_status = 1 time.sleep(10) start_time=time.time() if GPIO.input(pir_pin): start_time=time.time() print "Resetting elapsed time to keep monitor on while movement detected" time.sleep(10)
This works for me. I changed the sleep_threshold = 1800 to get 30 minutes. It took me a bit to figure out why it was going to sleep as soon as it booted up from a reboot. Now to uninstall xscreensaver. No need for that anymore! This is awesome! (Mostly because now my wife won't complain about the monitor being on all the time)
Thank you for writing this!!!
From the command line, unpack and install it:
pi@raspberrypi ~ $ tar -xvzf alamode-setup.tar.gz
pi@raspberrypi ~ $ cd alamode-setup
pi@raspberrypi ~ $ sudo ./setup
Bash: pi@raspberrypi: command not found
So my pints v2 w/meters finally took a dump. I was running the original v2 install pre hotfix, but now as I'm going to rebuild the system from a fresh noobs install I'm going to install the hotfix. So my question is, have the install instructions on the raspberrypints site been updated to include the hotfix, or do I need to dig back through the thread to find those instructions?
$ sudo /etc/init.d/flowmon start $ ps aux | grep flow_monitor.py
pi 3508 0.0 0.9 8796 4112 ? S 15:35 0:00 /usr/bin/python
/home/pi/raspberrypints/python/flow_monitor.py
pi 3558 0.0 0.1 3548 808 pts/0 S+ 15:43 0:00
grep –color=auto flow_monitor.py
$ sudo /etc/init.d/flowmon start $ ps aux | grep flow_monitor.py
$ sudo /etc/init.d/flowmon start
$ ps aux | grep flow_monitor.py
alias flowstart='sudo /etc/init.d/flowmon start'
alias flowstat='sudo /etc/init.d/flowmon status'
alias flowstop='sudo /etc/init.d/flowmon stop'
[...]So I did a fresh install of NOOBS and when I got to enter the new password for 'Pi' is doesnt let me type anything. So i just skip the step and continue with everything else and restart after completing that screen. When it comes back and goes thru its start up, the screen goes blank. So i click to see if its sleeping and Sketch opens up, so i close the program and then the Pi begins to shut down.[...]
[...]I don't want to format and start over and have it still be effed up. [...]
I have to believe that the step you're skipping is the one that's eventually holding you up.
Why it won't accept input is the baffling part, but it's been almost two years since I did a full Raspian install (I did use the NOOBS kit of the time).
iirc, the default user at the time was 'pi' and the default password was 'raspberry'.
btw, why go through the whole total-rebuild thing?
Did your RPi not want to boot with your originally-working kit?
Cheers!
The message at the top suggests you ran out of space.
Did you expand the filesystem yet?
See raspi-config...
Cheers!
Enter your email address to join: