Takes out the fun to simply go out and spend a lot of money to buy something. Yes a home made solution may not match a commercial product but part of the home automation hobby is the journey not simply the destination - for me at least.
Do you have your code on Github or you built something on ESPHome?
NOTE: I think I’ve answered my own question. This page describes nicely how to build a pulse counter with ESPHome Pulse Counter Sensor — ESPHome
The only thing I didn’t see on that page is how the smart meter specs (i.e. 800 imp/kwH) but I only took a brief glance at this…
No I don’t but I think when I looked around I was able to find hips of similar projects, yet I decided to build my own.
The reason for that is that I wanted to make it more “universal” ?
The project you just mentioned is using kind of interrupts to count pulses.
My approach was to run as fast reading and possible and read instant value of the detected (in volts).
Then I tried to run my own algorithm to detect raising and failing edges and by measuring a time between them - calculate (almost) instant power consumption.
Downside of that approach - it is way more complicated than just counting pulses but in return my system should (in theory) adapt to changing light conditions when it is day or night.
I think it does not matter if an enclosure is good enough to block all external light but if it is not - I think my approach is better since it can adapt itself to changing in external light conditions (like day and night).
P.S. Don’t mind sharing it but since I am not a professional programmer I personally think it looks a bit ugly
I also used kind of two devices this time - one was Arduino to actually read pulses and second one was ESP8266 to handle WiFi and send aggregated data back to my server.
It definitely could be done on just ESP but I kind of wondering - since ESP8266 is single core/single threaded - won’t a few pulses be missed while CPU is busy with sending data over the network?
Or may be I should just ignore that little error and make everything simpler.
When you export your data you get a from and to date with your token. Would it be possible to create a sensor that updates the date and downloads the csv hourly? Sure it wouldn’t be real time but you’d have pretty up to date power stats.
Here’s a link to mine, which has now been working flawlessly for over a year. In theory (if it catches every pulse) it will be 100% accurate over time, but with short-term noise levels depending on how many flashes per kWh you get from your meter (more the better).
We are also currently evaluating customer demand for an API (to allow for connecting to IFTTT, Home Assistant, etc) and have this on our development roadmap for review in 2021. One of the issues we have in developing an API for Powerpal is that the connectivity is Bluetooth Low Energy, so you have to have your phone in range to pick up the data - which isn’t a great fit for many home brew/home automation applications.
To resolve this we’re considering developing a stand alone BLE → WiFi gateway.
If you would be interested in becoming a beta tester for the gateway and API please complete this form with details of your use case to express your interest in joining our beta testing group.
Had a PowerPal unit installed a few days back and have registered my interest in the PP API Beta program. Hoping something comes of that and they bake-in some HA compatibility - would be amazing to pull power usage data into HA, though I’m not quite sure what I’d do with it just yet!
Now that energy monitoring is in HA I thought I’d jump on the PowerPal to make it work. Unfortunately it seems there’s no easy way to get it integrated.
Then I came across this project: GitHub - klaasnicolaas/home-assistant-glow: ⚡ The power of energy measurements in your house Seems simple enough to rock your own Powerpal equivalent for about $15 in parts and not have to deal with their “maybe coming sometime” bridge product.
Nah only ordered the parts this morning. There’s a parts list on the GitHub site. About the only thing that tinkerers might not have already is the Photodiode. Will update once I’ve built it.
I have just completed a pulse meter using a Photo resistor detector and an ESP-01 board. All hooked up to Home assistant.
I used the platform: pulse_meter function in ESPHome
Only started testing it today but it looks good so far.
I have it reporting usage and also have solar output from the inverter. An automation checks if usage is 0kW and solar is over 1 kW and turns on a spa heater.
I managed to retrieve the data from the powerpal by ‘looking’ at the messages that are sent between the powerpal app and the server - easy to get this data with a curl request. The response from the server is a json string like this:
Sounds like a great solution to bridge the missing link to get away from the standalone solution.
Given the recent install of my Powerpal and the fact I have InfluxDB running on my Home Assistant instance I’d like to give this a try. Most of the setup looks alright but wouldn’t know where to start to get my authorisation token. For us non-developers do you have any more guidance on how to use mitm to obtain that token?