Commit 0c91471
fix: EVC cumulative energy word order + unreachable protocol gates + reactive power L1/L2
1. EV charger cumulative energy (0x0010 EQ_Total, input u32): the charger
transmits this register high-word-first, contradicting the doc
(EVC_Modbus_V3.5: 0x10=Lo / 0x11=Hi) and the same counter's
little-ordered holding copy at 0x0619. Raw 3 (0.3 kWh) displayed as
19660.8 kWh. Adds an optional per-sensor order32 override to
BaseModbusSensorEntityDescription (the read path already honored it via
getattr; only the dataclass field was missing) and sets order32="big"
on charge_added_cum.
2. modbus_min=101 gates made a dozen entities unreachable: register 0x82
reports the protocol version (100 = V001.00) and no known device
returns more than 100 - the 101/102 values conflated the protocol
register with the document revision (see the discussion on #2064).
Raw register reads on a real protocol-100 device confirm all affected
registers respond with sensible data (bias_power, peakshaving
discharge limits, EV charger / AdapterBox communication states).
Gates relaxed to 100; misleading dataclass comments corrected.
3. Grid Reactive Power L1/L2 displayed ~26 Mvar on protocol-100 devices:
they were read as S32 from 0xC0/0xC2, but raw reads show protocol 100
serves independent per-phase S16 values at 0xC0..0xC3 - the S32 read
merged total+L1 (and L2+L3) into one absurd number. Meanwhile the
V1.02-documented registers 0xDE/0xE0 respond correctly at protocol 100
(raw-verified: 397/572 var) but were gated modbus_min=102, unreachable.
L1/L2 now follow the same layout as L3/Total (documented S32 >= 100,
legacy S16 <= 99). The V3.36-derived 0xC0/0xC2 S32 definitions are NOT
deleted - they are re-gated to protocol 101 only, with a comment; if
proto-101 hardware ever appears their overlap with 0xDE/0xE0 must be
resolved with that hardware in hand.
Verified live on X3 EVC 11kW and X3-Hybrid-G4 15kW.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 2178c86 commit 0c91471
3 files changed
Lines changed: 36 additions & 58 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
256 | | - | |
| 256 | + | |
| 257 | + | |
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
| |||
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
271 | | - | |
272 | | - | |
| 272 | + | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
291 | | - | |
292 | | - | |
| 292 | + | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | | - | |
311 | | - | |
| 311 | + | |
| 312 | + | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
| |||
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
339 | | - | |
340 | | - | |
| 340 | + | |
| 341 | + | |
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2283 | 2283 | | |
2284 | 2284 | | |
2285 | 2285 | | |
2286 | | - | |
| 2286 | + | |
2287 | 2287 | | |
2288 | 2288 | | |
2289 | 2289 | | |
| |||
2498 | 2498 | | |
2499 | 2499 | | |
2500 | 2500 | | |
2501 | | - | |
| 2501 | + | |
2502 | 2502 | | |
2503 | 2503 | | |
2504 | 2504 | | |
| |||
2511 | 2511 | | |
2512 | 2512 | | |
2513 | 2513 | | |
2514 | | - | |
| 2514 | + | |
2515 | 2515 | | |
2516 | 2516 | | |
2517 | 2517 | | |
| |||
2525 | 2525 | | |
2526 | 2526 | | |
2527 | 2527 | | |
2528 | | - | |
| 2528 | + | |
2529 | 2529 | | |
2530 | 2530 | | |
2531 | 2531 | | |
| |||
2538 | 2538 | | |
2539 | 2539 | | |
2540 | 2540 | | |
2541 | | - | |
| 2541 | + | |
2542 | 2542 | | |
2543 | 2543 | | |
2544 | 2544 | | |
| |||
2551 | 2551 | | |
2552 | 2552 | | |
2553 | 2553 | | |
2554 | | - | |
| 2554 | + | |
2555 | 2555 | | |
2556 | 2556 | | |
2557 | 2557 | | |
| |||
2565 | 2565 | | |
2566 | 2566 | | |
2567 | 2567 | | |
2568 | | - | |
| 2568 | + | |
2569 | 2569 | | |
2570 | 2570 | | |
2571 | 2571 | | |
| |||
4421 | 4421 | | |
4422 | 4422 | | |
4423 | 4423 | | |
4424 | | - | |
| 4424 | + | |
4425 | 4425 | | |
4426 | 4426 | | |
4427 | 4427 | | |
| |||
5223 | 5223 | | |
5224 | 5224 | | |
5225 | 5225 | | |
5226 | | - | |
| 5226 | + | |
5227 | 5227 | | |
5228 | 5228 | | |
5229 | 5229 | | |
5230 | 5230 | | |
5231 | 5231 | | |
5232 | 5232 | | |
5233 | | - | |
| 5233 | + | |
5234 | 5234 | | |
5235 | 5235 | | |
5236 | 5236 | | |
5237 | 5237 | | |
5238 | 5238 | | |
5239 | 5239 | | |
5240 | 5240 | | |
5241 | | - | |
| 5241 | + | |
5242 | 5242 | | |
5243 | 5243 | | |
5244 | 5244 | | |
5245 | 5245 | | |
5246 | 5246 | | |
5247 | 5247 | | |
5248 | | - | |
| 5248 | + | |
5249 | 5249 | | |
5250 | 5250 | | |
5251 | 5251 | | |
5252 | 5252 | | |
5253 | 5253 | | |
5254 | 5254 | | |
5255 | | - | |
| 5255 | + | |
5256 | 5256 | | |
5257 | 5257 | | |
5258 | 5258 | | |
5259 | 5259 | | |
5260 | 5260 | | |
5261 | 5261 | | |
5262 | 5262 | | |
5263 | | - | |
| 5263 | + | |
5264 | 5264 | | |
5265 | 5265 | | |
5266 | 5266 | | |
| |||
7692 | 7692 | | |
7693 | 7693 | | |
7694 | 7694 | | |
7695 | | - | |
| 7695 | + | |
7696 | 7696 | | |
7697 | 7697 | | |
7698 | 7698 | | |
| |||
7706 | 7706 | | |
7707 | 7707 | | |
7708 | 7708 | | |
7709 | | - | |
| 7709 | + | |
7710 | 7710 | | |
7711 | 7711 | | |
7712 | 7712 | | |
| |||
8042 | 8042 | | |
8043 | 8043 | | |
8044 | 8044 | | |
8045 | | - | |
8046 | | - | |
8047 | | - | |
8048 | | - | |
8049 | | - | |
8050 | | - | |
8051 | | - | |
8052 | | - | |
8053 | | - | |
8054 | | - | |
8055 | | - | |
8056 | | - | |
8057 | | - | |
8058 | | - | |
8059 | 8045 | | |
8060 | 8046 | | |
8061 | 8047 | | |
| |||
8066 | 8052 | | |
8067 | 8053 | | |
8068 | 8054 | | |
8069 | | - | |
| 8055 | + | |
8070 | 8056 | | |
8071 | 8057 | | |
8072 | 8058 | | |
| |||
8082 | 8068 | | |
8083 | 8069 | | |
8084 | 8070 | | |
8085 | | - | |
8086 | | - | |
8087 | | - | |
8088 | | - | |
8089 | | - | |
8090 | | - | |
8091 | | - | |
8092 | | - | |
8093 | | - | |
8094 | | - | |
8095 | | - | |
8096 | | - | |
8097 | | - | |
8098 | | - | |
8099 | 8071 | | |
8100 | 8072 | | |
8101 | 8073 | | |
| |||
8106 | 8078 | | |
8107 | 8079 | | |
8108 | 8080 | | |
8109 | | - | |
| 8081 | + | |
8110 | 8082 | | |
8111 | 8083 | | |
8112 | 8084 | | |
| |||
10186 | 10158 | | |
10187 | 10159 | | |
10188 | 10160 | | |
| 10161 | + | |
10189 | 10162 | | |
10190 | 10163 | | |
10191 | 10164 | | |
| |||
10197 | 10170 | | |
10198 | 10171 | | |
10199 | 10172 | | |
| 10173 | + | |
10200 | 10174 | | |
10201 | 10175 | | |
10202 | 10176 | | |
| |||
10208 | 10182 | | |
10209 | 10183 | | |
10210 | 10184 | | |
| 10185 | + | |
10211 | 10186 | | |
10212 | 10187 | | |
10213 | 10188 | | |
| |||
10219 | 10194 | | |
10220 | 10195 | | |
10221 | 10196 | | |
| 10197 | + | |
10222 | 10198 | | |
10223 | 10199 | | |
10224 | 10200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
| 1138 | + | |
1138 | 1139 | | |
1139 | 1140 | | |
1140 | 1141 | | |
| |||
0 commit comments