OpenGarage Forums OpenGarage Mobile and Web App A few issues/concerns

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1162

    fishy
    Participant

    I just got my OpenGarage. My plan is to use it to replace MyQ for IoT integrations (mainly SmartThings). Upon some initial digging I’ve found the following issues:

    1. blynk-cloud.com is http only for now: they do have https, but that’s a self-signed cert right now (they claim to be switching to let’s encrypt “soon” but didn’t give a timeline). I didn’t find blynk-cloud http(s) connecting code in firmware, but it looks like it’s hardcoded as blynk-cloud.com and port 80 in the blynk SDK the firmware uses, so the firmware is communicating with blynk over http, is that correct? I’m thinking about writing a https proxy on appengine (basically trust their self-signed cert and route everything to https://blynk-cloud.com) until they switched to let’s encrypt, but not sure how easy/hard it is to change the firmware code to use that instead (I’ll need the https proxy for SmartThings integration anyway).

    2. the action is not idempotent: currently we only have one action, which is “flip”, instead of idempotent actions “open” and “close”. I understand that that’s mostly limited by how OpenGarage emulate the button click with the real garage controller, but am wondering if there’s anyway to add idempotent actions in the future.

    #1165

    Ray
    Keymaster

    1: if you can compile the firmware yourself, there is a simple way to switch to HTTPS: in main.cpp, change the include file BlynkSimpleEsp8266.h to BlynkSimpleEsp8266_SSL.h that’s it. We did test this internally and found that the response speed can be slow: something when you click on the button in Blynk app it doesn’t response immediately, which we think is not great for user experience, and for that reason still using HTTP.

    2. The OpenGarage API already provides open and close features thought HTTP API:
    https://github.com/OpenGarage/OpenGarage-Firmware/blob/master/docs/OGAPI1.0.7.pdf
    section 3 on the first page.

    #1170

    fishy
    Participant

    1. It would be nice to have a switch on the web config ui so user can choose between http and https 🙂
    2. Nice! Is it possible to expose open and close commands to blynk? I do have a linux box running in the house with nginx and let’s encrypt configured so I can use that to proxy to open garage API, but blynk would still be more user friendly.

    #1171

    fishy
    Participant

    Additional question for 2: Is it implemented via direct open/close command from the relayed garage, or is it still switch, just the firmware code will check the current status first? If it’s the latter then I can implement that logic on SmartThings instead (and still use blynk).

    #1172

    fishy
    Participant

    I just finished the blynk-proxy, it’s at https://blynk-proxy.herokuapp.com and more info can be found on its github page.

    #1173

    fishy
    Participant

    And I just finished the SmartThings integration here: https://github.com/fishy/SmartThings-OpenGarage

    #1174

    fishy
    Participant

    When trying to compile the firmware with BlynkSimpleEsp8266_SSL.h (this is with Arduino app, Using Makefile always complain that it can’t find Blynk header files), the compiler complained about:

    
    In file included from /Applications/Arduino.app/Contents/Java/libraries/OpenGarage/main.cpp:28:0:
    /Applications/Arduino.app/Contents/Java/libraries/blynk-library/src/BlynkSimpleEsp8266_SSL.h:27:55: error: expected initializer before 'PROGMEM'
       static const unsigned char BLYNK_DEFAULT_CERT_DER[] PROGMEM =
    
                                                           ^
    

    I didn’t see PROGMEM defined in the whole blynk-library code, not sure what to expect…

    • This reply was modified 6 years, 6 months ago by fishy.
    #1176

    Ray
    Keymaster

    The compilation error may have to do with the ESP8266 core version. PROGMEM is a Arduino keyword that indicates the data is to be stored in flash memory instead of RAM. It has nothing to do with Blynk.

    #1177

    fishy
    Participant

    I did manage to compile my modified (different modification: https://github.com/OpenGarage/OpenGarage-Firmware/pull/26) firmware and it works fine, so I’m not sure that my esp8266 version is wrong…

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

OpenGarage Forums OpenGarage Mobile and Web App A few issues/concerns