HubConnect, HOOBS and buttons with HomeKit

Hello,

I have setup Hubconnect and Hubitat Hubconnect (homebridge-hubitat-hubconnect) installed on a Hoobs raspberry Pi. Everything works perfect but was wondering if there is a way to use a button in HomeKit. I setup a button in Hubitat and it shows up as a switch in HomeKit (which will crash Hoobs). Should I use a different Hubconnect on Hoobs or are buttons currently not supported. Anyone have any experience?

Thanks!

Mike

Homekit really has not representation of buttons. Buttons have an ability to be "pushed", "released" and "held" (depending on the button type) and there is currently nothing like this in HomeKit. In addition, some devices have multiple buttons (e.g. Pico remotes) and the Homekit UI doesn't provide any ability to model something like this.

The plugin exposes button 1 as a switch which gets turned off right after it was turned on to simulate a button push. It should crash through. If you can post your Homebridge logs here when it crashes and I can take a look at it.

Learned something new today... thanks for making me Google HOOBS! Nice to see someone trying to make HomeBridge user friendly and simple to install/maintain. I am going to have to give this a try with a spare Raspberry Pi I have.

Thank you!

Thanks for the calcification. Makes total sense! Just starting to mess around with HomeKit. I was wondering about buttons because the HSM shows a button like switch (Arm, Disarm, etc).

Here are the last bit of logs from the Hubconnect and Hoobs.

Hubconnect Logs
[1/22/2020, 08:17:25] [Hubitat hhh:0.3.8] HE websocket sending keepalive ping
[1/22/2020, 08:17:25] [Hubitat hhh:0.3.8] HE got pong
[1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] Refreshing All Device Data
[1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] GET: { debug: false, path: '/devices/get', method: 'GET' }
[1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] Received All Device Data
[1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] Loading HSM
[1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] GET: { debug: false, path: '/hsm/get', method: 'GET' }
[1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] Processing HSM
[1/22/2020, 08:18:06] [Hubitat hhh:0.3.8] send ping
[1/22/2020, 08:18:06] [Hubitat hhh:0.3.8] GET: { debug: false, path: '/ping', method: 'GET' }
[1/22/2020, 08:18:10] [Hubitat hhh:0.3.8] GET: { debug: false, path: '/event/337/push/["1"]', method: 'GET' }
[1/22/2020, 08:18:10] [Hubitat hhh:0.3.8] Received new ws message: {"source":"DEVICE","name":"pushed","displayName":"Test Homekit Keypad","value":"1","unit":null,"deviceId":337,"hubId":null,"locationId":null,"installedAppId":null,"descriptionText":"Test Homekit Keypad button 1 was pushed"}
[1/22/2020, 08:18:10] [Hubitat hhh:0.3.8] Change Event (Socket): (Test Homekit Keypad:337) [PUSHED] is 1
[1/22/2020, 08:18:10] [Hubitat hhh:0.3.8] Change Event: (337) [PUSHED] is 1
- this is the end of the log before it crashed.

