RelayWithButtonActuator (6 channel)
-
Maybe it should be like this:
relay 1-6 to pin 15 (Q0), 1 (Q1), 2 (Q2), 3 (Q3), 4 (Q4) and 5 (Q5)
-
@vampircik said:
pin 8 (CLK) to Arduino pin 11
and with the contact what to do?
Looking att the code @BartE posted it seems like it was supposed to be
pin 11 (CLK) to Arduino pin 8
-
So the correct instructions should have been:
pin 14 (DS) to Arduino pin 6
pin 12 (RCLK) to Arduino pin 7
pin 11 (CLK) to Arduino pin 8
pin 16 (Vcc) to + 5 volt
pin 8 (GND) to groundrelay 1-6 to pin 15 (Q0), 1 (Q1), 2 (Q2), 3 (Q3), 4 (Q4) and 5 (Q5) the other relay pins connected to ground
Please @BartE correct me if I'm wrong since I have no personal experience from this kind of setup.
-
Do you get anything in the serial monitor for your Relay Node?
-
send: 18-18-0-0 s=255,c=0,t=18,pt=0,l=3,sg=0,st=ok:1.5
send: 18-18-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
read: 0-0-18 s=255,c=3,t=6,pt=0,l=1,sg=0:M
repeater started, id=18, parent=0, distance=1
send: 18-18-0-0 s=255,c=3,t=11,pt=0,l=8,sg=0,st=ok:RelaySix
send: 18-18-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.1
send: 18-18-0-0 s=0,c=0,t=3,pt=0,l=0,sg=0,st=ok:
send: 18-18-0-0 s=0,c=2,t=2,pt=0,l=0,sg=0,st=ok:
send: 18-18-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,st=ok:
send: 18-18-0-0 s=1,c=2,t=2,pt=0,l=0,sg=0,st=ok:
send: 18-18-0-0 s=2,c=0,t=3,pt=0,l=0,sg=0,st=ok:
send: 18-18-0-0 s=2,c=2,t=2,pt=0,l=0,sg=0,st=ok:
send: 18-18-0-0 s=3,c=0,t=3,pt=0,l=0,sg=0,st=fail:
send: 18-18-0-0 s=3,c=2,t=2,pt=0,l=0,sg=0,st=fail:
send: 18-18-0-0 s=4,c=0,t=3,pt=0,l=0,sg=0,st=fail:
send: 18-18-0-0 s=4,c=2,t=2,pt=0,l=0,sg=0,st=fail:
send: 18-18-0-0 s=5,c=0,t=3,pt=0,l=0,sg=0,st=fail:
send: 18-18-0-0 s=5,c=2,t=2,pt=0,l=0,sg=0,st=fail:
find parent
send: 18-18-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
read: 0-0-18 s=0,c=1,t=2,pt=0,l=1,sg=0:0
send: 18-18-0-0 s=0,c=1,t=2,pt=1,l=1,sg=0,st=ok:0
Incoming change for sensor:0, New status: 0
read: 0-0-18 s=1,c=1,t=2,pt=0,l=1,sg=0:0
send: 18-18-0-0 s=1,c=1,t=2,pt=1,l=1,sg=0,st=ok:0
Incoming change for sensor:1, New status: 0
read: 0-0-18 s=2,c=1,t=2,pt=0,l=1,sg=0:0
send: 18-18-0-0 s=2,c=1,t=2,pt=1,l=1,sg=0,st=ok:0
Incoming change for sensor:2, New status: 0
read: 0-0-18 s=255,c=3,t=8,pt=1,l=1,sg=0:0
parent=0, d=1
Switch #1 to 1
Switch #2 to 1
Switch #3 to 1
Switch #4 to 1
Switch #5 to 1
Switch #1 to 0
send: 18-18-0-0 s=1,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #1 to 1
Switch #2 to 0
send: 18-18-0-0 s=2,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #2 to 1
Switch #0 to 1
Switch #0 to 0
send: 18-18-0-0 s=0,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #3 to 0
send: 18-18-0-0 s=3,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #3 to 1
Switch #4 to 0
send: 18-18-0-0 s=4,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #4 to 1
Switch #5 to 0
send: 18-18-0-0 s=5,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #5 to 1
Switch #4 to 0
send: 18-18-0-0 s=4,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #4 to 1
Switch #4 to 0
send: 18-18-0-0 s=4,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #4 to 1
Switch #4 to 0
send: 18-18-0-0 s=4,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #4 to 1
Switch #4 to 0
send: 18-18-0-0 s=4,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #4 to 1
Switch #5 to 0
send: 18-18-0-0 s=5,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #5 to 1
Switch #5 to 0
send: 18-18-0-0 s=5,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #5 to 1
Switch #4 to 0
send: 18-18-0-0 s=4,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #4 to 1
Switch #5 to 0
send: 18-18-0-0 s=5,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #5 to 1
Switch #3 to 0
send: 18-18-0-0 s=3,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #3 to 1
Switch #3 to 0
send: 18-18-0-0 s=3,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #3 to 1
Switch #3 to 0
send: 18-18-0-0 s=3,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #3 to 1
Switch #4 to 0
send: 18-18-0-0 s=4,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #4 to 1
Switch #4 to 0
send: 18-18-0-0 s=4,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #4 to 1
Switch #4 to 0
send: 18-18-0-0 s=4,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #4 to 1
Switch #5 to 0
send: 18-18-0-0 s=5,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #5 to 1
Switch #0 to 1
Switch #0 to 0
send: 18-18-0-0 s=0,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #0 to 1
Switch #0 to 0
send: 18-18-0-0 s=0,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #2 to 0
send: 18-18-0-0 s=2,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #2 to 1
Switch #2 to 0
send: 18-18-0-0 s=2,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #2 to 1
Switch #1 to 0
send: 18-18-0-0 s=1,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #1 to 1
Switch #1 to 0
send: 18-18-0-0 s=1,c=1,t=2,pt=1,l=1,sg=0,st=ok:1
Switch #1 to 1 -
@vampircik i see that with some help from korttoma you manage to find the correct pins setting. @korttoma thx for your help.
korttoma is right about the pin 11, i should have added this link with more background infoThe sketch is designed for push buttons and not for toggle switches and will respond when releasing a button press.
In your movie i see that switching on and off via MySensors (mouse clicks) works but the button presses not (always) only switching off.I found an error in my sketch on line 131
// Store new switch value switches[id].currentStatus = (switchValue ? 0 : 1);the correct line should be
// Toggle relay status switches[id].currentStatus = (switches[id].currentStatus ? 0 : 1);note: I've updated the sketch in the original post as well


