Possible Route to Home Kit?

Iā€™ve been working on a modified version of paulā€™s SmartThing version that fixes bugs and adds SmartHomeMonitor support to Homekit.
Iā€™m very close to having this functioning on Hubitat the holdup is HubitatSimpleMonitor status not being queriable yet.

3 Likes

What is this?

Think of it as the alarm system control.

Okā€¦ thatā€™s what I thought. I havenā€™t yet started down the path of alarm system control until I have full ā€˜controlā€™ over presence (sort of difficult because we have babysitters).

You did great work on the ST Nest App so whatever you are brewing up (I am sure) will kick butt. Best of luck and if you need a dummy guinea pig that wonā€™t yell or get upset that you broke his smart home, sign me up because to simply have a home kit dashboard means quite a bit more than having a home kit dashboard with alarm capability.

2 Likes

My alarm system is independent of HomeKit and Iā€™m completely fine with that. Itā€™s job is to protect my home and notify me, and it does that quite reliably. Iā€™m sure your additional features will be great, but weā€™re really anxious to get the core integration between Hubitat and Homebrige.

Thanks Tony! Iā€™ll give this a try later this week and will let you know how the testing goes!

1 Like

No problemā€¦ Donā€™t enable the Alarm function yet it will just error out until itā€™s added to the platform

Thank you so much!

1 Like

I havenā€™t been able to test it with all devices so let me know if something doesnā€™t work

1 Like

Definitely will. Just reading your instructions now. Thanks again.

you can generate your config data right in the App interface in Hubitat. Just copy/paste into the config.json in Homebridge

1 Like

Anyone testing, be sure to disable HSM ā€œAdd Alarm Control in HomeKit?ā€ in the Hubitat App, as it is enabled by default

I swear I disabled that setting by default. Itā€™s corrected now

1 Like

Iā€™m a little confused by these instrutions:

If you installed the previous update that doesnā€™t allow selecting devices, you need to goto ā€œMy Locationsā€ and then ā€œList Smartappsā€ to remove the multiple installation.

and

  • Click on the app in the list and then click ā€œApp Settingsā€
  • Scroll down to the OAuth section and click ā€œEnable OAuth in Smartappā€
  • Select ā€œUpdateā€ at the bottom.

and

To get this information, open Hubitat on your phone, goto ā€œAutomationā€ >ā€œSmartAppsā€ >ā€œJSON Complete APIā€ and tap on Config

They sound like SmartThings instructions. Am I missing something?
Iā€™ve enable my devices in the Hubitat app, but when I click ā€œView the Configuration Data for Homebridgeā€, I get {ā€œmessageā€: ā€œInternal server errorā€} with the api id and token in the URL

Do we still need SmartThings for this? If so, can the SmartThings Homebridge plug-in still be used simultaneously?

I can manually configure the Config.json if thatā€™s what Iā€™m missing and misunderstanding the use of the ā€œView the Configuration Data for Homebridgeā€ option. I apologies, as I havenā€™t been following your development of this. Maybe you mentioned that it would still require SmartThings and I missed that. I was under the impression this was simply Hubitat to Homebridge.

I apologize for the confusion I used the readme from the smartthings plugin and just tried to modify it.
I was trying to get this out there before I leave for vacation on Saturday.
I updated the instructions slightly to remove some confusion.

This does not require SmartThings at all and can be used along side the SmartThings homebridge-plugin.

1 Like

Because Tony's going on Vacation I decided I would try to be "helpful" :smiley:

I modified the instructions regarding format and a couple of typos... added 'advice' in the config.json area. Maybe better, maybe worse.. but free !! :slight_smile:

1 Like

Have you tried it? I'm not able to get it working. I do already have Homebridge configured and working for SmartThings, Wink and Insteon

When I click, ā€œView the Configuration Data for Homebridgeā€, it tries to open the URL, but I get {ā€œmessageā€: ā€œInternal server errorā€} with the api id and token showing in the URL

So I tried to manually configure the Config.json file with the API url and token that I see at the top of the error page, but it seems I donā€™t have it right because I get an error now when I try to start Homebridge. Hereā€™s what Iā€™ve entered in the config.json file and the result.