Hoobs Logs
[Homebridge] [1/22/2020, 08:17:25] [Hubitat hhh:0.3.8] HE websocket sending keepalive ping
[Homebridge] [1/22/2020, 08:17:25] [Hubitat hhh:0.3.8] HE got pong
[Homebridge] [1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] Refreshing All Device Data
[Homebridge] [1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] GET: { debug: false, path: '/devices/get', method: 'GET' }
[Homebridge] [1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] Received All Device Data
[Homebridge] [1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] Loading HSM
[Homebridge] [1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] GET: { debug: false, path: '/hsm/get', method: 'GET' }
[Homebridge] [1/22/2020, 08:18:04] [Hubitat hhh:0.3.8] Processing HSM
[Homebridge] [1/22/2020, 08:18:06] [Hubitat hhh:0.3.8] send ping
[Homebridge] [1/22/2020, 08:18:06] [Hubitat hhh:0.3.8] GET: { debug: false, path: '/ping', method: 'GET' }
[Homebridge] [1/22/2020, 08:18:10] [Hubitat hhh:0.3.8] GET: { debug: false, path: '/event/337/push/["1"]', method: 'GET' }
[Homebridge] [1/22/2020, 08:18:10] [Hubitat hhh:0.3.8] Received new ws message: {"source":"DEVICE","name":"pushed","displayName":"Test Homekit Keypad","value":"1","unit":null,"deviceId":337,"hubId":null,"locationId":null,"installedAppId":null,"descriptionText":"Test Homekit Keypad button 1 was pushed"}
[Homebridge] [1/22/2020, 08:18:10] [Hubitat hhh:0.3.8] Change Event (Socket): (Test Homekit Keypad:337) [PUSHED] is 1
[Homebridge] uncaughtException: platform is not defined
[Homebridge] [1/22/2020, 08:18:10] ReferenceError: platform is not defined
at HE_ST_Platform.processFieldUpdate (/home/hoobs/.hoobs/node_modules/homebridge-hubitat-hubconnect/index.js:765:66)
at /home/hoobs/.hoobs/node_modules/homebridge-hubitat-hubconnect/lib/receiver-homebridge-hubitat-hubconnect.js:665:30
at Array.forEach ()
at WebSocket.ws.onmessage (/home/hoobs/.hoobs/node_modules/homebridge-hubitat-hubconnect/lib/receiver-homebridge-hubitat-hubconnect.js:663:27)
at WebSocket.onMessage (/home/hoobs/.hoobs/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:210:5)
at Receiver.receiverOnMessage (/home/hoobs/.hoobs/node_modules/ws/lib/websocket.js:800:20)
at Receiver.emit (events.js:210:5)
at Receiver.dataMessage (/home/hoobs/.hoobs/node_modules/ws/lib/receiver.js:423:14)
at Receiver.getData (/home/hoobs/.hoobs/node_modules/ws/lib/receiver.js:353:17)
at Receiver.startLoop (/home/hoobs/.hoobs/node_modules/ws/lib/receiver.js:139:22)
at Receiver._write (/home/hoobs/.hoobs/node_modules/ws/lib/receiver.js:74:10)
at doWrite (_stream_writable.js:431:12)
at writeOrBuffer (_stream_writable.js:415:5)
at Receiver.Writable.write (_stream_writable.js:305:11)
at Socket.socketOnData (/home/hoobs/.hoobs/node_modules/ws/lib/websocket.js:875:35)
[Homebridge] uncaughtException: platform is not defined
[Homebridge] [1/22/2020, 08:18:10] Got SIGTERM, shutting down service...
[Homebridge] [1/22/2020, 08:18:10] [Hubitat hhh:0.3.8] Change Event: (337) [PUSHED] is 1
[Homebridge] ReferenceError: platform is not defined
[Homebridge] at HE_ST_Platform.processFieldUpdate (/home/hoobs/.hoobs/node_modules/homebridge-hubitat-hubconnect/index.js:765:66)
[Homebridge] at /home/hoobs/.hoobs/node_modules/homebridge-hubitat-hubconnect/lib/receiver-homebridge-hubitat-hubconnect.js:208:26
[Homebridge] at Layer.handle [as handle_request] (/home/hoobs/.hoobs/node_modules/express/lib/router/layer.js:95:5)
[Homebridge] at next (/home/hoobs/.hoobs/node_modules/express/lib/router/route.js:137:13)
[Homebridge] at Route.dispatch (/home/hoobs/.hoobs/node_modules/express/lib/router/route.js:112:3)
[Homebridge] at Layer.handle [as handle_request] (/home/hoobs/.hoobs/node_modules/express/lib/router/layer.js:95:5)
[Homebridge] at /home/hoobs/.hoobs/node_modules/express/lib/router/index.js:281:22
[Homebridge] at param (/home/hoobs/.hoobs/node_modules/express/lib/router/index.js:354:14)
[Homebridge] at param (/home/hoobs/.hoobs/node_modules/express/lib/router/index.js:365:14)
[Homebridge] at param (/home/hoobs/.hoobs/node_modules/express/lib/router/index.js:365:14)
[Homebridge] at Function.process_params (/home/hoobs/.hoobs/node_modules/express/lib/router/index.js:410:3)
[Homebridge] at next (/home/hoobs/.hoobs/node_modules/express/lib/router/index.js:275:10)
[Homebridge] at jsonParser (/home/hoobs/.hoobs/node_modules/body-parser/lib/types/json.js:110:7)
[Homebridge] at Layer.handle [as handle_request] (/home/hoobs/.hoobs/node_modules/express/lib/router/layer.js:95:5)
[Homebridge] at trim_prefix (/home/hoobs/.hoobs/node_modules/express/lib/router/index.js:317:13)
[Homebridge] at /home/hoobs/.hoobs/node_modules/express/lib/router/index.js:284:7
[Refresh Services] connect ECONNREFUSED 127.0.0.1:51826
[Refresh Services] connect ECONNREFUSED 127.0.0.1:51826
[Refresh Services] connect ECONNREFUSED 127.0.0.1:51826
[Refresh Services] connect ECONNREFUSED 127.0.0.1:51826
[Refresh Services] connect ECONNREFUSED 127.0.0.1:51826
[Refresh Services] connect ECONNREFUSED 127.0.0.1:51826
[Refresh Services] connect ECONNREFUSED 127.0.0.1:51826
[Refresh Services] connect ECONNREFUSED 127.0.0.1:51826

  • It just keeps repeating a Refresh Services

Thanks, that helped a lot! I just released a new version that should fix that issue.

2 Likes

Awesome! I'll give it a try.

@mikepalmer-vnd I just got HOOBS up and running in less than 20 minutes using @dan.t's awesome Hubitat Maker API HomeBridge plugin. I am amazed at how simple that process was!

@dan.t - Great work on that HomeBridge plugin. Very slick web-based configuration tool. You've made what used to be a tedious process incredibly streamlined! Thank you very much!

1 Like

@ogiewon I discovered Hoobs a month ago and am really impressed. I was building dashboards in Hubitat for quick access to controls. Then realized my family uses IOS devices and decided to use HomeKit as our controls. Finding it does 90% of what I need and makes it super simple for the family.

1 Like

I've seen you mention this a few times recently and decided to check it out! It looks neat, so thanks for mentioning it! I did decide against it in favor of a "plain" HomeBridge install, the process for which I was already familiar with (I'm just moving servers and deciding to set it up from scratch again). But then in that process, I discovered homebridge-config-ui-x as (an optional) part of the apparently standard HomeBridge installation instructions, and decided to give that a try. It looks like this is actually what originally inspired HOOBS and is what significant parts were based on (with additional improvements--it's a HomeBridge Plug-in the way I'm using and this will be unavailable if HomeBridge itself gets messed up, something they seem to have separated, for example). Still, it provides a bit of an easier way for me to edit the config file without needing to SSH into my box and paste things into nano or whatnot, so pretty neat! Just another idea for those who have an existing HomeBridge setup and want to experiment with something similar. (I almost didn't!)

Now, to figure out why I can't get HubConnect to ... connect to it. :slight_smile: (Possibly a beta issue; I have a ticket in and don't want to derail to that discussion here.)

1 Like

It's running fine for me. I messed up the first instance and had the wrong IP address of my HOOBS pi and it kept sending to it even after I corrected it. What errors are you getting?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.