plasticrake / homebridge-tplink-smarthome

TP-Link Smarthome Plugin for Homebridge
MIT License
480 stars 70 forks source link

Exposing current power consumption as a custom characteristic for plugs that support it #336

Open YoaverageApplefanboy opened 10 months ago

YoaverageApplefanboy commented 10 months ago

Current Situation

I am trying to use a KP115 plug to monitor how much electricity our washer is taking and run an automation that tells us that it is done once it hits a certain threshold. However, I don't have the ability to do this, I just have to rely on the in use switch, which I don't think will be accurate, I haven't tried it. if possible, it would be cool if the current energy consumption would be added as a custom characteristic to devices that support energy monitoring.

Proposed Change

The plug-in should pole the plugs and other devices, asking them how much energy there connected devices are drawing. Next, the plug-in should take that information and expose it as a custom characteristic to Apple HomeKit, which could be seen by third-party HomeKit apps like Eve for HomeKit as a custom characteristic available as a trigger in automations.

rajtotherescue commented 8 months ago

I've tried using a Shelly Plus Plug US with a homebridge plugin to do exactly this and it works, but there is an issue with polling and inconsistency. I would love for any smart plug to be able to do this.

plasticrake commented 8 months ago

This plugin already support this https://github.com/plasticrake/homebridge-tplink-smarthome#custom-characteristics-in-eve