[RELEASE] Homebridge Hubitat v2.0

Hi every one I'm having problems with config...at the moment I am using the API method but thought I'd try this way but I'm having issues with the config file, I've tried various ways of changing the existing config. I have even tried typing it in line by line.

Here is what I have so far:
{
"bridge": {
"name": "Homebridge",
"username": "0A:3A:D1:73:58:25",
"port": 51936,
"pin": "358-92-9XX"
},
"mdns": {
"interface": "192.168.68.1XX"
},
"platforms": [
{
"platform": "Hubitat-v2",
"name": "Hubitat-v2",
"app_url_local": "http://192.168.68.1XX/apps/api/",
"app_url_cloud": "https://cloud.hubitat.com/api/b7ec81f2-78ab-4929-XXXX-9f8baa90968b/apps/",
"app_id": 1154,
"app_platform": "Hubitat",
"use_cloud": true,
"access_token": "ca9ca0f1-fd47-4009-XXXX-446fca2a1321",
"temperature_unit": "C",
"validateTokenId": false,
"logConfig": {
"debug": false,
"showChanges": true,
"hideTimestamp": false,
"hideNamePrefix": false,
"file": {
"enabled": true
}
}

Any ideas where I'm going wrong?

Thanks.

@jon.d.tyler - Are you missing an end square bracket "]" somewhere after "platforms"?

Note: probably just before the last "}"..

1 Like

I find indenting helps quite a bit when debugging these:

{
	"bridge": {
		"name": "Homebridge",
		"username": "0A:3A:D1:73:58:25",
		"port": 51936,
		"pin": "358-92-9XX"
	},
	"mdns": {
		"interface": "192.168.68.1XX"
	},
	"platforms": [
		{
			"platform": "Hubitat-v2",
			"name": "Hubitat-v2",
			"app_url_local": "http://192.168.68.1XX/apps/api/",
			"app_url_cloud": "https://cloud.hubitat.com/api/b7ec81f2-78ab-4929-XXXX-9f8baa90968b/apps/",
			"app_id": 1154,
			"app_platform": "Hubitat",
			"use_cloud": true,
			"access_token": "ca9ca0f1-fd47-4009-XXXX-446fca2a1321",
			"temperature_unit": "C",
			"validateTokenId": false,
			"logConfig": {
				"debug": false,
				"showChanges": true,
				"hideTimestamp": false,
				"hideNamePrefix": false,
				"file": {
					"enabled": true
				}
			}
		}
	]
}
1 Like

Managed to save the file....thanks to both of you...there's a reason I'm not a software engineer :wink:

I'm now having another problem. it only seems to be working one way...the homebridge can see the 4 devices I've added (2 Garage Doors & 2 Prescience Sensors) but does not control them. I've got a lot of these message:
[1/8/2021, 2:44:43 pm] [Hubitat-v2] ERROR: sendStartDirect Connection failure | Message: Request failed with status code 500
[1/8/2021, 2:44:44 pm] [Hubitat-v2] INFO: INFO: Your plugin version is up-to-date
[1/8/2021, 2:44:44 pm] [Hubitat-v2] NOTICE: Sending Plugin Status to Hubitat | UpdateAvailable: false | newVersion: 2.2.1
[1/8/2021, 2:44:45 pm] [Hubitat-v2] ERROR: sendUpdateStatus Connection failure | Message: Request failed with status code 500

2 Likes

Restart Homebridge

I've tried that a couple of time now. I'll try restarting hubitat

Now getting these errors after a reboot of Homebridge and Hubitat:
[1/8/2021, 3:01:35 pm] [Hubitat-v2] ERROR: getDevices Connection failure | Message: connect ECONNREFUSED 192.168.68.139:80
[1/8/2021, 3:01:35 pm] [Hubitat-v2] ALERT: Total Initialization Time: (0 seconds)
[1/8/2021, 3:01:35 pm] [Hubitat-v2] NOTICE: Unknown Capabilities: []
[1/8/2021, 3:01:35 pm] [Hubitat-v2] INFO: Hubitat DeviceCache Size: (4)
[1/8/2021, 15:01:36] [Homebridge UI] Homebridge Config UI X v4.36.0 is listening on :: port 8581
[1/8/2021, 3:01:35 pm] [Hubitat-v2] INFO: WebServer Initiated...
[1/8/2021, 3:01:35 pm] [Hubitat-v2] INFO: Sending StartDirect Request to Hubitat | UsingCloud: (false)
[1/8/2021, 3:01:35 pm] [Hubitat-v2] INFO: Direct Connect Active | Listening at 192.168.68.137:8000
[1/8/2021, 3:01:35 pm] [Hubitat-v2] ERROR: sendStartDirect Connection failure | Message: connect ECONNREFUSED 192.168.68.139:80
[1/8/2021, 3:01:37 pm] [Hubitat-v2] INFO: INFO: Your plugin version is up-to-date
[1/8/2021, 3:01:37 pm] [Hubitat-v2] NOTICE: Sending Plugin Status to Hubitat | UpdateAvailable: false | newVersion: 2.2.1
[1/8/2021, 3:01:37 pm] [Hubitat-v2] ERROR: sendUpdateStatus Connection failure | Message: connect ECONNREFUSED 192.168.68.139:80

Your hub is located at 192.168.68.139 ?

Your app id for HomeBridge is 1154?

Yes to both questions.

[1/8/2021, 3:01:35 pm] [Hubitat-v2] ERROR: sendStartDirect Connection failure | Message: connect ECONNREFUSED 192.168.68.139:80

Doesn't want to connect for some reason. Make sure your access token is okay I guess.

Also maybe check out the "Generated HomeBridge Plugin Platform Config" to see if any difference. I have "validateTokenId" set to true.

1 Like

Copy and pasted then into config again and the errors have gone....fingers crossed.

thanks for all your help.

1 Like

The ID number is suppose to be the serial number of the device within the Home app. However, the serial number isn't listed if you are using Homebridge Hubitat v2.0.

Have you tried using the "Heat Only Thermostat" option from within the app?

Screen Shot 2021-01-08 at 8.48.39 AM

Have you tried using the "Heat Only Thermostat" option from within the app?

Yup, both of my thermostats are in the "Heat Only Thermostats" section:

@Vettester Does your Fireplace thermostat not show fan controls in the Home iOS App!?

However, the serial number isn't listed if you are using Homebridge Hubitat v2.0.

Do you know of any way to loop up this number somewhere?

1 Like

The heat only option does show the fan, Try using just the Thermostat option.

Try using just the Thermostat option.

That worked - No more fan controls shown! Thank you!!! :smiley:

1 Like

Hello all, apologies with the very basic question, but I am new to the Apple ecosystem. I do find that my Neato D7 (vacuum robot) works very well within iOS and can be instructed to clean certain zones vice a whole-home cleaning. I thought it would be a goo idea to integrate this with Hubitat of course.

I've installed Homebridge Hubutat v2 and created a Virtual Switch to be used as a trigger to activate the robot.

Not sure how I integrate Hubiat to Homekit though. I Selected the switch within the Homebridge App, but when I try to add accessory within Homekit on my iPhone, nothing (except for my Sonos speakers and Lutron stuff) seems to show up.

I'm obviously missing a very basic step here, but can't seem to wrap my head around what it is.

Can anyone steer me in the right direction. Here is what I am trying to do.

I want to have a motion sensor controlled within Hubitat trigger the robot vacuum (in this case the motion sensor is near a cat litter.

Basically:

  1. Motion triggered
  2. Short delay
  3. Vacuum is instructed to clean Zone 'Litter'

I figure I want to take the motion trigger form Hubitat and pass that off to Homekit to trigger a shortcut for the vacuum.

You need to set up a homebridge server and connect the Hubitat to it then link the homebridge server to the Apple Hub.

It's very slick.. I am actually using Homebridge right now without any apple products. Using it for Nest and Ring integrations.

2 Likes

LOL. Ok obviously I was missing a major piece here,

Thanks!!

2 Likes

Thanks for releasing this tonesto7, it's a tremendous bit of kit. I have the majority of my Hubitat devices available under Homekit and working well. Everything except fans.

I'm using the Haiku Fan driver to control my fan. This works great using Hubitat. The fan comes with a light and the driver controls both by supporting capabilities "FanControl", "SwitchLevel" and "Switch". Switch and SwitchLevel are for the light while FanControl is for the fan.

I've added the driver twice to Hubitat and associated one with Lights and one with Fans (3 Speeds) in Homebridge Hubitat. They both appear in Apple Home and have the correct button assigned. The behaviour I'm seeing with Homebridge is that regardless of which button is used, only the light can be controlled.

In the logs I see this when the fan is turned on:

dev:272021-01-17 12:06:26.715 debug parse response: (Balcony Fan;LIGHT;LEVEL;ACTUAL;16)
app:592021-01-17 12:06:26.698 info Homebridge (v2.2.2) | | Balcony Fan Homebridge | Command [setLevel()] | Process Time: (30ms)
app:592021-01-17 12:06:26.688 info Homebridge (v2.2.2) | Command Successful for Device Balcony Fan Homebridge | Command [setLevel(100)]
dev:27 2021-01-17 12:06:26.668 debug parse response: (Balcony Fan;LIGHT;PWR;ON)
app:59 2021-01-17 12:06:26.658 info Homebridge (v2.2.2) | Plugin called Process Command | DeviceId: 27 | Command: (setLevel) | Param1: (100)
app:59 2021-01-17 12:06:26.290 info Homebridge (v2.2.2) | | Balcony Fan Homebridge | Command [on()] | Process Time: (213ms)
app:59 2021-01-17 12:06:26.271 info Homebridge (v2.2.2) | Command Successful for Device Balcony Fan Homebridge | Command [on()]
app:59 2021-01-17 12:06:26.194 info Homebridge (v2.2.2) | Plugin called Process Command | DeviceId: 27 | Command: (on)

setLevel() and on() are both commands that only apply to lights. For fans both of these should be translated to setSpeed().

I'm also not sure why Fans (3-Speeds) and Fans (4-Speeds) are required? In Hubitat all drivers that support FanControl capability can handle 5 speeds: low, medium-low, medium, medium-high and high. I believe Homebridge Hubitat should be translating the percentage level into one of these five speeds and letting the driver handle the rest. The device categories Fans and Fans (Multi-speed) should be all that's required.

The Haiku fan driver is the only multi-speed fan I have, so I'm not sure if the existing code works to support other fan drivers? If not, I can make these changes if you'd like and submit a pull request?

Is this normal?

Error: Homebridge (v2.2.2) | sendHttpPost: no plugin server configured src: sendDeviceRefreshCmd path: refreshDevices

Error: Homebridge (v2.2.2) | sendHttpPost: no plugin server configured src: updateServicePrefs path: updateprefs