Closed basilbabaa closed 2 years ago
Thanks for reporting but I see no evidence that this is a bug.
The issue is likely that Hubitat could reach the plug-in instance for some reason.
Thousands of people use this plugin and when they have this issue it's often the configuration settings or a network/firewall issue on the host running the plugin.
I am having the same / similar issue. Homekit is not getting Hubitat z-wave status changes. I see no log issues in home bridge, all updates have been completed.
I am having the same / similar issue. Homekit is not getting Hubitat z-wave status changes. I see no log issues in home bridge, all updates have been completed.
Mine eventually started working as expected. I literally shut down everything. Waited a few min and restarted my entire system. Starting with Uni Edge Switch, then Gateway Modem, then Eero network, then HomeKit Hubs, then Lutron Caseta and Hue Bridges, then Hoobs, then Hubitat, so unfortunately I am unsure what the exact issue was. But it believe will work for you as expected.
I chose to drop a bomb to see if I could save time in troubleshooting and it worked. But If you are able to surgcially isolate better than I was, It would be nice to know what you find.
I have some similar gear, so there might be a combo there which may be the issue. I will follow your plan and power everything down and then bring back up. Will advise on the results!
I just shutdown and powered everything back up. No change in status going to homekit... and I saw this in the log, but its 100% correct data [03/11/2021, 16:41:54] [Hubitat-v2] sendStartDirect Connection failure | Message: Request failed with status code 404
I originally noticed my problem because in certain places in my home/office I use Alexa do some things. She would turn on lights but HomeKit never saw them as having been turned on.
When I realized there was a problem I also stopped looking at Homekit or Alexa until the logs on hoobs and hubitat were in sync. I'd turn a switch on in hoobs and see if hubitat logged it. Then I'd turn that switch off in hubitat and see if hoobs logged it. Once they were in sync HomeKit started seeing the changes. And changes executed by Alexa were reflecting in HomeKit.
I'm even presenting virtual buttons in Hubitat that I created to run some rules in the rule machine to HomeKit through this Plugin. Maybe you can compare?
In my troubleshooting, I also tried the Homebridge Hubitat Plugin by jvmahon and it worked okay and was easy to setup. But I was curious why this one which was certified and appeared to have more options did not work for me. So I do also recall having to install this several times and fighting with it. Maybe somewhere in the process I had something in the config wrong and that was the actually issue and not the reboot.
Here' is how mine is setup.
In Hubitat I labeled my App Hoobs on T7 Bridge
This is my current Hubitat Bridge config in Hoobs:
{ "platform": "Hubitat-v2", "name": "Hubitat-v2", "direct_port": 8000, "adaptive_lighting_offset": 0, "temperature_unit": "F", "round_levels": true, "adaptive_lighting": true, "consider_fan_by_name": true, "consider_light_by_name": true, "validateTokenId": false, "logConfig": { "showChanges": true }, "use_cloud": false, "app_url_local": "http://192.168.X.1/apps/api/", "app_url_cloud": "https://cloud.hubitat.com/api/###your number here###/apps/", "access_token": "###your access token here###", "app_id": 652 }
Have the same issue: Temp/Humidity sensor state changes never get to the Homebridge pi. A separate switch works fine though: if I physically flip the switch the new state gets to the Homebridge and HomeKit app just fine, and is reflected in the Hubitat logs:
app:682021-11-22 07:31:05.726 pm info Homebridge (v2.5.12) | Sending DEVICE Event (Basement Outlet | SWITCH: on) to Homebridge at (192.168.0.208:8000)
dev:12021-11-22 07:31:05.693 pm infoBasement Outlet was turned on [physical]
The sensor event never gets the Sending DEVICE Event log statement after the Hubitat logs the values change:
dev:22021-11-22 07:36:34.807 pm infoSonoff Temperature & Humidity Sensor is 50%RH
dev:22021-11-22 07:32:03.967 pm infoSonoff Temperature & Humidity Sensor temperature is 73.71°F
This is 100% consistent, the sensor updates never get sent out after Hubitat fires the event. The switch state is sent out every time. The switch and sensor state changes are mere minutes away (the logs above show it too).
I only have two devices setup, a sensor and a switch, both Zigbee, they seem to work perfectly ok with Hubitat alone. Hubitat and Homebridge Pi are wired to the the same ethernet switch.
SOLVED: see the bottom paragraph.
I noticed that the app was not subscribing to receive events from the problem Sensor. I verified that in the Event Subscription table in the Hubitat GUI. I tried rebooting, powering off, you name it, nothing would make it subscribe to the sensor device's events.
I then renamed the sensor to drop the '&', you know because of interpolated strings of groovy, who knows. Also, removed the sensor from the config, and then added it again. And what do you know, the app subscribed to the events, and I started getting updates in the Hombridge plugin.
I know the '&' in the name should not have mattered, so I put it back in, and removed and added the device in app's config again, and I was still getting updates. So it is definitely not the '&' in the name. So I kept digging.
HERE IS THE BUG: When you add devices by going through the App's config, select the device in the section, click "Update", then click "Done" at the very bottom, and, importantly, then just leave the screen. The device even though is getting added to the app's config, will not be subscribing to get events, even if you reboot the hub. So, the solution? You must complete the asinine sequence of the config screens, because clicking "Done" does not really mean done, no! After clicking the "Done" once in the config and after the screen refreshes, you must scroll down again, and boom!, there is now a "Next" button, which you must click, which brings you to the "Please Donate" screen, where you must click "Done" again. And that will make device behave as expected. Now, this here is the best example of the worst UIX ever.
I had the exact same issues as everyone else here, also debugged quite extensively. I basically noticed that the state was updated in Hubitat for (in my case, motion) sensors, but it was never reflected in Homebridge or HomeKit. It was never even sent within the event queue in the Homebridge V2 App.
My solution was actually @tonesto7’s: I reread the readme and realized my server that was hosting Homebridge didn’t have port 8000 open, which is what the app in Hubitat uses to update Homebridge.
After opening the port on the server from Hubitat’s IP (in my case, using ufw for Ubuntu), everything worked correctly.
@fluffylizard Thanks for the workaround! I was seeing the exact same issue where Hubitat status was not being reflected in Home kit. There was probably an easier way, but I had to delete the Bridge in HOOBS and basically start all over with the plug-in configuration. But by following your guide I now have 2-way sync. The plug-in UX certainly needs work.
What kind of work are you referring to? The plugin UX is very limited and is generated via a config file. I'm open to suggestions!
If you would like to play with it and send me a pull request I will gladly implement if the change make sense
What kind of work are you referring to? The plugin UX is very limited and is generated via a config file. I'm open to suggestions!
If you would like to play with it and send me a pull request I will gladly implement if the change make sense
I just started playing with HOOBS and your plug-in yesterday. So my first attempt at getting the plug-in working didn't go quite as planned. My first attempt resulted in a one-way working bridge (Homekit to Hubitat), and on the Hubitat side somehow "Homebridge v2" wasn't showing up in the app list. I guess I didn't properly go through all the "Update" and "Done" button press steps? I'm not sure. But @fluffylizard directions above cured both the bi-directional comms issue and now the Homebridge v2 app is listed in the Apps list in Hubitat.
I don't know what UI improvements can be made given the platform constraints...I'm not a coder. But making the config experience more 'idiot proof' in terms of all the update/done buttons could lead to fewer frustrated users.
SOLVED: see the bottom paragraph.
I noticed that the app was not subscribing to receive events from the problem Sensor. I verified that in the Event Subscription table in the Hubitat GUI. I tried rebooting, powering off, you name it, nothing would make it subscribe to the sensor device's events.
I then renamed the sensor to drop the '&', you know because of interpolated strings of groovy, who knows. Also, removed the sensor from the config, and then added it again. And what do you know, the app subscribed to the events, and I started getting updates in the Hombridge plugin.
I know the '&' in the name should not have mattered, so I put it back in, and removed and added the device in app's config again, and I was still getting updates. So it is definitely not the '&' in the name. So I kept digging.
HERE IS THE BUG: When you add devices by going through the App's config, select the device in the section, click "Update", then click "Done" at the very bottom, and, importantly, then just leave the screen. The device even though is getting added to the app's config, will not be subscribing to get events, even if you reboot the hub. So, the solution? You must complete the asinine sequence of the config screens, because clicking "Done" does not really mean done, no! After clicking the "Done" once in the config and after the screen refreshes, you must scroll down again, and boom!, there is now a "Next" button, which you must click, which brings you to the "Please Donate" screen, where you must click "Done" again. And that will make device behave as expected. Now, this here is the best example of the worst UIX ever.
You're a lifesaver, thanks for that!
Hey All - I'm experiencing this same issue:
I have several GE Enbrighten z-wave dimmers around my house all connected to a Hubitat. The Hubitat is then connected to HomeBridge (on my synology nas), and then to Homekit.
The problem I'm having is that HomeKit does not reflect the correct state (on/off) of the dimmers when the buttons are physically pressed. Hubitat shows the correct state, but for some reason this state is not making it down the line to HomeKit.
Example: I physically turn on the dimmer at the wall, lights turn on, Hubitat recognizes this state, but HomeKit still shows the lights as being off. I've even tried manually clicking "Refresh" in Hubitat to see if this somehow triggers the state to be sent to HomeKit, but nothing happens.
Hubitat, Homebridge, and all apps/plugins are up-to-date
I am having the same issues. i have removed the app and all the devices from homebridge. Reinstalled it, clicked on all the done/update/next buttons i could and still having same issues.
Turned out it was a "simple" user error in the Homebridgev2 app on Hubitat. When you add a device, you must go down to the bottom of the screen and click Next. Then it takes you to another Confirmation Page where you must click Done. It seems like you can add devices (they show up on the list), but unless you complete these next steps then they don't properly sync over to HomeBridge, and thus won't show up on HomeKit.
I have done this and they show up in homekit, the problem is that they are not getting updated on homekit.
Try deleting all devices from HomebridgeV2, then delete HomeKit from your phone. Reinstall the devices on HomebridgeV2 (on the Hubitat), and then re-install HomeKit on your phone. It's kind of a pain as it will go through adding all devices wizard. Luckily I only had about 15 devices. Once I did that they all synced up.
It also could be related to not being true bi-directional communication between Hubitat - HomeBridge - Homekit. I remember some posts on Reddit(?) about testing this to see where the breakdown is.
This issue has been marked stale automatically after no activity for the last 60 days.
I am having the same issue. It is one way communication from homekit -> homebridge -> hubitat, but the link other way is broken somewhere
I am having issues with even the 'Hubitat Safety Monitor'. Pretty sure I am sifting through all the pages and tabs, so thats not the problem.
Here is an additional message in my homebridge log - perhaps a clue to whats going on
[homebridge-hubitat-tonesto7] This plugin generated a warning from the characteristic 'Security System Target State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
Verify the following before opening an trouble issue
Go over all the following points, and put an
x
in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!App Code
.About Your Setup
Expected Behavior
Changing device state from HomeKit updates device state in Hubitat and vice versa.
Current Behavior
Changing device state in HomeKit updates device state in Hubitat; but changing device state in Hubitat DOES NOT change device state in HomeKit.
Steps to Reproduce (for bugs)
Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant
MY STEPS TO REMEDY THE PROBLEM
Context
How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world**
1) I almost went with the Homebridge-Hubitat Plugin by jvmahon, because it worked with these ZigBee devices flawlessly the very first time I installed it; i.e. never were device state changes made in Hubitat not reflected on the devices in HomeKit.
2) But since yours is the Homebridge certified plugin I though I would send this report just to mention what I experienced and to possibly help out if you are able to reproduce the issue and better your Plugin.
Please include a copy of any relevant log output to assist in tracking down the bug