Powerpal smart energy monitor

I have it working now and reporting into my Energy dashboard. I havent checked the Accuracy though. The total consumption doesnt seem to be resetting everyday. Is that directly coming out of Powerpal?

Hi SincHome, really glad to see you got it working.

The Powerpal ESPHome component currently has an internal counter (total of pulses since boot) which it uses to increment the Powerpal Total Energy entity. I used this functionality after looking at how a different ESPHome energy meter reader handled passing energy data back to Home Assistant (and let me add, Home Assistant only likes usage data for the energy dashboard in a few specific formats, one of them being this implementation).
There are downsides to this solution though, namely how to handle persistance on the ESPHome after a reboot, without hammering writes to the ESP’s flash.

Since this solution could be better, I would like to move to a resetting Total Daily Energy sensor, (which will require the NTP/time component added to the ESPHome device), but I have not completed that yet.

PS. Please let me know if your collected data doesn’t match your Powerpal application’s dashboards.

HI Weekend Warrior1

I got my powerpal installed today, so will be trying to get the device to speak using the esphome

One question. When I load the data into the information into the esphome yaml, it seems to note like having a capital W in kWh. See below

When I change it to lowercase, its fine

I haven’t compiled it yet, and I saw the above post showing an error when using the localcase w.

So just wanted to clarify which is the correct setting

Thanks again for an awesome tool

Please use lower case ‘w’
(I tried to use the correct SI unit but turns out esphome yaml only wants lowercase keys (which honestly is not a bad thing, just something I didn’t realise at the time))
I will update any documentation that still has the uppercase ‘W’ now.

I’m happy to read that some other people are already finding the component useful :grinning:

Hi Weekend Warror1

I’ve just had a look at the past 2 days and the data is spot on! This is a great tool and I’ve been waiting for something like this for a while as I don’t have any apple devices as required by the previous solutions.

Is the data reported out of the powerpal the number of pulses and the kWh is calculated on the ESP? I only ask because on the app when it shows real time Wattage the numbers seem more precise where as the values reported by the ESP are always round numbers even with 5 decimal points. At the end of the day the total wattage is realistically the same.

In addition to your code, I have added a restart button to my ESP. I just flick it on when I want to connect my phone to sync the data. Once it syncs I quickly disconnect my phone from the powerpal and the ESP resumes. Its been working great so far!

Hi SincHome,

Glad to read that the data matches the android application!

Is the data reported out of the powerpal the number of pulses and the kWh is calculated on the ESP?

Yeap, this code just gets number of pulses and then converts them before sending them to HASS/MQTT.

I only ask because on the app when it shows real time Wattage the numbers seem more precise where as the values reported by the ESP are always round numbers even with 5 decimal points.

  • The Powerpal Application does a couple of extra things to get a much more accurate “instantaneous” measurement, as it subscribes to notifications from the Powerpal every time a pulse is read, and then uses the time delta between the last 2 pulses to display the instantaneous usage. Whilst this is neat, I presume it’s better for Powerpal battery life to not ask for notifications of every pulse, and isn’t useful to us.
  • I have also observed the round numbers in the power sensor and I think there is a possible bug in the power calculation maths, I will have a better look tonight.

At the end of the day the total wattage is realistically the same.

Regardless of the above bug, this calculation is much simpler and looks like I didn’t mess it up lol :slightly_smiling_face:

In addition to your code, I have added a restart button to my ESP. I just flick it on when I want to connect my phone to sync the data. Once it syncs I quickly disconnect my phone from the powerpal and the ESP resumes. Its been working great so far!

Nice!
One thing to watch out for is that since we can’t upload historic data to HASS, your ESPHome device will miss any energy updates it should receive whilst you have it disconnected from the Powerpal, and will throw your total measurements out by the same value (also out of curiosity, if you’re logging this to HASS, how does your built in energy dashboard handle this reset? I was under the impression that the counter reset makes HASS think it’s a new day or something?)

The Bot seems to be just a tad smart-arse and unable to respond to my query of why the Bluetooth link dropped out after 4 days and is unable to relink to my relatively new smartphone.
[Smart-arse: giving a WikiLink to short-hair tabby cats, rather than answering the question.]
PowerPal service seems just over-simple, giving the brush-off rather than doing its job.
Hughrster

