Add X1-VAST (type 34), fix battery current sign, add 14 sensors, fix discovery#209
Open
Jhacarreiro wants to merge 9 commits intosquishykid:masterfrom
Open
Add X1-VAST (type 34), fix battery current sign, add 14 sensors, fix discovery#209Jhacarreiro wants to merge 9 commits intosquishykid:masterfrom
Jhacarreiro wants to merge 9 commits intosquishykid:masterfrom
Conversation
The X1-VAST is a newer single-phase hybrid inverter from SolaX.
It returns type=34 in the API response but uses the same Data mapping as the X1 Hybrid Gen4 (type 15).
Tested and confirmed matching fields:
- Data[0]/10 = Grid Voltage (V)
- Data[1]/10 = Grid Current (A)
- Data[2] = AC Power (W, signed)
- Data[3]/100 = Grid Frequency (Hz)
- Data[4]/10 = PV1 Voltage (V)
- Data[5]/10 = PV2 Voltage (V)
- Data[6]/10 = PV1 Current (A)
- Data[7]/10 = PV2 Current (A)
- Data[8] = PV1 Power (W)
- Data[9] = PV2 Power (W)
- Data[11,12] = Total Yield (kWh, /10)
- Data[13]/10 = Daily Yield (kWh)
- Data[14]/100 = Battery Voltage (V)
- Data[16] = Battery Power (W, signed)
- Data[17] = Battery Temperature (C)
- Data[18] = Battery SoC (%)
- Data[32] = Grid Power (W, signed)
- Data[34,35] = Feed-in Energy (kWh, /100)
- Data[36,37] = Consumption (kWh, /100)
API response example:
{"sn":"...","ver":"006.06","type":34,"Data":[2479,178,4336,5002,2297,2288,100,99,2317,2280,21,8212,0,69,24330,65516,0,18,99,...],"Information":[10,34,"10M0A00210170P",18,17.07,0,15.05,0.03,0,1]}
Connection: HTTPS only (port 443), requires nginx reverse proxy for the solax library (HTTP only).
… A parte relevante é esta: (_, _, *processors) = mapping for processor in processors: result[sensor_name] = processor(result[sensor_name])
Two changes to x1_hybrid_gen4.py:
1. Accept type 34 (X1-VAST) alongside type 15 in schema validation,
following the same pattern used in x1_g4_series.py for types 18/22.
The X1-VAST is a newer single-phase hybrid inverter that returns
type=34 but uses the same Data mapping as X1 Hybrid Gen4 (type 15).
2. Fix Battery current (Data[15]) sign handling.
Added to_signed before div100 so negative values are correctly
interpreted. Without this, value 65516 shows as 655.16A instead
of the correct -0.20A.
Tested with real X1-VAST hardware:
- Firmware: 006.06
- Connection: HTTPS (port 443) via nginx reverse proxy
- All response_decoder fields return correct values
- Discovery works correctly via real_time_api()
API response example:
{"sn":"...","ver":"006.06","type":34,"Data":[2479,178,4336,5002,...],"Information":[10,34,"10M0A00210170P",18,17.07,0,15.05,0.03,0,1]}
Three changes to x1_hybrid_gen4.py: 1. Accept type 34 (X1-VAST) alongside type 15 in schema validation, following the same pattern used in x1_g4_series.py for types 18/22. 2. Fix Battery current (Data[15]) sign handling. Added to_signed before div100 so negative values are correctly interpreted. Without this, value 65516 shows as 655.16A instead of the correct -0.20A. 3. Add missing sensors from Data2.txt mapping (type 15,23): - Run mode (Data[10]) - Battery remaining energy (Data[23], /10, kWh) - EPS power (Data[28], signed) - EPS voltage (Data[29], /10) - EPS current (Data[30], signed, /10) Tested with real X1-VAST hardware: - Firmware: 006.06 - All new and existing fields return correct values - Discovery works correctly via real_time_api()
…ensors Adds support for the Solax X1-VAST inverter (type 34), which shares the same data format as the X1-Hybrid-G4 (type 15). Changes: - Accept type 34 in schema validation (X1-VAST) - Fix Battery current sign: added to_signed before div100 - Add 14 new sensors verified against the official SolaX app: - Total battery discharge energy [19] - Total battery charge energy [21] - Battery health (SoH) [24] - Load power [38] - Radiator temperature [39] - Consumption today [52] - Total PV energy [54] - Feed-in energy today [78] - Grid import energy today [80] - EPS energy total [83] - EPS energy today [84] - PV daily yield [85] - Battery discharge energy today [86] - Battery charge energy today [87] - Document unknown/redundant data points as comments for future investigation Tested on: Solax X1-VAST, type 34, WiFi+LAN 2.0 dongle (HTTPS), firmware 3.x, with Solax Triple Power battery. All new sensors cross-validated against the official SolaX Cloud app in real-time to confirm data point indices and scaling factors.
The X1-VAST (type 34) shares the same data format as the X1-Hybrid-G4 and now has 37 sensors mapped, making it the most complete single-phase profile in the repo.
…LL_COMPLETED to avoid premature failure on slow dongles FIRST_COMPLETED causes discovery to fail on inverters behind HTTPS reverse proxies or slow WiFi+LAN dongles, as the first successful response may not be the correct inverter class while others timeout. ALL_COMPLETED ensures all inverter classes finish before selecting the best match.
Shell script that patches the solax library inside the HA container to skip full discovery and target X1HybridGen4 directly. Needed when the WiFi LAN 2.0 dongle is behind an HTTPS reverse proxy and cannot handle 22 parallel discovery requests. Usage: curl -s https://raw.githubusercontent.com/Jhacarreiro/solax/master/patches/local-vast-patch.sh | sh
Author
|
Note: CI failures are pre-existing on the repo (see fix-1lint branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for the Solax X1-VAST inverter (type 34), which shares
the same data format as the X1-Hybrid-G4 (type 15).
Changes:
x1_hybrid_gen4.py:
Total battery discharge/charge energy, Battery health (SoH),
Load power, Radiator temperature, Consumption today,
Total PV energy, Feed-in energy today, Grid import energy today,
EPS energy total/today, PV daily yield, Battery discharge/charge today
init.py:
prevent premature failure on slow dongles behind HTTPS proxies
README.md:
Tested on: Solax X1-VAST, type 34, WiFi+LAN 2.0 dongle (HTTPS),
firmware 3.x, with Solax Triple Power battery.
All sensors cross-validated against the official SolaX Cloud app.