New Homebridge Plug-in via MakerAPI

So first you might want to "create a new Access Token" now that you've posted it to this community (and the world).. not a super big deal but maybe not the best security practice..

@dan.t has a great config helper page to get you going..

located here:

https://dantapps.github.io/

Putting in the info you provided yields this config:

{
    "bridge": {
        "name": "Homebridge",
        "username": "53:D0:64:CB:FC:FC",
        "port": 51936,
        "pin": "593-13-923"
    },
    "mdns": {
        "interface": "192.168.1.215"
    },
    "platforms": [
        {
            "platform": "Hubitat-MakerAPI",
            "name": "Hubitat MakerAPI",
            "app_url": "http://192.168.1.215/apps/api/71",
            "access_token": "34033f6a-48d5-4a08-adc5-4ec410a55602",
            "local_ip": "192.168.1.215",
            "local_port": 20010,
            "mode_switches": false,
            "hsm": false,
            "debug": false,
            "logFile": {
                "enabled": true,
                "path": "",
                "file": "",
                "compress": true,
                "keep": 5,
                "size": "10m"
            }
        }
    ]
}

This assumes that your Hubitat Hub is at IP address: 192.168.1.215
and your homebridge instance is at IP address: 192.168.1.15

EDIT: Also from the help page:

Note: This tool will always create a new random "username" and "pin" in the bridge section for homebridge. Do NOT change these values in your config.json if you have an already running homebridge instance. You will destroy your HomeKit configuration if you do so.

4 Likes

Thanks erktrek. don't worry, I am a newbie but I did go ahead and change the access code from actual. :slight_smile: plugged your code in. Mine originally had the Synology URL somewhere in there which apparently isn't needed. Still not working. Below are the Homebridge error logs. Its like reading the matrix for me!

[8/25/2021, 7:59:38 PM] ---
[8/25/2021, 7:59:38 PM] Loaded plugin: homebridge-config-ui-x@4.41.2
[8/25/2021, 7:59:38 PM] Registering platform 'homebridge-config-ui-x.config'
[8/25/2021, 7:59:38 PM] ---
[8/25/2021, 7:59:38 PM] Loading 2 platforms...
[8/25/2021, 7:59:38 PM] [Config] Initializing config platform...
[8/25/2021, 7:59:38 PM] [Config] Running in Service Mode
[8/25/2021, 7:59:38 PM] [Hubitat-MakerAPI] Initializing Hubitat-MakerAPI platform...
[8/25/2021, 7:59:38 PM] TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
at validateString (internal/validators.js:124:11)
at Url.parse (url.js:170:3)
at Object.urlParse [as parse] (url.js:157:13)
at Object.init (/homebridge/node_modules/homebridge-hubitat-makerapi/lib/util_http.js:96:26)
at Object.init (/homebridge/node_modules/homebridge-hubitat-makerapi/lib/api-homebridge-hubitat-makerapi.js:66:19)
at new HE_ST_Platform (/homebridge/node_modules/homebridge-hubitat-makerapi/index.js:122:15)
at /usr/local/lib/node_modules/homebridge/src/server.ts:440:40
at Array.forEach ()
at Server.loadPlatforms (/usr/local/lib/node_modules/homebridge/src/server.ts:372:27)
at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:159:29)
[8/25/2021, 7:59:38 PM] Got SIGTERM, shutting down Homebridge...
[8/25/2021, 7:59:38 PM] [undefined hhm:0.4.15] Setting "local_ip" not set in config, tried to determine it and found 192.168.1.2 -> I hope this is correct
[8/25/2021, 7:59:38 PM] [undefined hhm:0.4.15] latest version on npmjs is 0.4.15
[8/25/2021, 7:59:38 PM] [undefined hhm:0.4.15] your version of the plugin is up2date
[8/25/2021, 7:59:43 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null

Make sure you have the json formatted properly and are not missing any end brackets.. including the last one!

}
1 Like

yep definitely have it in exact. No errors. but same problem :frowning:

