OpenGarage › Forums › Comments, Suggestions, Requests › Request: SmartThings Integration
- This topic has 40 replies, 10 voices, and was last updated 5 years, 10 months ago by codahq.
-
AuthorPosts
-
March 3, 2018 at 1:47 pm #1011
lawrence_jeffParticipantYes that makes sense, before I try to fiddle with the UI, can you send me the specific URL for your config (I guess I just need the IP) and I will create you a firmware hardcoded to make that call on update. If it seems to work we can figure out how to incorporate that into the UI.
Thanks
JeffMarch 4, 2018 at 2:41 am #1013
codahqParticipantAwesome, let’s do http://10.10.10.225:39500/ for now. Thanks!
March 4, 2018 at 1:06 pm #1016
lawrence_jeffParticipantHere is a version hardcoded to make that request to the IP and port you specified
https://github.com/lawrence-jeff/OpenGarage-Firmware/tree/master/Compiled
March 5, 2018 at 4:05 am #1022
codahqParticipantIt seems to work perfectly.
March 5, 2018 at 8:38 am #1023
lawrence_jeffParticipantGreat to hear – after thinking about this a bit – would this be more flexible if instead of sending refresh:true it sent the new status (door open, door close, etc)
That way you would have the option of either taking the updated status as is (and not rechecking) or you could always recheck exactly like you are today if you wantThat would make things a bit more consistent with the other code and allow your app some additional flexibility.
Another thought – is the port specific to OG or is that generic – wondering if you had 2 OGs (in a 2 door setup) or you later wanted to use this for other custom devices if you need to be able to differentiate which device is asking the hub to do an update? IFTTT does this with a specific post endpoint but it could also be in the payload I guess
{[DeviceName]:refresh} for instance
- This reply was modified 6 years, 9 months ago by lawrence_jeff.
March 5, 2018 at 11:15 am #1025
kculhaneParticipantYou two have lost me a bit on this. I’ve just been using the code provided but honestly not really understanding it. Is what you’re implementing meant for everyone, or is it really for something specific only you two are working on?
March 5, 2018 at 11:22 am #1027
lawrence_jeffParticipantMy hope was to implement a somewhat generic webhook type notifier so OG can tell any system (whether it is SmartThings or something else (like Node-Red) that a door or vehicle status has changed. This avoids the need for them to have to constantly query OG and watch for the status to change (This is what I currently do for the apple support and it is somewhat inefficient and problematic as the code every 10 seconds asks ‘OG Are you open or closed”?
So the specific case right now is for SmartThings and using that as a POC but I would like to make it more generic on the OG side at least.
Ben’s Smartthings app could then be used to pickup the notification and update the app
at least that was my thought
March 5, 2018 at 3:01 pm #1028
codahqParticipant@kculhane It is definitely for everybody but it is not ready yet. Don’t install it until we give you an okay.
Also, I think what Jeff is getting at is if we do this change correctly on the firmware for ST we may be able to get away from doing one-off changes for every integration we need.
@lawrence_jeff This is very interesting to me. Maybe what we setup in the GUI is something like the ability to choose POST or GET and then just provide a URL and then maybe even provide a way to add more of them and we can store the webhook configuration in an array. This way we could configure as many as we wanted until we ran out of memory or hit some imposed limit or something (like 5 or 10).To your other question, yes, it is absolutely reasonable for us to want to send the data that we need so we don’t have to turn around and make another call right back and ask for it. I was just trying to make it as least impacting as possible. I would actually want essentially the same payload we get on calling “/jc” actually. Specifically the mac address, door, and vehicle. I can get the rest of the values from “/jc” if I need them.
To support 2 OGs in ST wouldn’t be via port, URL or payload. ST does this based off of the connecting device’s packet or TCP/IP connection information probably. It looks at the MAC address of the connection I think but it doesn’t send that information along to me. It just uses it to route and then drops it. I would be able to configure multiple OGs in ST though by giving each OG in STs the correct physical MAC address of each physical OG. Then the routing would work and each virtual device in ST would get the appropriate packets from that same URL and port.
Let me know if that makes sense.
March 5, 2018 at 4:39 pm #1032
kculhaneParticipantThanks for the clarification. I kinda figured it was still in development phase, but just wanted to check.
You guys are awesome for putting this effort into it!
May 31, 2018 at 8:11 am #1151
terryhonnParticipantWas there any further progress made on this integration
May 31, 2018 at 2:18 pm #1152
codahqParticipantI don’t see any activity on lawrence-jeff on github so if Jeff is working on it it’s not committed yet.
I haven’t tested but I’m pretty sure you can still install my device handler and it will work as it did before. The problem is that SmartThings won’t know if you control the OpenGarage from the hardware button until SmartThings polls again. That’s the optimization that we needed a firmware change to fix. So, you can still use the current handler it just doesn’t update the garage door is open or closed for up to 5 minutes if you don’t do it through SmartThings.
It’s here. You don’t need the SmartApp. Just the device handler.
https://github.com/codahq/opengarage.io-handler/blob/master/OpenGarage.io-handler.groovy
January 14, 2019 at 4:48 pm #1395
codahqParticipantHello, everyone. It’s been a really long time since this thread has had any action. Jeff seems to have gotten busy and this finally came up on my list of priorities so I made a version of the firmware that supports SmartThings (and Hubitat).
The code for the firmware can be found here:
https://github.com/codahq/OpenGarage-FirmwareThe code for the SmartThings device handler can be found here:
https://github.com/codahq/smartthings_codahq/blob/master/devicetypes/codahq/opengarage-io-handler.src/opengarage-io-handler.groovyThe code for the Hubitat device handler can be found here (this will probably change locations if Hubitat introduces a github integration):
https://raw.githubusercontent.com/codahq/hubitat_codahq/master/devicestypes/opengarage-io-handler.groovySame concept to install as previously mentioned in this thread for the device handler. The only difference now is that in your OpenGarage firmware settings you need to go to Integrations and you need to specify the IP and port of your SmartThings (or Hubitat) hub.
For example, my SmartThings hub is at:
192.168.1.10:39500 (39500 is the default port)My Hubitat hub is at:
192.168.1.11:39501 (39501 is the default port)I’ve been using it for a couple of days. Hopefully it will work out for you guys.
- This reply was modified 5 years, 10 months ago by codahq. Reason: Updated links
January 14, 2019 at 4:53 pm #1396
l0kisc0tParticipantThat’s great codahq. I’ve dropped the ball since starting this project and haven’t updated my system with all new additions but plan to do that shortly. Particularly, because it seems to have broken since Samsung got involved and doesn’t currently work!
Looking forward to implementing your code codahq, and thanks very much for posting it here!
January 14, 2019 at 4:53 pm #1397
codahqParticipantOh, by the way… For those of you have who have been using the device handler in SmartThings up to this point the only thing this changes is that instead of having to wait up to 5 minutes for SmartThings to poll the OpenGarage the firmware on the OpenGarage tells SmartThings (and Hubitat) when a change has occurred so they know immediately when the door has opened or closed.
This is much better for automations. For example, I have an automation that if the Garage Door has opened in the last 5 minutes and then the back garage door opens AND it’s dark a subset of lights turns on. It makes it so my wife never has to walk into a dark home when she arrives home. (Yes, there are other ways to do this with presence sensors. No lectures, please.)
February 22, 2019 at 10:48 pm #1439
kramerpw1ParticipantI am trying to get the smartthings integrations to work. In what field do you put the hub IP? Do I need to change any of the code in the device handler or just add it?
February 22, 2019 at 11:38 pm #1440
codahqParticipantAfter you install the device handler in the web IDE under device handlers you need to create a new device from the devices section.
There is a button to create a new device. Choose the device handler you just installed. It should be at the bottom of the list under device types.
After that is done you can switch to the app to configure it.
From the app go to the device and then go to the settings cogwheel and you should find the stuff you need to fill in.
You don’t need to change any code in the device handler. You do need to flash my firmware if you want real-time updates from the physical garage button. In the OG device’s web config I added a field for SmartThings hub IP.
- This reply was modified 5 years, 10 months ago by codahq.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenGarage › Forums › Comments, Suggestions, Requests › Request: SmartThings Integration