Powerpal smart energy monitor

Hi bluebottle,

Thanks for the error message!
I think you might be the first person to actually enable the Powerpal cloud upload lol.
could you please turn your ESPHome logging to verbose for me?

logger:
  level: VERBOSE

Hopefully there’ll be some better information on the failure that we can use.

It’s definitely possible, but you may be better off doing it from within HA (if you are sending it to HA).
If that’s not an option, it can actually be done without modifying the Powerpal component, just within the ESPHome yaml (but it gets a bit complicated if you are storing up a buffer to send every x measurements).

Sadly, this is already on a the verbose log level. I didn’t see any other messages that looked relevant.

Yes, I’m not entirely sure why I’m trying to enable cloud upload… Getting the data in HA is what I really want! I think it may be a residual guilt from getting a free device and immediately using it not as intended…

Doing it from within HA is definitely an option. I’ll have a poke around that ways to do it from there. Thanks!

1 Like

Hi all - longtime lurker thanks for all the work you’ve done on this WeekendWarrior1 (and the troubleshooting from everyone else)

Just wanted to make sure nobody hit their head against the wall with compiling via the Home Assistant - I didn’t head the advice of WeekendWarrior1 when trying to connect to my powerpal (I kept having a 133 error, where the ESP32 would connect and then immediately disconnect).

So for anyone who was stubborn like me. Please just compile your ESP32 via computer! It’ll save you a lot of time.

2 Likes

Out of interest, what’s everyone’s phantom power draw when ‘nothing’ is on apart from essentials such as fridges, alarm, clocks, etc? We have a lot of stuff plugged in and on and I think the lowest I’ve gotten is maybe 450w with everyone out of the house so nothing is actively consumed. I’m wondering if it’s worth my effort to try and get this number down or just accept it as the cost of having a connected home (100+ wifi devices and a heap of ZigBee devices).

~170w with a couple of lights on, and an idle fridge. Fridge uses about 100w(2w idle) when it clicks on, only 1.2kwh per day(winter) though.

450w is kind of high if you have nothing on… Although a TV is going to be around 150w odd. Is 100+ wifi devices ~200w… Possibly.

2w for each wifi device seems abit high. They are probably more like 0.5w, so seems more likely they are only adding 50w…

Might be worth looking for any other big draw(100+watts) or checking the fridge is off when you take a reading.

We, 2 adults, 2 kids, use about 12-20kwh per day depending on solar and washer/dryer.

Gas heating, swamp cooler(no real ac) and 600w pool pump which runs for 2-8hrs per day season depending.

Edit. Napkin math
200w×24hr×365 days = 1,752,000 wh

1752kwh at 30cents is about $500 dollars…

I will probably start building native HASS integrations for the Powerpal and Emerald in the coming days (obviously, as long as everything required to authenticate is available within the new bluetooth component, and that we’re allowed to maintain a constant connection to our BLE energy readers)

7 Likes

Awesome. I can raise my hand to do some testing if required.

Will you try to account for Powerpal Pro at all?

If you compare the esphome component: https://github.com/WeekendWarrior1/powerpal_ble with the Powerpal Pro,

Powerpal Pro

  • I think will cost >$60
  • Collects Powerpal energy data without you needing a smart device
  • Uploads the Powerpal energy data directly to their cloud
  • I do not believe you can use the Powerpal Pro ‘gateway’ for anything else

ESPHome powerpal_ble

  • Costs $7-$12 for an esp32
  • Collects Powerpal energy data without you needing a smart device
  • Integrates and uploads the data directly into Home Assistant, but you can also choose to send it to a MQTT broker or straight into a database (or all of the above!)
  • You have the option of running other ESPHome code on the same device (eg. I have put an esp32 in my AC to control it, that now also collects my energy data over BLE)

I believe we already have a better alternative than the Powerpal Pro.

The idea behind building the native HASS integrations is that the main roadblocks may have been addressed (the python library BLEAK has had a lot of work done in the past 2 months because Nabu Casa paid them to get their library ‘more stable’, HASS now has ‘first class’ support for Bluetooth devices which means we won’t have to spend all our time troubleshooting Bluetooth and OS issues).

I am still not sure if we can do everything we need to do with the new HASS Bluetooth API but if all goes well, people will be able to connect to their Powerpal and Emerald directly from their Home Assistant device.

2 Likes

Nice comparison.
I am on the Beta for the Pro so received it free of charge. It currently simply uploads the data without the need for the app. The integration from Mind Melting works flawlessly and HA has live data consistently.

