johnanthonyeletto / homebridge-windmill-ac

Apache License 2.0
8 stars 1 forks source link

Is there any way to expose power consumption from the Blynk API? #6

Open twhite96 opened 1 year ago

twhite96 commented 1 year ago

Is your feature request related to a problem? Please describe: I use your plugin to interface with Home Assistant through its HomeKit Bridge. I am making a dashboard full of charts with ApexCharts and one panel is of energy consumption of different IoT devices on my network. Your plugin is great.

Describe the solution you'd like: I would like you to:

Describe alternatives you've considered: I am digging through your code in an attempt to port this over to Home Assistant natively but I want to know more about their API, which, when visiting their docs, seems to be obfuscated and frustrating to find exactly what I am looking for. My plan is to port this, but for now, I'd like to see if you're able to implement this while I work on my port.

Additional context: Nope.

steamEngineer commented 2 months ago

FYI, I also had the same question. Had to dig through the websocket data feed from the windmill web portal in chrome inspect to find it. But lo and behold hidden in the websocket binary data feed... we find that power data is being sent!

                [
                    {
                        "label": "Power",
                        "color": "e92126",
                        "sourceType": "RAW_DATA",
                        "dataStream":
                        {
                            "id": 7,
                            "min": 0.0,
                            "max": 1500.0,
                            "color": "#ba3dd3",
                            "aggregationFunctionType": "AVG",
                            "decimalsFormat": "NO_FRACTION",
                            "pin": 15,
                            "pinType": "VIRTUAL",
                            "type": "DOUBLE",
                            "units": "Watts",
                            "value": "324"
                        },
                        "autoscale": false,
                        "enableYAxis": false,
                        "override": false
                    }
                ],

I'm wondering if the dev had the same first thought I did, "why keep trying high number pins if I start getting kickbacks on pin 8, haha

@johnanthonyeletto @twhite96 -- the following API call will return current wattage consumed by the windmill AC unit

https://dashboard.windmillair.com/external/api/get?V15&token={{authToken}}

twhite96 commented 2 months ago

@steamEngineer thank you!