OpenGarage Forums Comments, Suggestions, Requests reminder for open door at 10 p.m. Reply To: reminder for open door at 10 p.m.

#962

vrbt150
Participant

I recently had a situation where my garage door nearly closed on my car while pulling into the drive way.

I had the auto close setting set to UTC: 13; 21:00 my local time.
I got home just before 21:00, opened the garage, went to drive in, and the garage door auto closed on me.

This got me thinking, that maybe a delay or dismiss feature is needed when auto closing if the door has recently been opened.
Hopefully in future versions 🙂

I’ve since disabled the auto close in the firmware, and gone back to using my python script.
I’ve modified it so it will check the current OG epoch time against the last door event.
If the door is open, and the last door event was 5 minutes or less, it will skip running the auto close.

#!/usr/bin/env python

import requests

og_address = 'opengarage.lan' # set OG IP or hostname
og_password = 'opendoor' # set OG password
og_doorwait = 300 # door auto close dismiss time (sec)

og_jc = requests.get('http://%s/jc' % og_address).json()
og_jl = requests.get('http://%s/jl' % og_address).json()
door_status = og_jc['door']
og_time = int(og_jl['time'])
og_log = og_jl['logs']

if door_status == 1 and og_time - og_log[len(og_log) - 1][0] >= og_doorwait:
    parameters = {'dkey':og_password,'close':'1'}
    request = requests.post('http://%s/cc' % og_address, params=parameters)