I am having issue connecting to my emerald device. Please take a look at log snapshot.

Hi Abhishek,

Can you please post the yaml you are using?
I can see there are a couple of Emerald’s in the vicinity, can you triple check that you have the correct MAC address and pairing code?

Hi Weekend Worrier,

Here it is

esphome:
name: emerald-ble-bridge

esp32:
board: esp32dev
framework:
type: arduino

external_components:

  • source: github://WeekendWarrior1/esphome@emerald_ble

    requires ble_client and ble_tracker because I had to add some small features to authenticate properly

    components: [ ble_client, esp32_ble_tracker, emerald_ble ]

logger:
level: VERBOSE
logs:
mqtt.component: DEBUG
mqtt.client: ERROR

api:

ota:

wifi:
ssid: “xxx”
password: “xxx”

ap:
ssid: “emeraldble Fallback Hotspot”
password: “xxx”

esp32_ble_tracker:

ble_client:

  • mac_address: 30:1B:97:64:39:BB
    id: emerald_advisor

sensor:

  • platform: emerald_ble
    ble_client_id: emerald_advisor
    power:
    name: “Emerald Power”
    energy:
    name: “Emerald Total Energy”
    battery_level:
    name: “Emerald Battery”
    pairing_code: 12xxx3
    pulses_per_kwh: 1000

I can see a new error as well.

Hi Abhiush,

Can you please let me know what firmware your Emerald is running?
You can find it by using a phone app like NRF-connect and bonding with the emerald (you will need to put in your pairing code):


You will have to press the ‘Read Value’ arrow next to the Firmware Revision String to grab it.

Hi WeekendWarrior1,

Kindly find the attached. Also just wondering if emerald can handle multiple connection / pairing etc.

BTW … it is some time randomly getting connected as well. but it still is throwing lots of error messages. Here is the log

