I recently found the SIP program. Really complete program with all functionalities you might wish for!
Using a raspberry B+ and connecting both a 4 and 8 relay board with relay board plugin - and wiring as instructions on https://github.com/KanyonKris/relay_board/wiki works fine.
Now I want to add a DS3231 Clock Module so SIP will also work after power cut and without internet connection. This module uses pins 1, 3, 5 and 7 - which are also used by the standard relay board wiring.
So I tried to use other GPIO ports (changes in blue):
1 – 11
2 – 12
3 – 13
4 – 15
5 – 16
6 – 18
7 – 22
8 – 24
9 – 29
10 – 31
11 – 33
12 – 35
I also adjusted in relay_board.py the mapping:
original:
# relay_pins = [11,12,13,15,16,18,22,7,3,5,24,26,29,31,32,33,35,36,37,38]
with:
relay_pins = [11,12,13,15,16,18,22,24,29,31,33,35]
When I have relay boards connected at start-up the system doesn't work - website doesn't come up.
When I connect the power lines of relay boards (pin 2 and 4) after the system has started up and website is working then the relays do work as expected.
Also when manually starting up SIP (sudo python SIP) the system works fine.
...until a software reboot.
Then webbrowser comes with error message:
SIP could not restart
Please restart from the command line
On the command screen below error message is displayed:
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 11
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 12
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 13
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 15
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 16
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 18
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 22
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 24
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 29
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 31
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 33
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 35
After restarting from the command line SIP works again.
Any idea what is the problem and how to resolve this issue?
Thanks
I have found a work-around.
Just discovered that there is another plugin Relay 16. This one does the same as relay_board, but doesn't use pins 1, 3, 5 and 7.
Rewiring and using this Relay 16 makes it work smoothly again.
Using a raspberry B+ and connecting both a 4 and 8 relay board with relay board plugin - and wiring as instructions on https://github.com/KanyonKris/relay_board/wiki works fine.
Now I want to add a DS3231 Clock Module so SIP will also work after power cut and without internet connection. This module uses pins 1, 3, 5 and 7 - which are also used by the standard relay board wiring.
So I tried to use other GPIO ports (changes in blue):
1 – 11
2 – 12
3 – 13
4 – 15
5 – 16
6 – 18
7 – 22
8 – 24
9 – 29
10 – 31
11 – 33
12 – 35
I also adjusted in relay_board.py the mapping:
original:
# relay_pins = [11,12,13,15,16,18,22,7,3,5,24,26,29,31,32,33,35,36,37,38]
with:
relay_pins = [11,12,13,15,16,18,22,24,29,31,33,35]
When I have relay boards connected at start-up the system doesn't work - website doesn't come up.
When I connect the power lines of relay boards (pin 2 and 4) after the system has started up and website is working then the relays do work as expected.
Also when manually starting up SIP (sudo python SIP) the system works fine.
...until a software reboot.
Then webbrowser comes with error message:
SIP could not restart
Please restart from the command line
On the command screen below error message is displayed:
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 11
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 12
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 13
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 15
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 16
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 18
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 22
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 24
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 29
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 31
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 33
Problem switching relays Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) 35
After restarting from the command line SIP works again.
Any idea what is the problem and how to resolve this issue?
Thanks
I have found a work-around.
Just discovered that there is another plugin Relay 16. This one does the same as relay_board, but doesn't use pins 1, 3, 5 and 7.
Rewiring and using this Relay 16 makes it work smoothly again.