New Homebridge Plug-in via MakerAPI

I need to leave one more post. My mind is BLOWN at how well this works. I am leaving this here for the casual readers that stumble onto this thread. I never used HomeKit and I have iPads mounted to walls that control my automation. I never used it because it was missing things like locks and garage doors and other switches that were not already tied in via a Lutron Hub, for example. This project - which took me 6 hours to get to 99% completion, and with the help of the kind souls on this thread that helped with the final yet critical 1% - was TOTALLY worth it. If you're on the fence you really need to do it. All for the price of a tiny little Raspberry Pi computer and perseverance to figure it out by reading all these threads and links on the Hubitat forum.

My iPads, using the Home app, now have home 'favorite' pages with the status of locks and garage doors and room pages different for each room where the iPad is located. Add to that the new Dark theme on iOS, and download a 4K HD black image from Google and save it to your camera roll and use that image for the background for each room) - and you have a fully immersed dark theme iOS experience with instantaneous speed and a outrageously gorgeous interface. Add to that Siri and Apple Watch control and it works flawlessly! I can flick my wrist up and say "open the garage door" and it opens immediately! (without even saying hey Siri - - a setting you can disable if you're curious) Are you kidding me we live in the future!

11 Likes

Does anyone know how to remove color capabilities from a bulb?
I have Sengled Daylight bulbs and in the Home app they show as having color ability.
I've put the following in my config but I can't seem to figure it out.

"369": [
"ColorControl",
"ColorTemperature",
"ColorMode"
]
},
"excluded_attributes": {
"369": [
"colorMode",
"colorName",
"colorTemperature"

Thought I would update to the latest version of the plugin and I'm met with this error:

[Homebridge] [10/27/2019, 9:41:18 PM] Loaded config.json with 0 accessories and 4 platforms.
[Homebridge] [10/27/2019, 9:41:18 PM] ---
[Homebridge] [10/27/2019, 9:41:19 PM] Loaded plugin: homebridge-camera-ffmpeg
[Homebridge] [10/27/2019, 9:41:19 PM] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'
[Homebridge] [10/27/2019, 9:41:19 PM] ---
[Homebridge] [10/27/2019, 9:41:19 PM] Loaded plugin: homebridge-camera-ffmpeg-omx
[Homebridge] [10/27/2019, 9:41:19 PM] Registering platform 'homebridge-camera-ffmpeg-omx.Camera-ffmpeg-omx'
[Homebridge] [10/27/2019, 9:41:19 PM] ---
[Homebridge] [10/27/2019, 9:41:19 PM] Loaded plugin: homebridge-hubitat-makerapi
[Homebridge] Homebridge Version: 2.4
[Homebridge] Plugin Version: 0.3.3
[Homebridge] [10/27/2019, 9:41:19 PM] Registering platform 'homebridge-hubitat-makerapi.Hubitat-MakerAPI'
[Homebridge] [10/27/2019, 9:41:19 PM] ---
[Homebridge] [10/27/2019, 9:41:20 PM] Loading 4 platforms...
[Homebridge] [10/27/2019, 9:41:20 PM] [Hubitat] Initializing Hubitat-MakerAPI platform...
[Homebridge] [10/27/2019, 9:41:20 PM] [Camera-ffmpeg-omx] Initializing Camera-ffmpeg-omx platform...
[Homebridge] [10/27/2019, 9:41:20 PM] [Camera-ffmpeg] Initializing Camera-ffmpeg platform...
[Homebridge] [10/27/2019, 9:41:20 PM] [Hubitat-MakerAPI] Initializing Hubitat-MakerAPI platform...
[Homebridge] uncaughtException: The "url" argument must be of type string. Received type undefined
[Homebridge] [10/27/2019, 9:41:20 PM] TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type undefined
[Homebridge] at Url.parse (url.js:154:11)
[Homebridge] at Object.urlParse [as parse] (url.js:148:13)
[Homebridge] at Object.init (/home/hoobs/.hoobs/node_modules/homebridge-hubitat-makerapi/lib/util_http.js:95:26)
[Homebridge] at Object.init (/home/hoobs/.hoobs/node_modules/homebridge-hubitat-makerapi/lib/api-homebridge-hubitat-makerapi.js:65:19)
[Homebridge] at new HE_ST_Platform (/home/hoobs/.hoobs/node_modules/homebridge-hubitat-makerapi/index.js:106:15)
[Homebridge] at Server._loadPlatforms (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/lib/server.js:340:34)
[Homebridge] at Server.run (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/lib/server.js:77:14)
[Homebridge] at module.exports (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/lib/cli.js:78:12)
[Homebridge] at Object.<anonymous> (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/bin/homebridge:17:22)
[Homebridge] at Module._compile (internal/modules/cjs/loader.js:778:30)
[Homebridge] at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
[Homebridge] at Module.load (internal/modules/cjs/loader.js:653:32)
[Homebridge] at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
[Homebridge] at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[Homebridge] at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
[Homebridge] at startup (internal/bootstrap/node.js:283:19)
[Homebridge] uncaughtException: The "url" argument must be of type string. Received type undefined
[Homebridge] uncaughtException: The "url" argument must be of type string. Received type undefined
[Homebridge] [10/27/2019, 9:41:20 PM] Got SIGTERM, shutting down service...
[Homebridge] [10/27/2019, 9:41:20 PM] [Hubitat hhm:0.3.3] Setting "local_ip" not set in config, tried to determine it and found 10.0.1.16 -> I hope this is correct
[Homebridge] [10/27/2019, 9:41:20 PM] [undefined hhm:0.3.3] Setting "local_ip" not set in config, tried to determine it and found 10.0.1.16 -> I hope this is correct
[Homebridge] [10/27/2019, 9:41:23 PM] [undefined hhm:0.3.3] latest version on npmjs is 0.3.3
[Homebridge] [10/27/2019, 9:41:23 PM] [undefined hhm:0.3.3] your version of the plugin is up2date
[Homebridge] [10/27/2019, 9:41:24 PM] [undefined hhm:0.3.3] latest version on npmjs is 0.3.3
[Homebridge] [10/27/2019, 9:41:24 PM] [undefined hhm:0.3.3] your version of the plugin is up2date

Config File:

{
"platform": "Hubitat-MakerAPI",
"name": "Hubitat",
"app_url": "http://10.0.1.15/apps/api/129",
"access_token": "tokenremoved",
"excluded_attributes": {
    "259": [
        "contact"
    ]
},
"mode_switches": false,
"hsm": true
}

Any ideas?

Odd. I just updated my plugin 30 min ago, around the time you posted this, and I didn’t have any errors. Maybe try installing again? Did you install as sudo user?

That is very weird.... can you check if there is any kind of special character in your config file?

I'm an idiot. I could not get HOOBS to update the plugin and so I removed it and re-added it. When I did that, HOOBS added another platform section for Maker API...duh.

Anyways, I also wanted to see if you could support AQI data to Homebridge. I'm using a PurpleAir sensor along with this GREAT Hubitat device handler :slight_smile:

2 Likes

I built a HomeBridge connector for my PurpleAir device driver, but it stopped working with the latest release of Apple HomeKit - it says that the sensor is not supported. Probably something with changing the device type in HomeKit/HomeBridge, but I don't have the time to chase it down right now...sorry.

I have everything updated and my iPhone app says all devices are updating...
I've rebooted Hubitat and then relaunched homebridge. Looks like everything is working and talking until I open the app and can't control anything.

I'm using an Apple TV 4K which was recently updated and I had to turn off sleep mode. Any ideas?

Does it eventually load the status of the devices and let you control things?

I had similar issues with my Home app staying in updating for up to a minute when I'd open it. Sometimes one of my HomeBridge instances would update fairly quicklt but the other wouldn't my Apple TV 4K is still on v12. My Hub and the HomeBridge instances were all up to date at the time. Eventually it all worked itself out without me changing anything that I'm aware of. I did try rebooting my HomeBridge instances during that time but it didn't help. I've been putting off updating my Apple TV since I had seen people having issues with it when it originally released.

Do you see any output from homebridge when you try to control something, like is there an error message displayed in the terminal that is running homebridge.

When you control things, are you on your local network (same network as your apple tv) or are you remote/via cellular.

Yes, I can change a state in Hubitat and see the update on Homebridge.

No, the devices never finish updating in the Home app on my iphone. I'm wondering if it is the update on the Apple TV

I'm remote now but will try again when I am home

Is there anyway to pull modes in? So we can change modes?

Also, with the new maker API pulling websockets, is this going to break your homebridge/HomeKit intergration?

Websockets are not pulled yet, nor I it confirmed that they will be pulled but they are unsupported and can be pulled. I am working on supporting the new event stream coming from MakerAPI to be ready for when the unknown future comes.

There is a setting in the config file that you can set to create switches for modes:

"mode_switches": true

Each mode will have a switch in HomeKit and trigger the change in HE

2 Likes

I have modes on mine so I can change between them, i believe it's the mode_switches above.

Thanks got it working

1 Like

Hi @dan.t, looks like new changes coming to our setup? See Maker API New Features

Testing a new version with these changes already in my setup. But there is no pressure yet to move into that direction. Also waiting on a bug fix that is coming gesponnen. Don’t worry, the plugin will continue to work

2 Likes

I think @dan.t would just need to add AQI attribute to the homebridge-hubitat-makerapi plugin and it would be supported, right? I'm not exactly sure of the exact value that needs passed to homebridge but I'm sure it's one of these. temperature and humidity are already passing.

Also thanks @storageanarchy for the PurpleAir driver, works great!

I'm pretty sure that it is HomeKit that has removed/changed support for the AQI device, since my Homebridge link stopped working when I upgraded to iOS 13.