Chime configuration

88 views
Skip to first unread message

Josh Evans

unread,
Aug 19, 2014, 9:51:03 AM8/19/14
to privat...@googlegroups.com
I'm working on switching my old security system into PrivateEyePi and something that I'd like to do to keep it as unchanged to my wife as possible is to get the Chime to double beep when a door opens. I've got the chime working, I just can't figure out a way to get two quick beeps to happen instead of one beep. 

Any help would be appreciated.

Gadjet Nut

unread,
Aug 19, 2014, 10:00:32 AM8/19/14
to privat...@googlegroups.com
There is a function called SoundChime in the alarmfunctionsr.py file. Replace it with the modified code below.

To edit the file type:

cd /home
sudo nano alarmfunctionsr.py

To save type CTRL-X Y ENTER


def SoundChime():
        if globals.ChimeDuration>0:
                GPIO.setmode(GPIO.BOARD)
                GPIO.setup(globals.ChimeGPIOPin, GPIO.OUT) #Siren pin setup
                GPIO.output(globals.ChimeGPIOPin,True) #Chime on
                time.sleep(globals.ChimeDuration)
                GPIO.output(globals.ChimeGPIOPin,False) #Chime off
                time.sleep(1) #1 second
                GPIO.output(globals.ChimeGPIOPin,True) #Chime on
                time.sleep(globals.ChimeDuration)
                GPIO.output(globals.ChimeGPIOPin,False) #Chime off
 

Josh Evans

unread,
Aug 19, 2014, 10:36:50 PM8/19/14
to privat...@googlegroups.com
thanks, I had been playing with the chime function, just wasn't getting the correct configuration for what I wanted.
Reply all
Reply to author
Forward
0 new messages