OpenGarage › Forums › Comments, Suggestions, Requests › reminder for open door at 10 p.m.
- This topic has 12 replies, 6 voices, and was last updated 6 years, 7 months ago by Ray.
-
AuthorPosts
-
June 3, 2016 at 9:25 pm #92
BambamParticipantIs it possible to get an email or push notification when your garage is still open let’s say at 10 p.m.? You might have forgotten to close it and you don’t want it to stay open the whole night.
June 9, 2016 at 4:29 am #114
RayKeymasterThis can be done easily in software — it does require changing the firmware and would be easy to do if you have programming experience.
July 2, 2016 at 7:47 pm #119
AnonymousGuest+1 here but no programming experience.
July 4, 2016 at 1:45 am #120
AnonymousGuestI wasn’t up for doing a whole firmware, so I put together this python script using selenium package that I run as a cron job from my RaspberryPi. Pretty straightforward.
from selenium import webdriver
from pyvirtualdisplay import Display
#create virtual display
display = Display(visible=0, size=(800, 600))
display.start()
# make a firefox-instance
browser = webdriver.Firefox(timeout=100)
#open url of og
browser.get('http://192.168.1.3')
status = browser.find_element_by_id('lbl_status').text
dkey = browser.find_element_by_id('dkey').send_keys('yourkey')
btn = browser.find_element_by_id('btn_click')
if (status == 'OPEN'):
btn.click()
browser.quit()
July 13, 2016 at 2:47 am #127
RayKeymasterCool. Thanks for sharing.
August 25, 2016 at 10:24 pm #134
AnonymousGuestI’m doing this using app integration, if you’re not interested in reprogramming the software. It involves using the REST API for Blynk which is actually very easy to use.
It’s fairly long, so I’ll post it in a new message.
November 24, 2016 at 1:23 am #252
vrbt150ParticipantHi, I’ve created a Python script to check the door status that uses the OG API.
It uses the Requests package for Python.
#!/usr/bin/env python2 import requests og_address = 'opengarage.lan' # set OG IP or hostname og_password = 'password' # set OG password response = requests.get('http://%s/jc' % og_address) data = response.json() status = (data['door']) if (status == 1): parameters = {'dkey':og_password,'click':'1'} response = requests.post('http://%s/cc' % og_address, params=parameters)
- This reply was modified 7 years, 10 months ago by vrbt150.
July 29, 2017 at 9:35 am #489
AnonymousInactiveHow do you implement this?
Hi, I’ve created a Python script to check the door status that uses the OG API.
It uses the Requests package for Python.
#!/usr/bin/env python2
import requests
og_address = ‘opengarage.lan’ # set OG IP or hostname
og_password = ‘password’ # set OG passwordresponse = requests.get(‘http://%s/jc’ % og_address)
data = response.json()
status = (data[‘door’])if (status == 1):
parameters = {‘dkey’:og_password,’click’:’1′}
response = requests.post(‘http://%s/cc’ % og_address, params=parameters)Do you have to connect to OG via USB?
- This reply was modified 7 years, 2 months ago by .
July 31, 2017 at 7:27 am #500
vrbt150ParticipantHi Chad, I’ve got a crontab (scheduled job) setup on my linux box that runs that script every night at 10pm. It communicates over http using the OG API.
July 31, 2017 at 9:21 am #502
AnonymousInactiveHi Chad, I’ve got a crontab (scheduled job) setup on my linux box that runs that script every night at 10pm. It communicates over http using the OG API.
Gotch, I thought you were implementing this on the OG itself. Makes sense. I could do that on my pi that runs my OSPi. However, I just figured out how to use Tasker on my phone to check the door(s) status at 22:30, and if Open, it will close the door(s).
I haven’t figured out a good way to post the Tasker recipe on the forums yet (i.e. post photos inline within a forum post). When I do I’ll post it here: HOWTO:App Integration to Check Garage Door at 10PM
February 12, 2018 at 12:00 am #962
vrbt150ParticipantI 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)
February 25, 2018 at 10:05 am #982
lawrence_jeffParticipant@vrbt150 You are correct it doesn’t currently handle this scenario very well, you should have at least 5 seconds due to the beep warning, you could bump this setting to 10 and it would give you at least 11 seconds to pull in (under the rare chance you show up 1 second before the auto shut time) but its not very adaptive
It handles the similar one that you show up at 21:01 and open the door – it is smart enough not to close it but not if you get there right before and the time triggers. . I wonder if it should instead of cancelling the auto close it should just slide it 5 minutes past the last open time… that way it doesn’t get accidentally left open in the case you arrived later than you thought and still expected it to auto close.
The update to the code wouldn’t take much from memory – Since you are programatically inclined can you file a bug in the Github on this (or submit a pull if really motivated)
- This reply was modified 6 years, 7 months ago by lawrence_jeff.
March 8, 2018 at 12:04 am #1047
RayKeymasterWithout changing the firmware, probably the best work-around is to set the sound alarm to 15 seconds (or you can modify the firmware to make the sound alarm even longer). This way it will beep for that long before it triggers closing.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenGarage › Forums › Comments, Suggestions, Requests › reminder for open door at 10 p.m.