Still, I’ll keep an eye on what you do and possibly upgrade to ESP :slight_smile:

2 Likes

Just waiting on my BT adaptor to arrive, but happy to help with testing :slight_smile:

Well shit. I bought one, set it up and have found out my bloody blinking light flashes when ITS EXPORTING SOLAR and NOT just when consuming…

AGL dashboard shows import vs export correctly thank f***

/flips table

hey @WeekendWarrior1 thanks so much for this awesome component. The local parts are working great for me and connecting with my homeassistant server nicely.
However I am trying to get the cloud upload working however I am getting the following error:

[17:27:00][I][powerpal_ble:087]: Timestamp: 1660980360, Pulses: 7, Average Watts within interval: 420.000000 W
[17:27:00][D][sensor:127]: 'Powerpal Power': Sending state 420.00000 W with 0 decimals of accuracy
[17:27:00][D][sensor:127]: 'Powerpal Total Energy': Sending state 0.09200 kWh with 3 decimals of accuracy
[17:27:00][D][sensor:127]: 'Powerpal Daily Energy': Sending state 0.09200 kWh with 3 decimals of accuracy
[17:27:00][W][http_request:064]: HTTP Request failed at the begin phase. Please check the configuration

I am able to use curl from my laptop as described to sucessfully ping the API endpoint, so the API key shouldnt be the issue…

PS C:\Users\mattc> curl -H "Authorization: b1665474-6f36-4dcb-ab17-4b331dcXXXX" https://readings.powerpal.net/api/v1/device/00032XXX
{
  "serial_number": "00032d8e",
  "total_meter_reading_count": 145,
  "pruned_meter_reading_count": 0,
  "total_watt_hours": 2395,
  "total_cost": 0.55033696,
  "first_reading_timestamp": 1660963680,
  "last_reading_timestamp": 1660972380,
  "last_reading_watt_hours": 4,
  "last_reading_cost": 0.0013996278,
  "available_days": 0,
  "first_archived_date": "",
  "last_archived_date": ""
}

Hi @WeekendWarrior1
Thanks for putting together this project. I had my esp up and running, integrated with HA, and feeding energy data into it all in under 20 minutes.
Just wondering about the notification_interval - is there any way to make it lower than “1”? Would it be possible to generate a reading every 30 seconds for example?
Thanks again!

Looked at the source for fun.
Doesn’t look like it.

cv.Required(CONF_NOTIFICATION_INTERVAL): cv.int_range(min=1, max=60),
1 Like

Hi mattclar, sorry for the late reply, and glad to read that the component is working great.
It does seem that the Powerpal cloud uploading doesn’t work correctly atm. I don’t have a Powerpal account (or a Powerpal for that matter), so I have found it hard to troubleshoot (when I wrote it I was just sending requests to a local webserver to emulate the Powerpal cloud).
If anyone in this thread has an up to date Powerpal app with MITM set up and could send me the current TCP requests, I should be able to fix that portion of the component.


Hi bobderbuilder,
Happy to read that your experience with the component was trouble free.
The Powerpal firmware is limited to min 60s BLE update notifications. (technically you can get real time per-pulse notifications from the Powerpal, but that will likely chew through the battery and I haven’t supported it in the ESPHome component)
I would suggest, if you know someone with an Emerald Electicity Advisor, see if you can trade, because the Emerald is capable of 30s updates (lol, don’t know what VIC energy scheme would think of that though). Downside of the Emerald is the inferior app, but don’t know how important that is for us in this thread.

1 Like

using the powerpal integration from HACS and its working ok. Has anyone worked out how to calculate daily usage?

Hi,
is anyone else getting this error when adding Current Consumption to the Energy Dashboard?

Last reset missing

The following entities have state class 'measurement' but 'last_reset' is missing:

* sensor.powerpal_live_consumption

I’m happy to help test the cloud upload functionality with MITM. There seems to be an issue with an initializing the HTTP_request component as I tried using reqbin.com and was able to successfully upload some dummy data.

While running MITM, I did notice however that the sequence of JSON data is different from what’s specified in powerpal_ble.cpp.

This is the sequence I saw in MITM:

[
    {
        "cost": 0.002131072222222222,
        "is_peak": false,
        "pulses": 9,
        "timestamp": 1663926780,
        "watt_hours": 9
    }
]

Also, the timestamps have to be exactly 60s apart or it won’t accept the uploaded value.

I’m curious, has anyone looked at connecting Home Assistant directly to the Powerpal, say using the bluetooth adaptor in a raspberry pi running home assistant?