Skip to content

Conversation

@o-mega
Copy link
Contributor

@o-mega o-mega commented Dec 1, 2025

Device Information:

  • Name: EARU 3-Phase Breaker Meter
  • Model: EAMPDW-TY-63
  • Product ID: nopfbtfxnwqcrg5y
  • Config file: earu_3phase_breaker.yaml

Functionality:

  • Control: Main Switch (on/off).
  • Metering: Total Energy, Energy Today, Energy This Month (working natively).
  • Settings: Over/Under Voltage, Over Current, Leakage protection.

Note on Phase Measurements (Complex Data):
The device transmits real-time metrics (Voltage, Current, Power) for each phase via DPs 6, 7, and 8 encoded as a Base64 string.
Currently, I have exposed these DPs as diagnostic string sensors (Phase A raw, etc.).

Decoding Logic for Maintainers:
I have reverse-engineered the Base64 format. It decodes into an 8-byte array (Big Endian):

  • Voltage: Bytes 0-1 (divide by 10)
  • Current: Bytes 2-4 (divide by 1000)
  • Power: Bytes 5-7 (divide by 1)

Example Python decoding logic:

# Assuming 'decoded' is the byte array from base64
volts = (decoded[0] << 8 | decoded[1]) / 10.0
amps = (decoded[2] << 16 | decoded[3] << 8 | decoded[4]) / 1000.0
watts = (decoded[5] << 16 | decoded[6] << 8 | decoded[7])

I'm submitting the YAML with raw sensors so users can at least control the device and use template sensors for decoding until native base64_struct support is added to the integration.

@o-mega o-mega marked this pull request as draft December 3, 2025 06:47
@o-mega o-mega marked this pull request as ready for review December 3, 2025 07:43
@o-mega o-mega requested a review from make-all December 3, 2025 07:44
@o-mega o-mega requested a review from make-all December 3, 2025 10:56
Updated the name from 'Breaker Meter' to 'Breaker meter' and removed unnecessary mapping entries for sensor entities.

PR make-all#4075
@make-all make-all merged commit 629e437 into make-all:main Dec 3, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Tuya Local Dec 3, 2025
make-all added a commit that referenced this pull request Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants