Open mitch7391 opened 1 month ago
This could be a very good time to tackle #4 and #7 as you said these would be breaking changes... Considering Homebridge themselves are about to break this plug-in, now would be the best time :)
Hi @mitch7391
That error actually looks to be coming from within the hap-nodejs-community-types implementation...
Taking a quick look I can also see there would be other issues with Homebridge v2.0 (usage of Characteristic.Formats and Characteristic.Perms for example) even after fixing the Class constructor Characteristic cannot be invoked without 'new'
error.
Given that, it might be best to bring the code block to define the AtmosphericPressureLevel
characteristic in to this project instead and remove the hap-nodejs-community-types dependency.
Maybe something along the lines of:
You'd also need to update the this.temperatureService.setCharacteristic(CommunityTypes.AtmosphericPressureLevel, ...) line to point to the new Characteristic.
Completely untested, but I think it's on the right track.
Otherwise another package could potentially be used, for example homebridge-lib includes an Air Pressure characteristic (originally from Eve products).
I think it can be pulled in via either the eve API Wrapper or EveHomeKitTypes utility class?
I use this plugin and would be sad to see it go. Looks like Steve hasn’t made any changes for a few years. Can someone take on the task? My coding days are long over. :)
Thanks for the guidance @benwebbbenwebb! I am still learning my ways through the meatier side of plugins, even though I do manage my own that piggybacks off another but mostly dabbles in shell…
@oandpg I can try take a lot but am struggling to keep up with my own plugin before my twins arrived, now I am very much struggling to find the time these days! We would still need @SteveCohen to log in and accept a PR even if I was to do the work for it to be then merged into this plugin…
@mitch7391 I think your need for sleep is more important than my wish for this plugin!
Hi folks, sorry I’ve been quiet. I’d be happy to accept a PR but have little capacity to test it. I, too, have some personal things going on. Then I’d need to remember how to merge back to NPM… but happy to try if you have confirmed working code!
Let’s talk alternatives for a second to save all our sanity. Frankly, my ideal approach to getting BOM data into Home has changed. If I had to do this again, I’d simply write a Python/similar script to load the data through MQTT, leveraging something like homebridge-mqttthing plugin (or whatever is supported in homebridge 2.0). If we’re going to do breaking changes… tbh that’s where I’d put my effort.
Otherwise I’d put my time into a Matter-based solution, bypassing homebridge entirely. That’s a bit more future proofed but still a new ecosystem.
Anyway. If you want to do PRs I’ll get round to accepting them and try to merge to NPM. Otherwise I suggest looking into MQTTThing for a longer term solution. I’d be happy to link to other repositories to send users there, if you do one of these paths.
thanks both for your enthusiasm in the meantime. Let me know what you want to do.
Hey @SteveCohen I am not sure if you are aware but the next version of Homebridge (v2.0) comes with breaking changes for a lot of Homebridge plug-ins and it has been put on the developers to update their plug-ins.
For Plug-In Developers
I have tested this plug-in on the beta version and it will crash Homebridge.
Describe the solution you'd like: Please have a read of the link above and see what changes are required for this plug-in.
Describe alternatives you've considered: All users of this plug-in will have to remain on Homebridge v1.8.4.
Additional context:![image](https://github.com/user-attachments/assets/c82eeea1-16a4-400b-aefa-c13dfec35d1d)
Logs: