jvandenaardweg / homebridge-homewizard-energy-socket

This verified Homebridge plugin exposes your HomeWizard Energy Sockets to Apple HomeKit. So you can use the Home App to switch your Energy Sockets on or off and integrate the Energy Sockets into your Home Automations.
MIT License
8 stars 0 forks source link

Support for Homewizard Watermeter #81

Closed matbe81 closed 1 year ago

matbe81 commented 1 year ago

Can you extend the plugin to support the simple Homewizard Watermeter (https://homewizard-energy-api.readthedocs.io/endpoints.html#example-hwe-wtr) ?

jvandenaardweg commented 1 year ago

@matbe81 I don't think this is possible, as far as I know Homebridge (which uses Apple's HomeKit) does not support a device like a water meter.

This page only displays these "water" related devices to be supported: https://developer.apple.com/documentation/homekit/hmaccessorycategory/accessory_category_types#3080302

let HMAccessoryCategoryTypeSprinkler: String A sprinkler system accessory.

let HMAccessoryCategoryTypeFaucet: String A faucet accessory.

let HMAccessoryCategoryTypeShowerHead: String A shower head accessory.

matbe81 commented 1 year ago

Maybe, as you suggested, another device type can be used to expose those values like others plugin. Example: My SolarEdge use sensor & brightness as device type. Faucet, Splinkler, Showerhead, Valve, Switch or Sensor are some ideas to display the differents elements exposed by the API.

jvandenaardweg commented 1 year ago

Where would a water meter fit in? As far as i'm aware, it only registers water usage, nothing more. What would je expect to see within the Home app for this water meter?

matbe81 commented 1 year ago

Information interested to be exposed are:

This will allow to setup automations like:

WDYT?

jvandenaardweg commented 1 year ago

That sounds like lots of customization.

Working on this Energy Socket plugin I noticed HomeKit does not provide lots of ways to deal with energy data and usage tracking over time. There's a fixed set of properties you can work with for a accessory type, like a Outlet (On, Off, Outlet In Use (Yes/No)) or a Light Bulb (On, Off, Color Temperature, Brightness)

There is a way to track history data over time with this: https://github.com/simont77/fakegato-history , but reading that info can only be done within the Eve Home App.

I would suggest to create a seperate plugin for HomeBridge and try to see if you can fit your requirements in there. Unfortunatly I can't really help you with that as i'm drowning in day to day work...

matbe81 commented 1 year ago

No problem. I understand. Thank you for your feedback :)

jvandenaardweg commented 1 year ago

Btw, if you are familiar with writing code, I think it's even better to just create a seperate app through NodeJS or Python that exactly does what you want. I feel like that would be more suitable as that gives you total freedom. You can run that in your local network on a Raspberry Pi.

Notifications can be done through something like Pushover: https://pushover.net/ or a different Push Notifcation service, or just a different way to send notifications.

Users looking for a Homebridge plugin for the Water Meter usually have a Raspberry Pi running anyways, so if you can package your app to be re-used by others that would benefit them more than the hassle of customizing a Homebridge plugin to fit in requirements where HomeKit is just not suitable for.

matbe81 commented 1 year ago

Indeed. Good idea. But unfortunately, i'm not familiar with nodeJS nor Python :( I run homebridge on a VM under ESXI.