I finally figured it out! I kept the original config file for the Bridge and pasted only in the new platform. Well not 100% sure why its working but it does. I can see my Hubitat accessories all the way through to HomeKit now via MakerAPI and Homebridge. Thanks for the patience and help @erktrek.

3 Likes

Very cool! Glad you worked it out!

1 Like

I've read through and searched but may have missed something. I have a Linear Z Wave Garage Door Opener that shows up as a Generic Z Wave Garage Door Opener.

When check I add it into my homekit, it seems to combine both the tilt sensor and the switch into the same thing but the sensor shows up as the main thing and you cannot click on it to close it.

Am I missing something easy to fix that as I've looked around and have had no luck so far.

I think that's a Apple Home app thing. Try a long press on the icon in Apple Home app and I there is an option to that says "show as two devices" (or something similar), I had something similar happen with the Ring doorbell but I can't remember the exact steps.

Hmm, seems to be missing / not available in IOS14 as the separate option isn't there when I check settings for the device. I'll dig around a bit more and see as I've migrated from SmartThings/Homebridge setup before and they did show up as two tiles.

Hi there @dan.t , periodically I run sudo npm install -g --unsafe-perm homebridge-hubitat-makerapi on my homebridge device to ensure I have the latest code. Lately I have been getting a message saying there may be some vulnerabilities and pasting below for your review/comment:

changed 93 packages, and audited 94 packages in 6s

1 package is looking for funding

run `npm fund` for details

5 **moderate** severity vulnerabilities

To address all issues possible (including breaking changes), run:

npm audit fix --force

Some issues need review, and may require choosing

a different dependency.

Have you run npm audit fix β€”force?

Just want to add … @dan.t’s plug-in is stable, mature, and has needed no updates in a good bit. If your HomeBridge integration is not WAN exposed, don’t worry about it.

1 Like

I'm not wanting to run the fix --force because I don't want to break anything. Just reporting here in case Dan wants to take a look at why it's giving those warnings. I'm not too overly concerned for the reason you just stated but again, just an fyi on the warnings.

And though we may not be affected by it, NPM does get regularly targeted by hackers as in Malware Discovered in Popular NPM Package, ua-parser-js | CISA and is practice to regularly look to harden one's code....

1 Like

what's the reasons for running homebridge via Maker api vs Tonesto7 version? I use to use homebridge via makerapi but had some problems with it a while ago and switched over to Tonesto7 which has been very stable.

I started with the MakerAPI version and have stayed with that. I have Tonesto's app in a test environment, but I have never run into issues with the MakerAPI plug-in so have not felt the need to switch. I also find the MakerAPI version simpler and it is one less app to manage.

3 Likes

MakerApi version was stable for me when I use to run it up until an update came out with changes to Makerapi itself, if I'm not mistaken. Pretty sure the problem was fixed really fast I just never switched back. One less app and simpler that's the kind of info I'm looking for, thank you

I think both are good!
A ways back I had a weird issue with the maker one where I wrote a simple timed toggle on 2 virtual HE switches, turn on after a period turn off etc.. One switch was using Maker the other was using Tonestos plugin. In HB I observed the Maker plugin getting out of sync while Tonestos seemed to reflect the correct status. I'm wondering if the issue was Maker API getting bogged down with too many requests not necessarily from HB (node-red etc). To be fair this was a little while ago and have not tested recently - though others are having no issues. The other bit with tonesto's is the ability to filter devices types..

2 Likes

Yup. @dan.t fixed that within a few hours.

2 Likes

I started with Tonesto's original (ported) Homebridge and that worked but had plenty of issues. When Dan.T rebuilt it into the MakerAPI version, I encouraged him to also create the HubConnect version. That's the one I've been using ever since and I'm sad to say that it is SOOOO stable, I never get to chat with @dan.t anymore :frowning:

4 Likes

In IOS15, this is back working again and I can see split tiles and combine tiles as it works like a charm now. So I would say it was an IOS14 thing.