New Homebridge Plug-in via MakerAPI

Sure don’t. The other 2 fans work fine. Leviton fan controller and a Honeywell.

:man_facepalming:
I bet it works if you set that fan to “low” or “medium” and not “medium-low”....

I know what it is but not near a computer at the moment. I’ll fix that ASAP...

Yep that works. Guessing medium-low isn’t declared somewhere?

The fan "definition" includes it, but not all physical fans actually implement everything.. such as "Auto" (or "Breeze" or whatever marketing term they choose.)

The result is the "driver" has to decide what to do. Nothing or translate it into a something else.

:slight_smile:

Did I read somehwere that Hubitat chose to translate Medium(anything) to Medium, where that needs to occur. (GE fan maybe?)

All, long time no update, so here is one. Version 0.2.5 just got published. Nothing major:

  • allows usage of DNS host names instead of IP address to connect to hubitat
  • fans that support setLevel command will use setLevel instead of setSpeed to allow finer granularity of speed
  • fans support all 5 speeds defined by the FanContol capability ("low","medium-low","medium","medium-high","high")
  • code baselined with homebridge-hubitat-hubconnect plugin to allow faster cross-sharing of improvements
5 Likes

All,

there is a new version of the plugin available on NPM with a bugfix for multi-sensor devices not updating temperature and humidity. In addition, the plugin now temperatures below 0. Apparently that never worked.

Thanks to @tsviper for finding these issues and testing the fixes with me.

3 Likes

Hi. I am getting an error trying to set this up on Windows 10.

Here is the output:

