Cannot get schedule to turn off relay


#1

Hi All, I have a float switch that turns on a relay and works just fine, but because there are no timers (really wish there were) in Cayenne, I had to setup a schedule to turn off the relay at a certain time every hour (would love to see a HH:MM:SS feature). The problem is that the schedule is not turning off the relay. The only way to turn off the relay is to click the button/icon on my dashboard. Likewise, I tried setting up a schedule to turn on my relay and that does not work either. Attached is a layout of my wiring. Any help or ideas would be greatly appreciated.
The relay is a Sainsmart 5v 2 chanel board. PI 2 Model B.


Relay issue
#2

Welcome to Cayenne!

Could you post some screen shots of the trigger?


#3

Here you go.

And the Schedule…


#4

Cayenne doesn’t use the internal pullup resistor in programming.
You may need to place a 10k pullup resistor from the float switch GPIO23 to +3v3.


#5

Along the same lines as HighTech, have you tested that you can control an LED with that line manually? Next see if you can control the relay manually. I am assuming you have, but want to be thorough.

Also, if you don’t mind me asking, what are you building? MyDevices has a competition on right now that gets you money if you submit your projects.

Check it out: Submit Your Cayenne Projects! [contest ended]

Cheers,

Craig


#6

I don’t understand, the float switch is doing what is is supposed to. When the float switch closes, gpio 23 goes high and then the trigger turns on gpio 13 to turn on the relay (is does all this as it should). What I can not get working is the schedule to turn off the relay. I can manually click the button on the dashboard and turn off and on the relay.


#7

I have not tried an LED, but I will shortly. I can turn on and off the relay using the button on my dashboard.


#8

Hi Craig, I am building a drain/fill unit for aquaponics. This is the last piece of the puzzle. It will have an internal water temp, external air temp, overflow alarm and automatic drain valve.
Thanks,
Randy


#9

It sounds like a boolean problem-
if float AND schedule are true…
think of the logic


#10

That’s what I thought but as soon as the drain/relay opens the float goes back to its normal state. I’ve tried removing the trigger and float switch all together and just have a schedule to turn on the drain/relay and it never turns on.


Event scheduled with repeat = custom every 1 hour doesnt work
#11

Can you try setting up your relay as a generic digital output to see if it behaves any differently?


#12

It looks like the problem is the schedule doesn’t work when I have it recurring hourly. If I schedule a once a day @ xx time then it turns the relay on/off. I noticed other people are having the same problem with recurring hourly schedules. Thank you for your help. I will post the project as soon as I wrap up a few things.
Randy


#14

Yes, looks like the engineers are looking into it. I got the same result Relay vs Generic Digital Output.


#15

nojunkmail, thanks …So it should be fixed soon? Have you got it to work ? I couldn’t with generic switch


#16

I don’t know when it will be fixed, I am not sure how Cayenne does/pushes updates or notification of updates. I had to create 96 turn off events (need the relay to switch off every 15 minutes). I hope they can implement an hh:mm:ss recurring schedule though.


#17

thanks for reply


#18

Scheduling issue should be fixed now, let us know if you are still running into the problems ? :slight_smile:
-B


#19

Added this functionality to product roadmap


#20

Very good. One step at a time, another problem bites the dust.