ā€œplatformsā€: [
{
ā€œplatformā€: ā€œHubitatā€,
ā€œnameā€: ā€œHubitatā€,
ā€œapp_urlā€: ā€œhttps://cloud.hubitat.com/api/92f88315-8a7a-4ae3-99cc-1c599bfda070/apps/174/ā€,
ā€œaccess_tokenā€: ā€œc4642434-ad64-4ded-b8dd-5f3c58c4bb0dā€,
ā€œdirect_ipā€: ā€œ192.168.1.126ā€,
ā€œdirect_portā€: 8000,
},

Terminal output isā€¦

/usr/local/lib/node_modules/homebridge/lib/server.js:201
config = JSON.parse(fs.readFileSync(configPath));
^
SyntaxError: Unexpected token } in JSON at position 727
at Object.parse (native)
at Server._loadConfig (/usr/local/lib/node_modules/homebridge/lib/server.js:201:19)
at new Server (/usr/local/lib/node_modules/homebridge/lib/server.js:57:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:26:16)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:570:32)
at Object.Module._extensionsā€¦js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

Working... hmm. I guess No is the most correct answer.

I had it working with SmartThings and my Thermostat.

But after restarting with the Hubitat config, my Home app on the phone does not see Homebridge.

The Homebridge server starts and reads in all of the Hubitat devices, so I'm thinking that part is ok. However, when I delete everything from the Home app on IOS to repair.. it asks for the pin and when I type that in, it says "Already connected, you may have to reset." and does not see Homebridge. It DOES show the Lutron Pro, which I have no need to pair to Homekit. The message is odd given I'm deleting the entire "home" from the Home IOS App AND restarting Homebridge.

I did follow the full install instructions which included upgrading Homebridge itself, along with installing the all new Hubitat-Homebridge connector. Maybe I will retry that in a different order.

A portion of startup of Homebridge looks like:

2018-3-21 13:36:29 > [2018-3-21 13:36:29] Loading 3 platforms...
2018-3-21 13:36:29 > [2018-3-21 13:36:29] [Thermostat] Initializing tcc platform...
2018-3-21 13:36:29 > [2018-3-21 13:36:29] [Thermostat] Logging into tcc...
2018-3-21 13:36:29 > [2018-3-21 13:36:29] [Hubitat] Initializing Hubitat platform...
2018-3-21 13:36:29 > [2018-3-21 13:36:29] [Hubitat] Fetching Hubitat devices.
2018-3-21 13:36:29 > [2018-3-21 13:36:29] [Hubitat] update_method: direct
2018-3-21 13:36:29 > [2018-3-21 13:36:29] [SmartThings] Initializing homebridge-smartthings.SmartThings platform...
2018-3-21 13:36:29 > [2018-3-21 13:36:29] [SmartThings] Fetching Smart Things devices.
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Thermostat] Logged into tcc! [ { deviceID: '864866', name: 'Main Floor' } ]
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Thermostat] Adding TCC Device Main Floor 864866
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Thermostat] Initializing platform accessory 'Main Floor'...
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Thermostat] getServices Main Floor
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Thermostat] updateValues 1
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Hubitat] Unknown Capabilities: ["Outlet","UltravioletIndex","Tone","SpeechSynthesis"]
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Hubitat] Initializing platform accessory 'BBQ Domitech Bulb'...
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Hubitat] Initializing platform accessory 'BBQ Switch'...
Followed by the other 50 Hubitat devices, plus:
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Hubitat] Initializing platform accessory 'MasterBath Light'...
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Hubitat] Direct Connect Active On: ( 192.168.7.129:8005)
2018-3-21 13:36:31 > [2018-3-21 13:36:31] [Hubitat] Hubitat Hub Communication Established

my config.json is abreviated and taken from the App itself:

    {
        "platform": "Hubitat",
        "name": "Hubitat",
        "app_url": "http://192.168.7.66/apps/api/236/",
        "access_token": "bxxxxxxx-6xxx-xxx-xxxx03"
    }

Try pasting your config into this site:

it's helped me everytime I had a json to cure.

Ah, OK. I went ahead and posted my access token because you just delete the app and reinstall it and you get a new access token anyway. I just donā€™t understand why I get an error when I click to get the config details.

Anyway, Iā€™ll manually configure if I have the right details to put in there. I guessed at what should be set for app_url based on what I saw on the error page, so based on what you have, I obviously have that wrong. What is 192.168.7.66 ? Is that the IP of your Hubitat or your Homebridge?

.66 is the Hubitat Hub.

go into apps and pick the Hubitat app... then scroll down.

click that "View Configuration Data..." and you'll see a FULL config.json

As you can see from my previous response, I used just the "middle" portion of what it displays. I copy/pasted that into the middle of my existing config.json (added a comma between) and that is what worked for me.

Save your config.json. Then create a new/empty one. Paste in the config from the app. See if that gets you further.