OpenGarage Forums OpenGarage Firmware Fork with MQTT, Magnetic Sensor support ,Close if left open at night – misc

This topic contains 81 replies, has 7 voices, and was last updated by  andyss 1 year, 7 months ago.

Viewing 15 posts - 1 through 15 (of 82 total)
  • Author
    Posts
  • #603

    lawrence_jeff
    Participant

    Ray (or anyone else)
    I forked your 1.0.6 and incorporated the MQTT code floating around in the forum (with some improvements). Also added support for magnetic or contact switches. On the automation side also added a built in function to close the door at a certain time at night.

    Incorporated everything into option pages (attached) to make it consistent with your design/code. Also tried to use your conventions and match your code where possible. I would be happy to try to pull some of this into your base if you have any interest – I tried to make somewhat modular commits so it would be easy to incorporate any pieces you are interested in.
    https://github.com/lawrence-jeff/OpenGarage-Firmware

    If anyone sees any issues with it let me know.
    Note – these changes will not show up in the mobile app – only the integrated webpage.

    • This topic was modified 2 years, 1 month ago by  lawrence_jeff.
    • This topic was modified 2 years, 1 month ago by  lawrence_jeff.
    Attachments:
    You must be logged in to view attached files.
    #615

    CuriousG
    Participant

    Am I missing something or do we have to download your whole repository along with all the other prerequisites and compile it in order to get the .bin file?

    #616

    lawrence_jeff
    Participant

    Its more geared right now for someone familiar with the development process (especially those who are using some of the other dev MQTT builds). If you are confident in worse case re flashing with the stock firmware over USB I have uploaded a compiled version here
    https://github.com/lawrence-jeff/OpenGarage-Firmware/tree/master/Compiled

    I have noticed some weird things with the pages not updating after update either through the web or USB – so I now flash it with a blank bin first.

    #617

    CuriousG
    Participant

    At least you can upload through the web. I’m not looking forward to getting the ladder out, move the car, press the button just so I can flash it. At least with OpenSprinkler it’s on the ground level.

    #618

    CuriousG
    Participant

    So I finally got around to manually updating the firmware by going the USB route since OTA does not work for me. I’m coming from v1.04 to your v1.06 since it appears to have more features than the standard firmware.

    Not finding the IFTTT settings within the Android or iOS app threw me for a loop when I was able to find the settings through a web browser then it occurred to me that you took the screenshot from a mobile browser.

    After getting Alexa to work through IFTTT and not providing me with satisfactory notifications, I went back to installing the Blynk app just to get notifications I was enjoying with v1.04. Now I find out that you only get notifications if you leave your door open for X amount of minutes. Then I thought leaving the notifications for 0 minutes would be smart but it just kept sending me notifications repeatedly.

    #619

    lawrence_jeff
    Participant

    Sorry I didn’t get an alert for some reason on your post so just saw it a bit ago.
    If I understand you correctly, prior to my firmware if you had the Notify or close option selected in the Close door after being open for X minutes section you would also get a Blynk notification each time the door opened and closed (independent of whether it met the criteria for open after X minutes)? Is this correct?

    I had changed this code a bit because it seemed two unrelated things somewhat co-mingled and I had intended to add a checkbox that allowed you to specify Blynk open and close notifications that was separate from the notify if the door has been open option. I have added that code back in for backwards compatibility and uploaded a compiled binary with that change. Like the original 1.0.6 it does require that you have one of the two options selected under the Close door after X minutes section (the time doesn’t matter)

    Be aware that this change is merged in with a number of others so you get some other new things that may or may not be wanted. I don’t forsee any issues with anything else but you never know. This version adds a status graphic to the home page which is only going to work if you do a full upload via arduino so if you just upload the bin it will display a dead picture link if you hit the main page (doesn’t really hurt anything).

    Of course just putting the stock 1.0.4 or 1.0.6 back on should fix it as well.

    #626

    CuriousG
    Participant

    Let me see if I can clarify. Firmware 1.04 didn’t have any options for notify. It just did it from within Blynk whenever the garage door opened and closed. Also I went straight from 1.04 to your 1.06 so I don’t know the behavior of 1.05 or 1.06.

    I’m up to try your updated version just to see what is new. The only problem is I have to get the ladder out to upload by USB again. It’s a PITA that web OTA does not work for my OpenGarage.

    FYI, I do like that Blynk is reminding me every X amount of minutes that my garage door is open.

    • This reply was modified 2 years, 1 month ago by  CuriousG.
    #628

    lawrence_jeff
    Participant

    Gotcha- From seeing people ask in the forums and looking at the code, in 1.0.6 the notify on change was moved into the function that handles the notify if leave it open for X minutes, so unless you had one of those options selected (notify or auto-close) the notifications aren’t sent. I made it worse by completely turning these off in the version you originally tested, now the behavior is returned to what 1.0.6 stock does where one of those has to be selected for these to be triggered. So either in Stock 1.0.6 or my 1.0.6 you can get them back as long as you select the notify me when left open (or auto-close). Its on my list to expose this separately as co-mingling two unrelated settings doesn’t seem ideal.

    Honestly – the main benefits to mine are the MQTT support, support for a magnetic door sensor (for DIY implementations) and improvements to the web based experience. Unless these are of interest you might not get much beyond the stock 1.0.6, especially if you are primarily using the mobile app.
    But if you are the experimental type feel free to give it a shot, I’m happy to fix anything else you catch.

    #629

    CuriousG
    Participant

    I have confirmed that open/close Blynk notifications have returned. I am starting to use Home Assistant so the additional features could be beneficial to me.

    I uploaded the blank.bin and then your firmware afterwards using esptool.exe and it is not showing the graphic.

    #630

    lawrence_jeff
    Participant

    Yes -mentioned above the graphics wouldn’t work unless you use the arduino env to upload the Spiffs file that includes them (this is separate from the code bin). I haven’t tested using another tool but it looks like what it does is upload a second bin to address 00300000. I have uploaded it to the bin folder in my repository you can give it a shot if so inclined, the ESPtool or equivalent should take it with the address and create a new filesystem with the graphic files included. IMPORTANT NOTE: this will erase any existing configuration files so the device will be reset to a factory default and you will have to go through the process again to enter your SSID and all application tokens/config settings.

    My choice of graphics was a green closed door when shut and red open door when opened. To me this represented the security of the door but I noticed the official mobile app uses the opposite convention in the logs (green indicates opening and red indicates closing).

    In terms of home assistant or other automation software, its not out there in the repo yet but I have tweaked the API code to allow you to submit a close or open request where it will only act if applicable (i.e. it won’t open if already open) in the existing code you send a click and have to hope that the current represented state is correct – this may be useful as it simplifies what an external system needs to do. I haven’t added this logic into the MQTT piece but plan to soon.

    #640

    CuriousG
    Participant

    Thanks for all the changes you’ve incorporated. I have a request if it’s possible to implement. Since OTA web update doesn’t work for me, is it possible to simulate pressing the reset button down for half a second or second upon power so that the device goes into programming mode or some other means to go into programming mode without having to physically press the button? This way I can just use a stool to reach the USB cable and plug into the computer to reprogram rather than climb up on a ladder with the computer and awkwardly hold down the reset button while plugging in the USB cable.

    Second you may consider this a bug or oversight. I have the speaker turned off in the settings but your quick beep on status change is not honoring the speaker setting. I don’t mind this short beep at all and the only reason I turned off the speaker was I didn’t like the sounds coming from the original firmware. So you may want an option for the quick beeps to continue as an option (my choice) or honor the speaker settings.

    Forgot to mention that Blynk notifications for Android seems to be broken again. It only works for me if the program is running in the foreground. I installed it on an Android tablet in addition to a Nexus 5X that is running Oreo and neither gets notifications. That isn’t your problem but I just want confirmation if it is working for anyone else since the last Blynk update like 3 days ago. On iOS I get all the notifications.

    • This reply was modified 2 years, 1 month ago by  CuriousG.
    • This reply was modified 2 years, 1 month ago by  CuriousG.
    • This reply was modified 2 years, 1 month ago by  CuriousG.
    #644

    lawrence_jeff
    Participant

    Let me think about the USB programming question – Any idea why OTA doesn’t work for you? Have you tried with my version lately? I changed how reset works in an earlier update which made it more reliable for me, although I still notice if the wifi signal is weak it still fails. Sometimes trying 2 or 3 times in a row will make it go through. I was going to try to add a system log to help debug these odd ball things that are hard to repro outside of the actual garage.

    On the sound – yes I agree the sound option should be honored or selectable in some other way, let me see if that can be easily incorporated, I was originally thinking it should only beep when the door is opening/closing (which is loud by itself) but it still could annoy some people.

    #645

    lawrence_jeff
    Participant

    On your blynk question I will turn this on when I am home to see if I see the same thing, I would try making sure Blynk is set to be excluded from data saver and allowed background network access, it may be Android battery optimization not allowing it to get the notification (when not running in the foreground)

    #646

    CuriousG
    Participant

    I have no idea why OTA doesn’t work. No one has suggested a workaround which is why I’m manually updating by USB. I have tried rebooting it through web interface, powering it off. Doesn’t matter how many times, it just never works for me. I just get the Update Failed message. I’ve flashed it with the blank .bin file both times hoping it would make things different. I’ll check what my WiFi signal reports later but I don’t think that is the issue especially with such a small file too. So it has nothing to do with your version since I originally tried with the official v1.06. I started with v1.04 and have not been able to update OTA. Perhaps, the nodemcu version he used (Ray) previously had issues as I bought mine a tad over a year to the date. The last version I tried of yours was when you just added the garage door graphics but didn’t upload the graphic .bin file yet.

    On the Blynk issue, I do remember doing something with battery optimization when I updated to Oreo. That isn’t the case for the tablet, however. I’m running Android 7.x whatever the somewhat current build (within a month) of LineageOS.

    #647

    CuriousG
    Participant

    So I just checked my WiFi signal and it varied from -57 to -59dBm from the minute or so I watched it update.

    edit: Seems my tablet appears to be receiving Blynk notifications now but the Nexus 5X still does not even though I went through the battery optimization options and turned off optimization for the Blynk app.

    • This reply was modified 2 years, 1 month ago by  CuriousG.
Viewing 15 posts - 1 through 15 (of 82 total)

You must be logged in to reply to this topic.

OpenGarage Forums OpenGarage Firmware Fork with MQTT, Magnetic Sensor support ,Close if left open at night – misc