Hi everyone!
Recently my company launched the Homey Energy Dongle — a P1 to Wi-Fi device made specifically for Homey Cloud & Homey Pro.
While of course it’s primarily designed to provide a seamless experience for Homey users, the hardware can be re-flashed with ESPHome for an all-local experience.
I’m writing this how-to for those who enjoy buying well-designed & well-tested hardware by an established brand, but prefer to use it with their own software.
The Homey Energy Dongle has a USB-C port, that when connected to a PC or Mac, you can use to flash ESPHome from a web browser.
Then, use this config:
esphome:
name: homey-energy-dongle
friendly_name: Homey Energy Dongle
on_boot:
- priority: -100.0
then:
- output.turn_on: p1_input_enable
- light.turn_on:
id: led
red: 0%
green: 0%
blue: 100%
esp32:
board: esp32-c6-devkitc-1
flash_size: 4MB
variant: esp32c6
framework:
type: esp-idf
version: 5.3.1
platform_version: 6.9.0
sdkconfig_options:
CONFIG_ESPTOOLPY_FLASHSIZE_4MB: y
ota:
- platform: esphome
password: "..." # Your OTA Password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
external_components:
- source: github://oxan/esphome-stream-server
stream_server:
- uart_id: p1_input
port: 1234
buffer_size: 256
uart:
- id: p1_input
rx_buffer_size: 256
rx_pin:
number: GPIO4
inverted: true # You might need to flip this to `false` for some meters
baud_rate: 115200 # Change this to 9600 for DSMR v2 meters.
- id: p1_output
tx_pin:
number: GPIO3
inverted: true
baud_rate: 115200
output:
- id: p1_input_enable
platform: gpio
pin:
number: GPIO23
mode: output
light:
- id: led
name: "LED"
platform: esp32_rmt_led_strip
rgb_order: GRB
pin: GPIO2
num_leds: 1
chipset: ws2812
This will let the Homey Energy Dongle create a TCP server on port 1234
. Every DSMR telegram will be broadcasted to all clients. You can test this with e.g. nc 192.168.0.100 1234
in a console on macOS.
Then, to import the data into Home Assistant, add the DSMR Smart Meter integration, and enter your device’s IP with port 1234
. And your smart meter data, such as live usage (W), consumed electricity (kWh) and gas usage (m3) should appear inside Home Assistant.
Happy hacking! ^.^
Notes
- To revert back to the original firmware, visit usb.homey.app.
- I haven’t managed to get DSMR Passthrough working yet. I’m not very experienced with ESPHome, so maybe some wizard can take a look.
- When returning your product to a store, please factory reset using usb.homey.app. We really don’t want frustrated customers why their ‘Second Chance’ product doesn’t work with Homey.
- The reason the ESPHome DSMR component isn’t used, is because it requires the Arduino framework. However, the Arduino framework does not yet work with the newest ESP32-C6.