[5/17/2019, 5:59:51 PM] [Hubitat hhm:0.2.8] Fetching Hubitat-MakerAPI devices. This can take a while depending on the number of devices are configured!
[5/17/2019, 5:59:51 PM] [Hubitat hhm:0.2.8] Refreshing All Device Data
[5/17/2019, 5:59:51 PM] Homebridge is running on port 57119.
[5/17/2019, 5:59:51 PM] [Hubitat hhm:0.2.8] Looks like your MakerAPI instance is disabled. Got code 500
[5/17/2019, 5:59:51 PM] [Hubitat hhm:0.2.8] I am stopping my reload here and hope eveything fixes themselves (e.g. a firmware update of HE is rebooting the hub
[5/17/2019, 5:59:51 PM] [Hubitat hhm:0.2.8] latest version on npmjs is 0.2.8
[5/17/2019, 5:59:51 PM] [Hubitat hhm:0.2.8] your version of the plugin is up2date

I've been cobbling together my config.json from pieces all over the place.

Any idea what the issue might be?

Also, what is the password supposed to be in the bridge section? Mac address of the hubitat hub? Mac address of the machine runninng homebridge? just random numbers?

Thank you.

Maybe put your config file here?
The password is just random. Changing one character changes the link and can cause a refresh

I've seen that error before when I didn't have the correct app_url or access_token from the MakerAPI app. As far as I know the info in the bridge section is not a MAC address or anything. You can make up your own values...I'm just using some I found in another example. If you run multiple instances of Homebridge you want them to be different though.

Here is my config.json if it helps:

{
    "bridge": {
        "name": "Homebridge",
        "pin": "444-55-666",
        "username": "CC:23:3D:E3:CE:35",
        "port": 51821
    },
    "platforms": [
        {
            "platform": "Hubitat-MakerAPI",
            "name": "Hubitat",
            "app_url": "http://10.0.0.54/apps/api/2230",
            "access_token": "bd2d7101-3be5-4t215-8450-a2581f9c143b",
            "polling_seconds": 300,
            "mode_switches": false,
            "hsm": true,
            "excluded_attributes": {
                "101": [
                    "battery"
                ],
                "102": [
                    "battery"
                ],
                "246": [
                    "illuminance"
                ],
                "247": [
                    "illuminance"
                ],
                "248": [
                    "illuminance"
                ],
                "774": [
                    "motion",
                    "illuminance"
                ],
                "776": [
                    "motion",
                    "illuminance"
                ],
                "777": [
                    "illuminance"
                ],
                "778": [
                    "illuminance"
                ],
                "933": [
                    "presence"
                ],
                "934": [
                    "presence"
                ],
            }
        }
    ],
    "accessories": []
}

Also make sure you reserve the IP address of your Hubitat in your router.

I figured it out. I had a 6 after the url to the hub. Looks like th eboard put it there to show how many times the link was clicked? (It's a 7 now...)

Dropped that and got past that error.

Now to see if the rest works.

Thank you.

Does this work with the latest build of Homebridge v 0.4.49? I ran the update a couple of days ago and I discovered all of my homebridge devices say updating now.

EDIT: Nevermind - this was not a hubitat issue but had to do with a Dyson Fan plug-in that I use in Homebridge. One of the fans had been unplugged that that threw homebridge into an updating state. I plugged it in and Bam, we're back :slight_smile:

Everything has been working great. Have 1 issue with my Hampton bay fan controller. The fan always says it’s running when it’s not. If I turn it off via HomeKit it will show running again in a couple seconds. Pretty sure this was working correctly last version. Anyone else experiencing this?

I have also noticed there is no off event in the logs.

I just converted over from tonesto7's plugin and nearly everything is working great. I'm seeing the same issue as black01gt: "Off" events from the Hampton Bay fan controller do not appear to be working.

@jerias.mitchell and @black01gt, sorry for the delay, it has been a bit crazy.

I want to take a look at your hampton bay fan controller. Can one of you guys give me the MakerAPI response for the command:

http://[YOURHUBIP]/apps/api/[APPID]/devices/[DEVICEID]?access_token=[YOURACCESSTOKEN]

You can open that URL just a browser (replace the placeholders though) and copy the response. This way I can replicate your issue

{"id":"295","name":"Hampton Bay Zigbee Fan Controller","label":"Dining Room Fan Controller","attributes":[{"name":"level","currentValue":100,"dataType":"NUMBER"},{"name":"speed","currentValue":"off","dataType":"ENUM","values":["low","medium-low","medium","medium-high","high","on","off","auto"]},{"name":"switch","currentValue":"off","dataType":"ENUM","values":["on","off"]},{"name":"switch","currentValue":"off","dataType":"ENUM","values":["on","off"]}],"capabilities":["Switch",{"attributes":[{"name":"switch","dataType":null}]},"Configuration","SwitchLevel",{"attributes":[{"name":"level","dataType":null}]},"Refresh","Actuator","Light",{"attributes":[{"name":"switch","dataType":null}]},"FanControl",{"attributes":[{"name":"speed","dataType":null}]},"ChangeLevel"],"commands":["configure","cycleSpeed","off","off","on","on","refresh","setLevel","setSpeed","startLevelChange","stopLevelChange"]}

1 Like

Ok, I just published a new version that fixes the issue with the Hampton Bay Fan Controller and also fixes an issue with water valves

Please update your plugin

2 Likes

I've updated to the latest version (0.2.9), however, the behavior is still the same. I've tried using both the parent device and the fan-only child device with the same result.

Parent device info:

{"id":"107","name":"Living Room Fan Controller","label":"Living Room Fan Controller","attributes":[{"name":"level","currentValue":20,"dataType":"NUMBER"},{"name":"speed","currentValue":"off","dataType":"ENUM","values":["low","medium-low","medium","medium-high","high","on","off","auto"]},{"name":"switch","currentValue":"off","dataType":"ENUM","values":["on","off"]},{"name":"switch","currentValue":"off","dataType":"ENUM","values":["on","off"]}],"capabilities":["Switch",{"attributes":[{"name":"switch","dataType":null}]},"Configuration","SwitchLevel",{"attributes":[{"name":"level","dataType":null}]},"Refresh","Actuator","Light",{"attributes":[{"name":"switch","dataType":null}]},"FanControl",{"attributes":[{"name":"speed","dataType":null}]},"ChangeLevel"],"commands":["configure","cycleSpeed","off","off","on","on","refresh","setLevel","setSpeed","startLevelChange","stopLevelChange"]}

Child device info:

{"id":"108","name":"Hampton Bay Fan Component","label":"Living Room Fan","attributes":[{"name":"level","currentValue":75,"dataType":"NUMBER"},{"name":"speed","currentValue":"off","dataType":"ENUM","values":["low","medium-low","medium","medium-high","high","on","off","auto"]},{"name":"switch","currentValue":"off","dataType":"ENUM","values":["on","off"]}],"capabilities":["Switch",{"attributes":[{"name":"switch","dataType":null}]},"SwitchLevel",{"attributes":[{"name":"level","dataType":null}]},"Refresh","Actuator","FanControl",{"attributes":[{"name":"speed","dataType":null}]}],"commands":["cycleSpeed","off","on","refresh","setLevel","setSpeed"]}

Here are the events when the fan is turned "off" from the device page (this is the child device):

{"device_id":"108","label":"Living Room Fan","name":"switch","value":"off","date":"2019-05-28T22:09:01+0000","isStateChange":null,"source":"DEVICE"},{"device_id":"108","label":"Living Room Fan","name":"speed","value":"off","date":"2019-05-28T22:09:01+0000","isStateChange":null,"source":"DEVICE"}

Let me know if I can provide any further debug information.

Do you see any error messages in Hubitat? I can only simulate it with a virtual driver and in that case it worked

I do not see any errors related to the fan or MakerAPI.

I've noticed that when the fan is in the "off" state, the level still has a value that matches what's seen in the Home app:

Current States

  • level : 25
  • speed : off
  • switch : off

Also, the "off" event does not show up in the Homebridge logs, but other events from the fan device do.