INFO Reading configuration /config/esphome/emerald-ble-bridge.yaml...
INFO Starting log output from emerald-ble-bridge.local using esphome API
INFO Successfully connected to emerald-ble-bridge.local
[12:53:08][I][app:102]: ESPHome version 2022.4.0 compiled on May  5 2022, 10:25:01
[12:53:08][C][wifi:491]: WiFi:
[12:53:08][C][wifi:353]:   Local MAC: 08:3A:F2:6E:0F:78
[12:53:08][C][wifi:354]:   SSID: 'Optus_B50550'[redacted]
[12:53:08][C][wifi:355]:   IP Address: 192.xx.xx.xx
[12:53:08][C][wifi:357]:   BSSID: 5C:B1:3E:B5:05:52[redacted]
[12:53:08][C][wifi:358]:   Hostname: 'emerald-ble-bridge'
[12:53:08][C][wifi:360]:   Signal strength: -64 dB ▂▄▆█
[12:53:08][V][wifi:362]:   Priority: 0.0
[12:53:08][C][wifi:364]:   Channel: 1
[12:53:08][C][logger:233]: Logger:
[12:53:08][C][logger:234]:   Level: VERBOSE
[12:53:08][C][logger:235]:   Log Baud Rate: 115200
[12:53:08][C][logger:236]:   Hardware UART: UART0
[12:53:08][C][logger:238]:   Level for 'mqtt.component': DEBUG
[12:53:08][C][logger:238]:   Level for 'mqtt.client': ERROR
[12:53:08][C][emerald_ble:013]: EMERALD
[12:53:08][C][emerald_ble:014]:  Battery 'Emerald Battery'
[12:53:08][C][emerald_ble:014]:    Device Class: 'battery'
[12:53:08][C][emerald_ble:014]:    State Class: ''
[12:53:08][C][emerald_ble:014]:    Unit of Measurement: '%'
[12:53:08][C][emerald_ble:014]:    Accuracy Decimals: 0
[12:53:08][C][emerald_ble:015]:  Power 'Emerald Power'
[12:53:09][C][emerald_ble:015]:    Device Class: 'power'
[12:53:09][C][emerald_ble:016]:  Energy 'Emerald Total Energy'
[12:53:09][C][emerald_ble:016]:    Device Class: 'energy'
[12:53:09][C][emerald_ble:016]:    State Class: 'total_increasing'
[12:53:09][C][emerald_ble:016]:    Unit of Measurement: 'kWh'
[12:53:09][C][emerald_ble:016]:    Accuracy Decimals: 5
[12:53:09][C][esp32_ble_tracker:726]: BLE Tracker:
[12:53:09][C][esp32_ble_tracker:727]:   Scan Duration: 300 s
[12:53:09][C][esp32_ble_tracker:728]:   Scan Interval: 320.0 ms
[12:53:09][C][esp32_ble_tracker:729]:   Scan Window: 30.0 ms
[12:53:09][C][esp32_ble_tracker:730]:   Scan Type: ACTIVE
[12:53:09][C][ble_client:035]: BLE Client:
[12:53:09][C][ble_client:036]:   Address: 30:1b:97:64:39:bb
[12:53:09][C][mdns:084]: mDNS:
[12:53:09][C][mdns:085]:   Hostname: emerald-ble-bridge
[12:53:09][V][mdns:086]:   Services:
[12:53:09][V][mdns:088]:   - _esphomelib, _tcp, 6053
[12:53:09][V][mdns:090]:     TXT: version = 2022.4.0
[12:53:09][V][mdns:090]:     TXT: mac = 083af26e0f78
[12:53:09][V][mdns:090]:     TXT: platform = ESP32
[12:53:09][V][mdns:090]:     TXT: board = esp32dev
[12:53:09][C][ota:085]: Over-The-Air Updates:
[12:53:09][C][api:138]: API Server:
[12:53:09][C][api:139]:   Address: emerald-ble-bridge.local:6053
[12:53:09][C][api:143]:   Using noise encryption: NO
[12:53:40][D][ble_client:047]: Found device at MAC address [30:1B:97:64:39:BB]
[12:53:40][I][ble_client:085]: Attempting BLE connection to 30:1b:97:64:39:bb
[12:53:46][V][ble_client:147]: [30:1b:97:64:39:bb] ESP_GATTC_DISCONNECT_EVT, reason 62
[12:53:46][V][ble_client:115]: [30:1b:97:64:39:bb] ESP_GATTC_OPEN_EVT
[12:53:46][W][ble_client:117]: connect to 30:1b:97:64:39:bb failed, status=133
[12:53:46][D][esp32_ble_tracker:231]: Starting scan...
[12:53:46][D][esp32_ble_tracker:740]: Found device 23:CA:E8:8B:4D:DB RSSI=-45
[12:53:46][D][esp32_ble_tracker:761]:   Address Type: RANDOM
[12:53:46][D][esp32_ble_tracker:740]: Found device 1F:22:75:93:10:11 RSSI=-82
[12:53:46][D][esp32_ble_tracker:761]:   Address Type: RANDOM
[12:54:15][D][esp32_ble_tracker:740]: Found device 30:1B:97:63:48:63 RSSI=-78
[12:54:15][D][esp32_ble_tracker:761]:   Address Type: PUBLIC
[12:54:15][D][esp32_ble_tracker:763]:   Name: 'EIAdv 2107126480'
[12:54:54][D][ble_client:047]: Found device at MAC address [30:1B:97:64:39:BB]
[12:54:54][I][ble_client:085]: Attempting BLE connection to 30:1b:97:64:39:bb
[12:55:04][V][ble_client:147]: [30:1b:97:64:39:bb] ESP_GATTC_DISCONNECT_EVT, reason 62
[12:55:04][V][ble_client:115]: [30:1b:97:64:39:bb] ESP_GATTC_OPEN_EVT
[12:55:04][W][ble_client:117]: connect to 30:1b:97:64:39:bb failed, status=133
[12:55:04][D][esp32_ble_tracker:231]: Starting scan...
[12:55:06][D][esp32_ble_tracker:740]: Found device 1F:22:75:93:10:11 RSSI=-85
[12:55:06][D][esp32_ble_tracker:761]:   Address Type: RANDOM
[12:55:07][D][esp32_ble_tracker:740]: Found device 23:CA:E8:8B:4D:DB RSSI=-45
[12:55:07][D][esp32_ble_tracker:761]:   Address Type: RANDOM
[12:56:00][D][esp32_ble_tracker:740]: Found device 58:32:EF:08:58:90 RSSI=-43
[12:56:00][D][esp32_ble_tracker:761]:   Address Type: RANDOM
[12:56:12][D][esp32_ble_tracker:740]: Found device 30:1B:97:64:36:9A RSSI=-85
[12:56:12][D][esp32_ble_tracker:761]:   Address Type: PUBLIC
[12:56:12][D][esp32_ble_tracker:763]:   Name: 'EIAdv 2107126114'
[12:56:23][D][esp32_ble_tracker:740]: Found device 30:1B:97:63:48:63 RSSI=-78
[12:56:23][D][esp32_ble_tracker:761]:   Address Type: PUBLIC
[12:56:23][D][esp32_ble_tracker:763]:   Name: 'EIAdv 2107126480'
[12:57:09][D][ble_client:047]: Found device at MAC address [30:1B:97:64:39:BB]
[12:57:09][I][ble_client:085]: Attempting BLE connection to 30:1b:97:64:39:bb
[12:57:19][V][ble_client:124]: [30:1b:97:64:39:bb] ESP_GATTC_CONNECT_EVT
[12:57:19][V][ble_client:115]: [30:1b:97:64:39:bb] ESP_GATTC_OPEN_EVT
[12:57:25][I][ble_client:220]: auth complete. remote BD_ADDR: 301b976439bb
[12:57:25][V][ble_client:225]: auth success. address type = 0 auth mode = 5
[12:57:25][I][emerald_ble:203]: [30:1b:97:64:39:bb] Writing auto upload code to Emerald
[12:57:25][W][ble_client:177]: No descriptor found for notify of handle 0x15
[12:57:25][W][ble_client:177]: No descriptor found for notify of handle 0x1d
[12:57:29][V][ble_client:139]: cfg_mtu status 0, mtu 23
[12:57:29][E][emerald_ble:148]: [30:1b:97:64:39:bb] ESP_GATTC_WRITE_CHAR_EVT (Write confirmed)
[12:57:29][V][ble_client:164]: [30:1b:97:64:39:bb] ESP_GATTC_SEARCH_CMPL_EVT
[12:57:29][I][ble_client:166]: Service UUID: 0x1800
[12:57:29][I][ble_client:167]:   start_handle: 0x1  end_handle: 0x7
[12:57:29][I][ble_client:380]:  characteristic 0x2A00, handle 0x3, properties 0x12
[12:57:29][I][ble_client:380]:  characteristic 0x2A01, handle 0x5, properties 0x2
[12:57:29][I][ble_client:380]:  characteristic 0x2A04, handle 0x7, properties 0x2
[12:57:29][I][ble_client:166]: Service UUID: 0x1801
[12:57:29][I][ble_client:167]:   start_handle: 0x8  end_handle: 0xb
[12:57:29][I][ble_client:380]:  characteristic 0x2A05, handle 0xa, properties 0x20
[12:57:29][V][ble_client:415]:    descriptor 0x2902, handle 0xb
[12:57:29][I][ble_client:166]: Service UUID: 0x180A
[12:57:29][I][ble_client:167]:   start_handle: 0xc  end_handle: 0x12
[12:57:29][I][ble_client:380]:  characteristic 0x2A29, handle 0xe, properties 0x2
[12:57:29][I][ble_client:380]:  characteristic 0x2A25, handle 0x10, properties 0x2
[12:57:29][I][ble_client:380]:  characteristic 0x2A26, handle 0x12, properties 0x2
[12:57:29][I][ble_client:166]: Service UUID: 0x1910
[12:57:29][I][ble_client:167]:   start_handle: 0x13  end_handle: 0x1a
[12:57:29][I][ble_client:380]:  characteristic 0x2B10, handle 0x15, properties 0x12
[12:57:29][V][ble_client:415]:    descriptor 0x2902, handle 0x16
[12:57:29][I][ble_client:167]:   start_handle: 0x1b  end_handle: 0x1e
[12:57:29][I][ble_client:380]:  characteristic 0x2A19, handle 0x1d, properties 0x12
[12:57:29][V][ble_client:415]:    descriptor 0x2902, handle 0x1e
[12:57:29][I][ble_client:166]: Service UUID: 00010203-0405-0607-0809-0A0B0C0D1912
[12:57:29][I][ble_client:167]:   start_handle: 0x1f  end_handle: 0x22
[12:57:29][I][ble_client:380]:  characteristic 00010203-0405-0607-0809-0A0B0C0D2B12, handle 0x21, properties 0x6
[12:57:29][V][ble_client:415]:    descriptor 0x2901, handle 0x22
[12:57:29][D][esp32_ble_tracker:231]: Starting scan...
[12:57:29][V][component:199]: Component esp32_ble_tracker took a long time for an operation (0.21 s).
[12:57:29][V][component:200]: Components should block for at most 20-30ms.
[12:57:29][D][esp32_ble_tracker:740]: Found device 1F:22:75:93:10:11 RSSI=-85
[12:57:29][D][esp32_ble_tracker:761]:   Address Type: RANDOM
[12:57:30][E][emerald_ble:124]: [30:1b:97:64:39:bb] ESP_GATTC_READ_CHAR_EVT (Received READ)
[12:57:32][D][esp32_ble_tracker:740]: Found device 23:CA:E8:8B:4D:DB RSSI=-46
[12:57:32][D][esp32_ble_tracker:761]:   Address Type: RANDOM
[12:57:33][I][ota:105]: Boot seems successful, resetting boot loop counter.
[12:57:33][D][esp32.preferences:114]: Saving preferences to flash...
[12:57:44][E][emerald_ble:160]: [30:1b:97:64:39:bb] Received Notification
[12:57:44][D][emerald_ble:165]: Recieved time read notification
[12:57:44][D][emerald_ble:058]: DEC(11): 0x0001020a06594cce400000
[12:57:44][I][emerald_ble:080]: Timestamp: , Pulses: 0, Average Watts within interval: 0.000000 W
[12:57:44][V][sensor:074]: 'Emerald Power': Received new state 0.000000
[12:57:44][D][sensor:125]: 'Emerald Power': Sending state 0.00000 W with 5 decimals of accuracy
[12:57:44][V][sensor:074]: 'Emerald Total Energy': Received new state 0.000000
[12:57:44][D][sensor:125]: 'Emerald Total Energy': Sending state 0.00000 kWh with 5 decimals of accuracy
[12:57:44][V][component:199]: Component esp32_ble_tracker took a long time for an operation (0.07 s).
[12:57:44][V][component:200]: Components should block for at most 20-30ms.
[12:58:13][E][emerald_ble:160]: [30:1b:97:64:39:bb] Received Notification
[12:58:13][D][emerald_ble:165]: Recieved time read notification
[12:58:13][D][emerald_ble:058]: DEC(11): 0x0001020a06594cce5e0000
[12:58:13][I][emerald_ble:080]: Timestamp: , Pulses: 0, Average Watts within interval: 0.000000 W
[12:58:13][V][sensor:074]: 'Emerald Power': Received new state 0.000000
[12:58:13][D][sensor:125]: 'Emerald Power': Sending state 0.00000 W with 5 decimals of accuracy
[12:58:13][V][sensor:074]: 'Emerald Total Energy': Received new state 0.000000
[12:58:13][D][sensor:125]: 'Emerald Total Energy': Sending state 0.00000 kWh with 5 decimals of accuracy
[12:58:13][V][component:199]: Component esp32_ble_tracker took a long time for an operation (0.06 s).
[12:58:13][V][component:200]: Components should block for at most 20-30ms.
[12:58:44][E][emerald_ble:160]: [30:1b:97:64:39:bb] Received Notification
[12:58:44][D][emerald_ble:165]: Recieved time read notification
[12:58:44][D][emerald_ble:058]: DEC(11): 0x0001020a06594cce800000
[12:58:44][I][emerald_ble:080]: Timestamp: , Pulses: 0, Average Watts within interval: 0.000000 W
[12:58:44][V][sensor:074]: 'Emerald Power': Received new state 0.000000
[12:58:44][D][sensor:125]: 'Emerald Power': Sending state 0.00000 W with 5 decimals of accuracy
[12:58:44][V][sensor:074]: 'Emerald Total Energy': Received new state 0.000000
[12:58:44][D][sensor:125]: 'Emerald Total Energy': Sending state 0.00000 kWh with 5 decimals of accuracy
[12:58:44][V][component:199]: Component esp32_ble_tracker took a long time for an operation (0.05 s).
[12:58:44][V][component:200]: Components should block for at most 20-30ms.
[12:59:14][E][emerald_ble:160]: [30:1b:97:64:39:bb] Received Notification
[12:59:14][D][emerald_ble:165]: Recieved time read notification
[12:59:14][D][emerald_ble:058]: DEC(11): 0x0001020a06594cce9e0000
[12:59:14][I][emerald_ble:080]: Timestamp: , Pulses: 0, Average Watts within interval: 0.000000 W
[12:59:14][V][sensor:074]: 'Emerald Power': Received new state 0.000000
[12:59:14][D][sensor:125]: 'Emerald Power': Sending state 0.00000 W with 5 decimals of accuracy
[12:59:14][V][sensor:074]: 'Emerald Total Energy': Received new state 0.000000
[12:59:14][D][sensor:125]: 'Emerald Total Energy': Sending state 0.00000 kWh with 5 decimals of accuracy
[12:59:14][V][component:199]: Component esp32_ble_tracker took a long time for an operation (0.06 s).
[12:59:14][V][component:200]: Components should block for at most 20-30ms.
[12:59:20][D][esp32_ble_tracker:740]: Found device 30:1B:97:63:48:63 RSSI=-88
[12:59:20][D][esp32_ble_tracker:761]:   Address Type: PUBLIC
[12:59:20][D][esp32_ble_tracker:763]:   Name: 'EIAdv 2107126480'

