Hubitat Hub Support? #239
Comments
Dan, You are the man, I have been looking for this type of information. |
So if I am not mistaken, one would need to shut down the ST Homekit/Homebridge integration. But what would the steps (ie the config.json file) look like to do an install because I would LOVE to test this!!! |
I believe you are correct. I originally tried having both “platforms” in the config.json file. To get it to work at all, I had to remove the real SmartThings platform. Afterwards, I had to use the Hubitat cloud endpoint. I was then able to see a few devices in HomeKit on my phone that were in the “switch” group, but nothing from the “sensor” group. So, it is a promising start. |
So to remove the ST platform would be to simply eliminate it from the config.json, but what are you placing into the config.json instead?
Justin Bennett, Esq.
Personal E-Mail Account. Although this was sent from my personal e-mail this communication may contain privileged or other confidential information. If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information contained herein. Also, please notify sender that you have received this communication in error, and delete the copy thereof you have received. Thank you.
…On Feb 12, 2018, 10:52 AM -0500, ogiewon ***@***.***>, wrote:
I believe you are correct. I originally tried having both “platforms” in the config.json file. To get it to work at all, I had to remove the real SmartThings platform. Afterwards, I had to use the Hubitat cloud endpoint. I was then able to see a few devices in HomeKit on my phone that were in the “switch” group, but nothing from the “sensor” group.
So, it is a promising start.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
In your Hubitat JSON Complete API app, you can select the devices you want exposed (same as ST) and then display the Config data. Basically the exact same data that you’d get from the SmartThings App on your phone. But instead, you get it from the Hubitat hub’s web page instead. In the code posted above, it will present the LOCAL OAUTH endpoint data needed for config.json. This endpoint is http only, not https. Thus, the reason I posted this issue. |
This looks like exactly the device I wanted ages ago and closely resembles where Home Automation started. I'll need to get one ordered. |
This would be excellent! |
Here is my most up to date version of the "JASON Complete API" groovy code for Hubitat. This version uses recently added API calls for generating the Endpoint information. This version is configured to generate the LOCAL endpoint when displaying the information needed for config.json. To use the cloud endpoint, just comment/uncomment the following section appropriately.
Here is the full version of the Hubitat App. I have not tested it yet using @pdlove 's recommended changes to the lib/smartthingsapi.js file.
|
Ok, another quick update. I was able to get the homebridge-smartthings plugin to communicate to Hubitat via the LAN using http (instead of https) by making two changes: I added the change recommended by @pdlove homebridge-smartthings/lib/smartthingsapi.js Line 1 -> var http = require('https'); and had to change 443 to 80 in Line 88 -> app_port = appURL.port || "80"; Here is the console output on my Raspberry Pi. Note that only devices in the 'all switches' group are properly recognized. Those in the 'sensor devices' or 'most devices' are never properly recognized by the plug-in. pi@raspberrypi2:~/.homebridge $ homebridge Or enter this code with your HomeKit app on your iOS device to pair with Homebridge: [2018-2-14 20:39:52] Homebridge is running on port 51826. |
Looks like Hubitat is stripping out spaces in the JSON devices data, causing any Capability that normally has a space in the name (e.g. "Temperature Measurement") to never match what /accessories/smartthings.js is looking for. Not sure if it is best to try to fix this on the Hubitat "Complete JSON Api" side of things, or the /accessories/smartthings.js module. Thoughts? |
I assume all the "Smartthings" logging on your RPI console is NOT smart things itself but rather hubitat? |
Correct. I am trying to make as few changes to @pdlove 's homebridge-smartthings plug in as possible. Eventually a fork of this code may need to exist, where all of the hard-coded "SmartThings" references are replaced with "Hubitat". Hopefully, it will even be possible to run both the homebridge-smartthings and homebridge-hubitat plug-ins side by side on the same system. |
The SmartThings plugin will require massive work as they get their own REST API to a point that we can use it. |
I am all in on this concept. ST has proven too unreliable for me and from the device installs I have done with Hubitat the system works as advertised. Even disconnected my internet connection and still watched it all hum along beautifully. I hope this can be done... from when I used your ST Homebridge integration I marveled at the speed in which Homekit handled commands through both the home app and Siri (much faster than Alexa/ST) and rightfully or wrongly attributed it to the fact that the apple tv was executing things locally. If you can help get home kit integration into hubitat. Off the charts insane automation will be forthcoming. |
I have the homebridge-smartthings plug-in working on Hubitat, EXCEPT for the Direct Update feature. It appears that the routine in index.js is having trouble parsing the “headers” portion of the GET request that is sent. I have asked the Hubitat developers for advice, since the data received from Hubitat must be different than what ST is sending for the exact same command in the JSON Complete API groovy app. |
@JDogg016 the speed was due to having worked with the developers to optimize the speed as best as possible. I have low tolerance for delays between a motion detector picking up motion and an action occurring. With Smartthings, your IOS device communicates with the Homebridge Hub, which communicates with the cloud, which communicates with the Smartthings Hub which sends the update directly to Homebridge and back to IOS. Alexa simply replaces Homebridge with a cloud but there's still considerable delay (in my opinion) when using Alexa locally with the Hue Hub emulator that floating around on the web. @ogiewon My hub will be in Monday. I'll get some devices on it and take a look. I'm also working on a proper project plan for the work I need to still do one homebridge-smartthings and homebridge in general. It's too big of a project for me to keep track of in my head anymore. I'll post a link when I have it. |
I think you will be quite pleased with Hubitat. Also, I thought your ST-Homebridge integration was brilliant and I applaud the speed of that app and can't imagine the responsiveness if ported over to Hubitat. I'm sure if you can help there will be a bunch of us looking to "reimburse" you for your hubitat. |
Interesting project. Can CoRE/webcore be run on hubitat too? I'd love to have a 100% local solution as ST outages seem to be on the rise. |
Technically, sure you could get CoRE to run...maybe even webCoRE...but it will require a very good ST/Hubitat groovy programmer... |
I've half-way started a hubitat-dedicated project. I'm having trouble with my ZWave devices on it so I haven't gotten very far. I do have a few Zigbee lights on it and, while it has a long way to go, it's a great concept. I'll reference the other project here when I get it uploaded this weekend. Basically it will, in it's current state, use a modified smartapp to get the device information but updates will be streamed straight from the hub via web sockets. I'm working on extracting the device information straight from the hub and the only issue I'm having is that the capabilities aren't exposed on any of the web pages so I can't just scrape it from the html. |
This looks very useful and far more sophisticated than the kludge I wrote for my use on SmartThings. What is the status of this project. (I tried to install it on SmartThings but ran into problems -- will get back to it when I have time to delve more). |
I'm interested as well, and would be game to help. |
@tooluser - This has already been completed for Hubitat by @tonesto7 Take a look here https://community.hubitat.com/t/homebridge-plug-in/1155?u=ogiewon |
Hubitat port of this is available at https://github.com/tonesto7/homebridge-hubitat-tonesto7. Therefore, I am closing this issue for now. |
@ogiewon Thanks for taking the time to reply, it's hard to follow the maze of existing work - that helped immensely! |
This appears to be tied to home bridge -- is there documentation on the message format and how to automatically report on any new devices that are added to the system? |
Paul,
I would love to see a version of homebridge-smartthings revised to work on the new Hubitat Elevation Hub. This new hub was designed by a team of very capable SmartThings users, so the new system is very backwards compatible with existing SmartThings groovy code. One of the major advantage of this new system is that everything runs locally on the hub, resulting is excellent performance. It exposes both local and cloud OAUTH endpoints, so Homebridge should be able to communicate on the local LAN. This would result in excellent performance.
I have attempted to modify the JSON Complete API SmartApp to run on the Hubitat Hub. It successfully compiles and does run. I have modified a few sections to add the Hubitat endpoints (showing both the cloud and local endpoints). Unfortunately, the hub does not appear to support HTTPS encrypted traffic on the local network (i.e. connection refused error using https). The cloud endpoint does, of course, support https. I am not sure how to modify the homebridge-smartthings plugin to allow for unencrypted local traffic. I was able to get the homebridge-smartthings plugin to work somewhat, using the Hubitat cloud endpoint, just for testing. However, only devices in the "switch" group showed up in Homekit on my iPhone. The other devices all were listed as not belonging to a group. The two "switch" devices did show up in Homekit on my phone, and I could control them!
So, it seems like it is very close to working. Since Hubitat currently does not really have a native user interface (i.e. no smartphone app exists), having Homebridge running with a fast local LAN connection would be a very welcome option to iOS users.
Thoughts? Want to take on a challenge that right up your alley? ;)
Dan
Here is my modified version of your SmartApp that I have been testing with on Hubitat.
[Update 2/11/2018: I figured out how to determine the Hubitat hub's local IP address on the fly without user input. Version below has been updated accordingly.
The text was updated successfully, but these errors were encountered: