I donāt suspect the node server, but I would need to confirm with the new code. Previously, I completely shutdown my node server and still experienced the issue. But if at least Homebridge isnāt running on the node server, Iāll get errors from the Homebridge app in HE and that could influence the results.
I didnāt try the app with no devices enabled. Iām about to travel, so remote testing will be out of the question. I can try tomorrow morning, but wonāt be able to test further until the end of April. A lot could change here in that time, so my test might not even be valid or at all helpful by that time.
I was thinking on the HE side. in the app there is a listener to listen to events coming from the node server. Who knows if its getting a lot of commands at that time that is contributing. Its just something else to look at.
Well then.. by the end of april we will have a whole new environment. Thanks for leaving us hanging here.
I'm using your latest code and the web sockets method. Working great except for HSM updates. Homebridge crashes with the following error when changing HSM mode. Any idea what's going on?
[Hubitat Plugin Action] Command: stay | Value: Nothing | DeviceID: (alarmSystemStatus_1) | local_cmd: false
/usr/lib/node_modules/homebridge-hubitat-tonesto7/index.js:313
newChange.push( { device: 'alarmSystemStatus_' + $jsonData['locationId'], attribute: 'alarmSystemStatus', value: jsonData['value'], date: new Date(), displayName: jsonData['displayName'] });
^
ReferenceError: $jsonData is not defined
at WebSocket.ws.onmessage (/usr/lib/node_modules/homebridge-hubitat-tonesto7/index.js:313:74)
at WebSocket.onMessage (/usr/lib/node_modules/ws/lib/event-target.js:120:16)
at emitOne (events.js:96:13)
at WebSocket.emit (events.js:191:7)
at Receiver.receiverOnMessage (/usr/lib/node_modules/ws/lib/websocket.js:789:20)
at emitOne (events.js:96:13)
at Receiver.emit (events.js:191:7)
at Receiver.dataMessage (/usr/lib/node_modules/ws/lib/receiver.js:422:14)
at perMessageDeflate.decompress (/usr/lib/node_modules/ws/lib/receiver.js:379:23)
at _decompress (/usr/lib/node_modules/ws/lib/permessage-deflate.js:298:9)
at _inflate.flush (/usr/lib/node_modules/ws/lib/permessage-deflate.js:376:7)
at afterWrite (_stream_writable.js:383:3)
at onwrite (_stream_writable.js:374:7)
at afterTransform (_stream_transform.js:79:3)
at TransformState.afterTransform (_stream_transform.js:54:12)
at Zlib.callback (zlib.js:625:5)
Thanks for the feedback. The Websocket implementation is still in an alpha state and I am working on some bugs in there. This feedback is great though! Iāll have something posted to fix this later this afternoon, have to get some work items done.
All, just keep in mind that this is not a stable implementation yet!!!! I am working on it though . Once I am done, I am going to create a pull request to @tonesto7 for him to review the work I have done. This is still his code and I am just trying to tinker....
@tsviper: I did fix the hsm issue that you had and updated the file in my repo.
Hopefully we can collaborate on this whole project more. It would be nice to have more ideas and perspectives in the code other than just mine.
@dan.t pm me your github ID and I will add you as a collaborator on the homebridge repo so you can commit code.
I will hopefully pry myself away from this over the top client tool Iāve created for my company. I just keep coming up with new use cases for more features and further down the rabbit hole Iām going.
Would love to work on this with you. I actually have a version now that uses the MakerApi and the Event Websocket instead of the original Hubitat App. So far it works wonderfully for me, however, there are some limitations right. E.g. the MakerApi doesnāt support setting modes or the HSM. There is a feature request open to add those though.
I can say that I have not seen ANY slowdowns anymore but I am still testing myself.
Hey, sorry for the delayed reply. I have a pretty decent version working. I actually "just" waiting to get the next Hubitat release to be able to support Modes and hopefully HSM status messages. Once I have this, I will see how we get this published. I can say that it is working pretty good for me so far, I haven't seen any hub slowdowns or lockups what-so-ever.
And as @csteele is teasing, I am also working on a second homebridge plugin that does not rely on the MakerAPI or the original app but uses the great HubConnect implementation is "just" another "hub" in that context. It is pretty slick as it will make it very easy for people with multiple Hubs (Hubitat and Smartthings or multiple Hubitats) to integrate with HomeKit. HubConnect will release their next version today which has some features that are required for this to work and @csteele and I are still working on a few details. I hope to publish a beta of this plugin shortly after HubConnect release their next version today.
Any indications if it's running more efficient than the current solution? Not to disparage anyone's efforts but I'd be interested in switching if it lessens the load on my hub.
Let's put it that way, with the original Homebridge app installed, I had regular slowdowns and hub lockups. At least every 3 days.
Now I have two homebridge plugins running simultaneously (one via MakerAPI and one via HubConnect) and haven't seen a single lockup in quite some time. It looks really promising.
Awesome to hear.
I look forward to using it when you feel it's mature enough.
I love using SIri, not so much looking at that Apple Home app...
I guess it could be worse...
I don't know how to measure "efficient" with the tools we have.. "feels like" seems like it's as close as we can get
I have 2 instances: the current Tonesto7 running on one computer and Dan's HubConnect version on a rPi and "it feels like" it's much snappier. Click a tile in the iOS Home app and the tile on the Hubitat dashboard changes more quickly than clicking a different tile on the original. "Feels like"