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

Tagged: ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #92

    Bambam
    Participant

    Is 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.

    #114

    Ray
    Keymaster

    This can be done easily in software — it does require changing the firmware and would be easy to do if you have programming experience.

    #119

    Anonymous
    Guest

    +1 here but no programming experience.

    #120

    Anonymous
    Guest

    I 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()
    #127

    Ray
    Keymaster

    Cool. Thanks for sharing.

    #134

    Anonymous
    Guest

    I’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.

    #252

    vrbt150
    Participant

    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 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 4 years, 8 months ago by vrbt150.
    #489

    Anonymous
    Inactive

    How 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 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)

    Do you have to connect to OG via USB?

    • This reply was modified 4 years ago by .
    #500

    vrbt150
    Participant

    Hi 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.

    #502

    Anonymous
    Inactive

    Hi 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

    #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)
    #982

    lawrence_jeff
    Participant

    @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 3 years, 5 months ago by lawrence_jeff.
    #1047

    Ray
    Keymaster

    Without 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.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.

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