Garage door close at sunset


#1

Ive had this piston working for a few months and its just stopped working
no idea y
when I run a test y does it not set a schedule for the second half of the piston

Log

6/29/2020, 10:22:12 PM +120ms
+1ms ╔Received event [Home].test = 1593483732120 with a delay of 0ms
+118ms ║Runtime (38830 bytes) successfully initialized in 59ms (v0.3.10a.20190223) (116ms)
+119ms ║╔Execution stage started
+175ms ║╚Execution stage complete. (56ms)
+179ms ║Setting up scheduled job for Tue, Jun 30 2020 @ 9:03:00 PM EDT (in 81647.703s)
+192ms ╚Event processed successfully (192ms)


#2

Does your sun set at 9:03 this time of year?


#3

Yes that time is correct. But it missed sunset yesterday and even after that the switch should have activated


#4

Looks like it was scheduled, do you have any logs from the scheduled 9:03 execution or did it not execute at all. (Curious how it evaluated your conditions if it executed.)


#5

I didnt have logs enabled. I do not so we will see what happens tonight.
When the second part of the piston didnt work (close at sunset) the first part of the piston should have worked after that. In the logs its scheduled for today at sunset y didnt it close 15 mins later. Ill post later tonight with the updated log
Thanks


#6

The first block will only trigger if the contact opens 5mins after sunset…if it is already open then nothing would happen (unless you closed then re-opened).

:+1:


You might also want to troubleshoot each component (switch and contact sensor) in the meantime by moving portions of the 2nd IF outside of the Every block and running test. Should be able to eliminate any hardware issues.

#7

Thanks fieldsjm
What is puzzling then is that for 3 months this has being working. I always have the door open before sunset and it always closes.at sunset.
Would it make a difference if I changed contact changes to open to contact is open


#8

It is hard to say at this point, could be something as simple as the contact sensor not reporting properly.

Yes in a negative way. Triggers happen at a moment in time. Every day at sunset is the triggering moment. If you change to contact changes to open (also a trigger) then both events would need to happen simultaneously for the piston to execute.


#9

Well, this is not totally true.

For example, if the door was opened at noon, the first block will not close the door.


#10

WCmore is that because the if statement is
contact changes to open

By the way I have not changed anything (the door was opened around 10am) at sunset the door closed


#11

If the door was opened at 10am, then the first block did not close it.
(the second block did)

Similarly, if you open the door at midnight, the second block will not close the door.
(the first block should)

This is actually a very good strategy to catch both scenarios.


#12

I have changed the piston a little to use a variable.
If you have a min can you look over my logic
Will this work.


#13

$status should not be a trigger(it fails with most devices)

A normal trigger would read:
IF Contact Sensor 2's CONTACT changes to 'open'

(Although, your time restriction there does nothing, and your ELSE block is backwards)


Also, worth considering adding a “set variable to 'false'” at the appropriate times.


Sorry, one more:
Your {Contact_open} variable does not exist either.

Perhaps you should do local testing before reaching out to others here.


#14

your right sorry
Thanks