vectronic / homebridge-nut

Homebridge plugin for NUT (Network UPS Tools) Client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enable/disable BatteryService?

jlg89 opened this issue · comments

commented

I can think of other reasons for just wanting the ContactSensor, but in my case I have a UPS that isn't fully supported by any NUT driver. It supports ups.status (among other things) but doesn't support any battery-related info. Keys like "ups.batteryLevel" etc. just aren't there. So, the BatteryService status always shows 0% battery, charging & active are both true -- which is unhelpful at best, confusing at worst.

Is there a way to disable the BatteryService part of the accessory, and just have a "bare" ContactSensor?

I can look into this. But might take me a couple of weeks to get to it…

commented

It's very low priority. Easy enough to turn off HomeKit notifications & status for the battery sensor.

Cheers, saw this discussion by chance. Wondering what "keys" are mentioned above - some defined by your project or those by NUT? In case of latter, there is no ups.batteryLevel but rather (probably what you're after) battery.charge. NUT names are standardized the best we can, see https://github.com/networkupstools/nut/blob/master/docs/nut-names.txt

Also per recent report in NUT issue tracker, @jlg89 posted data from NUT v2.7.4 which is rather old (although still packaged by many distros). The latest release was 2.8.0 in spring, and several improvements landed into master branch or are still in PR queue after that - just FYI.

And just FYI: Posting a link to your project on https://networkupstools.org/projects.html - should be updated soon :)

commented

That was me. I wasn't sure of the battery-related keys at the time, but after researching the nutdrv_qx driver and quizzing Maruson tech support, I was able to get all of that working reasonably well. It would still be nice in this plugin to be able to disable the battery status, or maybe even split it off into a separate device.