Hi abhiush,

Good to see we have the same firmware!

Neither the Emerald or the Powerpal devices support multiple BLE connections. (and I will add this to their README’s.)
Is that possibly the issue, that you have been trying to connect from multiple devices at once?

When I started developing these I envisioned that people would be using them to collect data instead of their respective phone applications and forego the cloud but from the limited feedback here it seems people are interested in both.

It is quite possible to send the collected data to the cloud via the ESP32 (although in the case of the Emerald the REST API expects massive 500KB payloads which is possibly to much for our ESP32) and at least for the Powerpal I can put together a simple ESPHome example.

BTW … it is some time randomly getting connected as well. but it still is throwing lots of error messages. Here is the log

Okay this is great news that it is able to connect sometimes?
In any case, please ignore those “Error” messages, that’s a mistake on my behalf (they’re really debug information but I set them to Error level whilst I was building the component so they jumped out at me lol). I have updates the log levels of the Emerald component now.

Yeah that seems to the issue. My phone was connected to emerald while i was trying to connect it via ESP32.

However couple of more observations:

  1. Connection seems to dropping often.
  2. Even if log is showing the reading of 0Pulese the dashboard is not reflecting the read. does this mean zero reading doesn’t gets recorded as data point.
  3. Total energy seems to keep adding untill the ESP restarts
