OpenGarage › Forums › OpenGarage Mobile and Web App › A few issues/concerns
Tagged: Blynk, idempotent, SmartThings
- This topic has 8 replies, 2 voices, and was last updated 6 years, 6 months ago by fishy.
-
AuthorPosts
-
June 6, 2018 at 9:17 pm #1162
fishyParticipantI 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.
June 9, 2018 at 8:29 am #1165
RayKeymaster1: 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.June 9, 2018 at 12:39 pm #1170
fishyParticipant1. 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.June 9, 2018 at 12:42 pm #1171
fishyParticipantAdditional 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).
June 9, 2018 at 4:07 pm #1172
fishyParticipantI just finished the blynk-proxy, it’s at https://blynk-proxy.herokuapp.com and more info can be found on its github page.
June 10, 2018 at 2:39 am #1173
fishyParticipantAnd I just finished the SmartThings integration here: https://github.com/fishy/SmartThings-OpenGarage
June 10, 2018 at 1:34 pm #1174
fishyParticipantWhen 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.
June 12, 2018 at 11:47 pm #1176
RayKeymasterThe 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.
June 14, 2018 at 10:19 pm #1177
fishyParticipantI 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…
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenGarage › Forums › OpenGarage Mobile and Web App › A few issues/concerns