Skip to content

Commit f9afa84

Browse files
rusty-bitclaude
andcommitted
Register 178: write the 2-bit fields, confirmed against the inverter
A read-only probe of the settings block returned 178 = 0x2ABA, which is a valid Deye code (10 = disable, 11 = enable) in every 2-bit field, matching the three-phase protocol V105.1 and the ha-solarman and sunsynk maps. Reading the same word as single bits 4/8/12/15 would have pointed the peak-shaving and DRM switches at the neighbouring external-relay and grounding-fault fields. The probe also confirmed 336 (parallel / master-slave / Modbus SN) and 347 (CT ratio), so the diagnostic guesses at 225 and 315 are dropped. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 10f4f2d commit f9afa84

2 files changed

Lines changed: 31 additions & 27 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@
77
- Confirmed correct: zero export power (104), work mode (142), max sell power (143),
88
solar sell (145), time of use (146), TOU blocks (148-177), grid voltage/frequency
99
protection (185-188), peak-shaving power (190/191), lithium/BMS type (223).
10-
- Changed: register 178 is a nibble field - generator peak-shaving is bit 4 and grid
11-
peak-shaving bit 8 (was bit 2 / bit 4 from a community map).
10+
- Changed: register 178 holds 2-bit fields (10 = disable, 11 = enable), so each switch
11+
writes the whole pair: generator peak-shaving bits 2-3, grid peak-shaving 4-5, on-grid
12+
always on 6-7, DRM 12-13. Verified by reading this inverter: 178 = 0x2ABA, a valid code
13+
in every pair. (An earlier draft read them as single bits 4/8/12/15, which would have
14+
written the neighbouring external-relay and grounding-fault fields instead.)
1215
- New: Activate Battery (112, inverted logic), Generator Force On (132), Generator minimum
1316
solar power (139), ARC fault detection (181), generator connected to grid input (189),
14-
SmartLoad open delay (192), DRM (178 bit 15), on-grid always on (178 bit 12).
17+
SmartLoad open delay (192), DRM (178 bits 12-13), on-grid always on (178 bits 6-7).
1518
- New diagnostic sensors (read-only, disabled by default) for registers whose mapping is
16-
still unproven: 140, 178, 209, 224, 225, 228, 315, 341. Enable them and compare against
17-
Deye Cloud before making them writable.
19+
still unproven: 140, 178, 209, 224, 228, 341.
20+
- Confirmed by a read-only probe of this inverter: 336 holds parallel / master-slave /
21+
Modbus SN (0x0400 = parallel off, slave, SN 1) and 347 the CT ratio (2000), so the
22+
guesses at 225 and 315 are dropped. 345 reads 0 while Deye Cloud shows "Eastron", so
23+
Meter Select stays unconfirmed.
1824

1925
## 0.1.5
2026
- Entity ranges taken from the inverter's own "Export All Configurations" (SN 2512153227):

‎custom_components/deye_modbus/maps/sun_3ph_hybrid.yaml‎

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,8 @@ sensors:
852852
icon: mdi:meter-electric
853853
enabled_default: false
854854

855+
# Reads 0 on this inverter although Deye Cloud shows "Eastron" - the meter
856+
# maker may live in another register on this firmware.
855857
- name: Meter Select
856858
unique_id: adv_meter_select
857859
register_type: holding
@@ -887,8 +889,12 @@ sensors:
887889
# ----------------------------------------------------- unverified registers
888890
# Raw values, read-only, disabled by default. Enable them and compare with
889891
# "Export All Configurations" in Deye Cloud before they are made writable.
890-
# Expected on this system: CT ratio 2000, Modbus SN 1, backup delay 0,
891-
# meter = Eastron, and register 178 with the grid peak-shaving bit set.
892+
# Checked against this inverter (192.168.178.199) on 2026-09-20:
893+
# 178 = 0x2ABA - every 2-bit field a valid Deye code, grid peak-shaving on
894+
# 209 = 0 (backup delay), 336 = 0x0400 (parallel off, slave, Modbus SN 1),
895+
# 341 bit 2 set (MPPT scan on), 347 = 2000 (CT ratio) - all as expected.
896+
# 225 and 315 were guesses and read 0xF002 / 0x06A4, so they are dropped.
897+
# 345 (meter maker) reads 0 although Deye Cloud shows Eastron - unconfirmed.
892898
- name: Raw 178 (peak-shaving / DRM bits)
893899
unique_id: raw_178_flags
894900
register_type: holding
@@ -921,14 +927,6 @@ sensors:
921927
entity_category: diagnostic
922928
enabled_default: false
923929

924-
- name: Raw 225 (CT ratio?)
925-
unique_id: raw_225_ct_ratio
926-
register_type: holding
927-
address: 225
928-
count: 1
929-
entity_category: diagnostic
930-
enabled_default: false
931-
932930
- name: Raw 228 (beep / AM-PM / auto dim?)
933931
unique_id: raw_228_display
934932
register_type: holding
@@ -937,14 +935,6 @@ sensors:
937935
entity_category: diagnostic
938936
enabled_default: false
939937

940-
- name: Raw 315 (parallel / master-slave / modbus SN?)
941-
unique_id: raw_315_parallel
942-
register_type: holding
943-
address: 315
944-
count: 1
945-
entity_category: diagnostic
946-
enabled_default: false
947-
948938
- name: Raw 341 (MPPT scan?)
949939
unique_id: raw_341_mppt_scan
950940
register_type: holding
@@ -1904,7 +1894,9 @@ controls:
19041894
group: Advanced Function
19051895
register_type: holding
19061896
address: 178
1907-
bit: 8
1897+
mask: 0x0030
1898+
on_value: 3
1899+
off_value: 2
19081900
icon: mdi:transmission-tower
19091901
entity_category: config
19101902

@@ -1928,7 +1920,9 @@ controls:
19281920
group: Advanced Function
19291921
register_type: holding
19301922
address: 178
1931-
bit: 4
1923+
mask: 0x000C
1924+
on_value: 3
1925+
off_value: 2
19321926
read_unique_id: rb_grid_peak_shaving_enable
19331927
icon: mdi:engine
19341928
entity_category: config
@@ -2087,7 +2081,9 @@ controls:
20872081
group: Advanced Function
20882082
register_type: holding
20892083
address: 178
2090-
bit: 15
2084+
mask: 0x3000
2085+
on_value: 3
2086+
off_value: 2
20912087
read_unique_id: rb_grid_peak_shaving_enable
20922088
icon: mdi:radio-tower
20932089
entity_category: config
@@ -2099,7 +2095,9 @@ controls:
20992095
group: Advanced Function
21002096
register_type: holding
21012097
address: 178
2102-
bit: 12
2098+
mask: 0x00C0
2099+
on_value: 3
2100+
off_value: 2
21032101
read_unique_id: rb_grid_peak_shaving_enable
21042102
icon: mdi:transmission-tower
21052103
entity_category: config

0 commit comments

Comments
 (0)