[13:19:43][I][emerald_ble:080]: Timestamp: , Pulses: 0, Average Watts within interval: 0.000000 W
[13:19:43][V][sensor:074]: 'Emerald Power': Received new state 0.000000
[13:19:43][D][sensor:125]: 'Emerald Power': Sending state 0.00000 W with 5 decimals of accuracy
[13:19:43][V][sensor:074]: 'Emerald Total Energy': Received new state 0.000000
[13:19:43][D][sensor:125]: 'Emerald Total Energy': Sending state 0.00000 kWh with 5 decimals of accuracy
[13:19:43][V][component:199]: Component esp32_ble_tracker took a long time for an operation (0.08 s).
[13:19:43][V][component:200]: Components should block for at most 20-30ms.

Great to see somebody working on this! Im having an issue and not getting any values

INFO Reading configuration /config/esphome/powerpalble.yaml...
INFO Starting log output from powerpalble.local using esphome API
INFO Successfully connected to powerpalble.local
[17:29:33][I][app:102]: ESPHome version 2022.4.0 compiled on May  6 2022, 17:22:46
[17:29:33][C][wifi:491]: WiFi:
[17:29:33][C][wifi:353]:   Local MAC: 7C:9E:BD:46:CF:4C
[17:29:33][C][wifi:354]:   SSID: 'home'[redacted]
[17:29:33][C][wifi:355]:   IP Address: 192.168.1.88
[17:29:34][C][wifi:357]:   BSSID: 38:D5:47:BD:2A:98[redacted]
[17:29:34][C][wifi:358]:   Hostname: 'powerpalble'
[17:29:34][C][wifi:360]:   Signal strength: -41 dB ▂▄▆█
[17:29:34][C][wifi:364]:   Channel: 11
[17:29:34][C][wifi:365]:   Subnet: 255.255.255.0
[17:29:34][C][wifi:366]:   Gateway: 192.168.1.1
[17:29:34][C][wifi:367]:   DNS1: 192.168.1.1
[17:29:34][C][wifi:368]:   DNS2: 0.0.0.0
[17:29:34][C][logger:233]: Logger:
[17:29:34][C][powerpal_ble:013]: POWERPAL
[17:29:34][C][powerpal_ble:014]:  Battery 'Powerpal Battery'
[17:29:34][C][powerpal_ble:014]:    Device Class: 'battery'
[17:29:34][C][powerpal_ble:014]:    State Class: ''
[17:29:34][C][powerpal_ble:014]:    Unit of Measurement: '%'
[17:29:34][C][powerpal_ble:014]:    Accuracy Decimals: 0
[17:29:34][C][powerpal_ble:015]:  Power 'Powerpal Power'
[17:29:34][C][powerpal_ble:015]:    Device Class: 'power'
[17:29:34][C][powerpal_ble:015]:    State Class: 'measurement'
[17:29:34][C][powerpal_ble:016]:    Accuracy Decimals: 5
[17:29:34][C][esp32_ble_tracker:712]: BLE Tracker:
[17:29:34][C][esp32_ble_tracker:713]:   Scan Duration: 300 s
[17:29:34][C][esp32_ble_tracker:714]:   Scan Interval: 320.0 ms
[17:29:34][C][esp32_ble_tracker:715]:   Scan Window: 30.0 ms
[17:29:34][C][esp32_ble_tracker:716]:   Scan Type: ACTIVE
[17:29:34][C][ble_client:035]: BLE Client:
[17:29:34][C][ble_client:036]:   Address: ff:e9:b2:2e:da:51
[17:29:34][C][mdns:084]: mDNS:
[17:29:34][C][mdns:085]:   Hostname: powerpalble
[17:29:34][C][ota:085]: Over-The-Air Updates:
[17:29:34][C][ota:086]:   Address: powerpalble.local:3232
[17:29:34][C][ota:089]:   Using Password.
[17:29:34][C][api:138]: API Server:
[17:29:34][C][api:139]:   Address: powerpalble.local:6053
[17:29:34][C][api:143]:   Using noise encryption: NO
[17:29:38][D][esp32_ble_tracker:726]: Found device F8:23:4F:29:FF:F2 RSSI=-92
[17:29:38][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:30:20][I][ota:105]: Boot seems successful, resetting boot loop counter.
[17:30:20][D][esp32.preferences:114]: Saving preferences to flash...
[17:30:21][D][esp32_ble_tracker:217]: Starting scan...
[17:30:21][D][esp32_ble_tracker:726]: Found device 6C:0C:CD:65:F3:FC RSSI=-81
[17:30:21][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:30:22][D][esp32_ble_tracker:726]: Found device 80:7A:BF:E0:15:17 RSSI=-84
[17:30:22][D][esp32_ble_tracker:747]:   Address Type: PUBLIC
[17:30:22][D][esp32_ble_tracker:749]:   Name: 'HTC BS 17EC92'
[17:30:22][D][esp32_ble_tracker:751]:   TX Power: 2
[17:30:23][D][esp32_ble_tracker:726]: Found device 48:B4:CA:F5:21:61 RSSI=-71
[17:30:23][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:30:23][D][esp32_ble_tracker:726]: Found device 79:CF:34:68:DC:FA RSSI=-83
[17:30:23][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:30:24][D][esp32_ble_tracker:726]: Found device 80:7A:BF:E0:1A:A2 RSSI=-80
[17:30:24][D][esp32_ble_tracker:747]:   Address Type: PUBLIC
[17:30:24][D][esp32_ble_tracker:749]:   Name: 'HTC BS A2E2E6'
[17:30:24][D][esp32_ble_tracker:751]:   TX Power: 2
[17:30:24][D][esp32_ble_tracker:726]: Found device 4D:53:83:58:26:4E RSSI=-90
[17:30:24][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:30:24][D][esp32_ble_tracker:751]:   TX Power: 2
[17:30:32][D][esp32_ble_tracker:726]: Found device F9:46:7F:95:0F:30 RSSI=-91
[17:30:32][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:30:33][D][esp32_ble_tracker:726]: Found device 6C:AC:AC:B0:CF:FC RSSI=-76
[17:30:33][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:31:00][D][esp32_ble_tracker:726]: Found device 7A:A5:0F:AF:84:B0 RSSI=-77
[17:31:00][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:31:18][D][esp32_ble_tracker:726]: Found device 72:CD:A4:24:B3:57 RSSI=-81
[17:31:18][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:31:19][D][esp32_ble_tracker:726]: Found device 7B:63:7A:16:55:C5 RSSI=-94
[17:31:19][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:31:19][D][esp32_ble_tracker:751]:   TX Power: 2
[17:31:59][D][esp32_ble_tracker:726]: Found device D8:DF:A7:8E:C8:C5 RSSI=-97
[17:31:59][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:34:36][D][esp32_ble_tracker:726]: Found device 4D:29:FB:4F:6D:06 RSSI=-83
[17:34:36][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:34:40][D][esp32_ble_tracker:726]: Found device 7B:B4:33:F6:1F:82 RSSI=-83
[17:34:40][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:35:21][D][esp32_ble_tracker:217]: Starting scan...
[17:35:22][D][esp32_ble_tracker:726]: Found device 80:7A:BF:E0:1A:A2 RSSI=-80
[17:35:22][D][esp32_ble_tracker:747]:   Address Type: PUBLIC
[17:35:22][D][esp32_ble_tracker:749]:   Name: 'HTC BS A2E2E6'
[17:35:22][D][esp32_ble_tracker:751]:   TX Power: 2
[17:35:22][D][esp32_ble_tracker:726]: Found device 80:7A:BF:E0:15:17 RSSI=-83
[17:35:22][D][esp32_ble_tracker:747]:   Address Type: PUBLIC
[17:35:22][D][esp32_ble_tracker:749]:   Name: 'HTC BS 17EC92'
[17:35:22][D][esp32_ble_tracker:751]:   TX Power: 2
[17:35:24][D][esp32_ble_tracker:726]: Found device 6C:AC:AC:B0:CF:FC RSSI=-77
[17:35:24][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:35:24][D][esp32_ble_tracker:726]: Found device 72:CD:A4:24:B3:57 RSSI=-80
[17:35:24][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:35:26][D][esp32_ble_tracker:726]: Found device 48:B4:CA:F5:21:61 RSSI=-68
[17:35:26][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:35:33][D][esp32_ble_tracker:726]: Found device 7B:B4:33:F6:1F:82 RSSI=-83
[17:35:33][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:35:34][D][esp32_ble_tracker:726]: Found device 4D:53:83:58:26:4E RSSI=-98
[17:35:34][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:35:34][D][esp32_ble_tracker:751]:   TX Power: 2
[17:35:58][D][esp32_ble_tracker:726]: Found device 7B:63:7A:16:55:C5 RSSI=-94
[17:35:58][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:35:58][D][esp32_ble_tracker:751]:   TX Power: 2
[17:36:07][D][esp32_ble_tracker:726]: Found device D8:DF:A7:8E:C8:C5 RSSI=-99
[17:36:07][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:36:13][D][esp32_ble_tracker:726]: Found device F9:46:7F:95:0F:30 RSSI=-94
[17:36:13][D][esp32_ble_tracker:747]:   Address Type: RANDOM
[17:39:17][D][esp32_ble_tracker:726]: Found device 5F:29:92:78:A5:8B RSSI=-68
[17:39:17][D][esp32_ble_tracker:747]:   Address Type: RANDOM
  1. I have witnessed this on my Emerald as well. Unsure of the cause. I will probably have to figure out how often it reconnects and then check if the app does anything special to keep connected (or if it also ends up disconnected as well)
  2. This is an ESPHome specific behaviour, but you can add force_update: true to the yaml of the Emerald sensor entity (See here: Sensor Component — ESPHome)
  3. Yes, read here for more information: Powerpal smart energy monitor - #132 by WeekendWarrior1

It looks like your ESP32 isn’t finding your Powerpal. Please check you have the correct Bluetooth address configured in your yaml, and (as above), you don’t have any other device already connected to it (the Powerpal and Emerald can only have a single bluetooth connection)