Skip to content

Releases: jptstar/tsun-local

TSUN Local Diagnostic — latest

Pre-release

Choose a tag to compare

@github-actions github-actions released this 05 Sep 06:54
2819624

Rolling prerelease for TSUN Local Diagnostic. Two supported distributions are maintained at feature parity: the Windows x86_64 executable and the full Python package. Linux users should use the Python package. Dedicated macOS and Linux binaries are no longer published. The historical single-file tsun_dump.py remains available only for compatibility.

Version 1.6.2

Choose a tag to compare

@github-actions github-actions released this 12 Sep 10:46

TSUN Local 1.6.2

TSUN Local 1.6.2 stabilizes daily-energy restoration and promotes the validated 1.6.2 beta work to stable.

Critical daily-energy restore fix

  • Restored Home Assistant energy states are now converted from the stored display unit (for example Wh) to TSUN Local's native kWh before they are reused.
  • This prevents the 1.6.1 update/restart regression where a value such as 190 Wh could be interpreted as 190 kWh.
  • AC and PV daily/total energy restoration uses the same unit-safe path for 1511, 02B0 and 1097.
  • Clearly impossible 1.6.1 daily values already affected by the x1000 regression are repaired conservatively; plausible values are never guessed.
  • Home Assistant local midnight remains the only displayed daily-energy boundary. Hardware/logger counter resets continue to be handled with total-energy deltas.

Activity and diagnostics

  • communication_last_success is published to the UI at most every five minutes while exact poll timing remains in diagnostics.
  • Raw *_raw diagnostics and the last-success timestamp stay available but are hidden from normal UI visibility by default.
  • Meaningful communication, adaptive polling, operating-state and decoded alarm entities remain visible.

Country / grid profile

  • Adds protocol-aware country_profile presentation as code (native name).
  • 1511 evidence includes 2 (Deutschland), 6 (Polska) and 8 (France).
  • 02B0 and 1097 keep their protocol-specific profile sources. Unknown values remain numeric rather than guessed.

Alarm decoding

  • MP3000 / 1511 A030 (8192 / 0x2000 in global alarm word 1) is decoded as Low solar input.

Validation

The stable source is published only after the complete unit-test suite, HACS validation and Home Assistant Hassfest pass. TSUN Local remains local and strictly read-only.

Version 1.6.2-beta.3

Version 1.6.2-beta.3 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 12 Sep 09:19

TSUN Local 1.6.2-beta.3

This beta focuses on a much cleaner Home Assistant Activity view and adds protocol-aware country/grid-profile presentation.

Activity cleanup

  • Applies consistently to runtime protocols 1511, 02B0 and 1097.
  • communication_last_success is still available, but its user-facing timestamp changes at most once every five minutes instead of every poll.
  • The exact last successful poll time is still retained in TSUN Local diagnostics.
  • communication_last_success and raw *_raw diagnostics are hidden from normal Home Assistant UI visibility by default. They are not deleted and can be revealed from entity settings when needed.
  • Existing installations receive this visibility cleanup once; if a user later chooses to reveal an entity, TSUN Local does not hide it again on every restart.
  • Meaningful states stay visible: online/offline, adaptive polling state, operating state, inverter alarm and decoded active alarm names.

Country / grid profile

A new diagnostic entity uses a stable English ID, country_profile, and presents the raw protocol value as code (native name) when a mapping is known.

For 1511 / MP3000, current evidence supports:

  • 2 (Deutschland) — profile/cloud evidence;
  • 6 (Polska) — confirmed by three independent MP3000 hardware dumps;
  • 8 (France) — confirmed by two MP3000 hardware dumps.

Unknown 1511 values remain numeric instead of being guessed. The original raw value remains available separately for diagnostics.

For 02B0 and 1097, TSUN Local uses their protocol-specific country/profile source and the established TSUN enumeration, with native/endonym country labels where practical.

Retained from beta.2

  • Conservative automatic protocol detection across validated runtime families 1511, 1097 and 02B0.
  • Strict manual protocol selection and fail-closed ambiguity handling.
  • MP3000 low-solar status 1511-A030 decoded as Low solar input and kept non-fault when it is the only active bit.
  • Validated 1097 / GEN4 presentation.
  • Transparent TSUN Local brand assets.
  • Experimental 3026 remains diagnostic-only.

Safety

TSUN Local remains local and strictly read-only. This beta adds no inverter configuration, protection-setting or control write operation.

Version 1.6.2-beta.2

Version 1.6.2-beta.2 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 12 Sep 08:28

TSUN Local 1.6.2-beta.2

This beta supersedes 1.6.2-beta.1 and republishes the current 1.6.2 development source with the latest validated protocol wording, MP3000 low-solar alarm mapping and transparent TSUN Local brand assets.

Changes since beta.1

  • 1097 / GEN4: the runtime family is presented consistently as validated on the Sunology PLAY2 GEN4 path; only individual fields that still need semantic confirmation remain marked for field validation.
  • MP3000 / 1511: alarm_global_1_raw = 8192 (0x2000, bit 13) is exposed as localized Low solar input (1511-A030). When this is the only active bit it remains a normal non-fault low-irradiance condition.
  • Branding: the existing TSUN Local icon/logo design and colors are unchanged, but the connected light background is now true PNG transparency in Home Assistant brand assets, HACS package assets and the public website icon.

Retained from beta.1

  • Firmware is only the first protocol priority; automatic detection can validate the other supported runtime families if needed.
  • Manual 1511, 1097 and 02B0 selections remain strict with no silent fallback.
  • Ambiguous candidates are rejected instead of guessed.
  • Zero solar production is neutral, so protocol detection remains usable at night.
  • Once selected and stored, the runtime protocol is not rescored or switched during normal polling.
  • Experimental 3026 remains diagnostic-only and is not part of runtime automatic detection.

Validation requested

Please test normal setup and Reconfigure on known 1511, 02B0 and 1097 hardware. For MP3000 users, also verify that dawn/dusk low-solar conditions show the localized low-solar status without creating a false fault.

Safety

TSUN Local remains local and strictly read-only. This beta adds no inverter configuration, protection-setting or control write operation.

Version 1.6.2-beta.1

Version 1.6.2-beta.1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 12 Sep 07:01

TSUN Local 1.6.2-beta.1

This beta introduces conservative, fail-safe protocol detection for TSUN Local 1.6.2 and includes the latest read-only protocol coverage work.

This prerelease is intended for real-hardware validation before 1.6.2 stable.

Automatic protocol detection

  • Logger firmware is used only as the first protocol to try.
  • All validated runtime families (1511, 1097, 02B0) can be evaluated when needed.
  • A candidate must first pass the existing protocol/transport validation, then reach at least 80/100 confidence.
  • If another valid candidate is within 20 points, detection stops as ambiguous instead of guessing.
  • Zero production is neutral, so setup is intended to remain valid at night.
  • Once a protocol is selected and stored, normal polling never switches family automatically.

Manual and Reconfigure

  • Manual 1511, 1097 and 02B0 selections remain strict: the chosen family must validate and there is no silent fallback.
  • Reconfigure now allows Auto, Force detection, 1511, 1097 or 02B0.
  • Reconfiguration is transactional: the existing entry remains unchanged unless the new connection/protocol validates successfully.

Protocol coverage

  • 02B0 read-only diagnostic/signature coverage now includes 0x2011..0x2013, 0x202D..0x205F and 0x302B..0x302F; the additional values remain raw pending semantic validation.
  • 1097 is classified as the validated GEN4 family, including the Sunology PLAY2 GEN4 path.
  • Experimental 3026 remains diagnostic-only and is not part of runtime automatic detection.

Validation requested

Please test normal setup and Reconfigure on known 1511, 02B0 and 1097 hardware. In particular, report any case where Auto refuses a known device, selects an unexpected family, or a deliberately wrong manual family is accepted.

Safety

TSUN Local remains local and strictly read-only. This beta adds no inverter configuration or write operation.

Version 1.6.1

Choose a tag to compare

@github-actions github-actions released this 10 Sep 09:42
2b017af

TSUN Local 1.6.1

TSUN Local 1.6.1 promotes the validated 1.6.1 beta series to stable. The integration remains fully local and read-only, with no inverter configuration or control writes.

Communication resilience

  • Reuse one TCP session across a healthy polling cycle on 1511, 02B0 and 1097.
  • Retry one failed protocol block once on a fresh connection instead of immediately invalidating otherwise valid telemetry.
  • Keep requests sequential through the existing per-logger FIFO so one slow logger does not block unrelated devices.
  • Keep alarm and advanced diagnostic reads best effort.
  • Preserve adaptive polling and the existing offline/failure thresholds.

Energy reliability

  • Keep the latest valid AC/PV energy values available across temporary communication loss and Home Assistant restarts.
  • Use Home Assistant local midnight as the only displayed daily-energy boundary.
  • Advance daily AC/PV energy primarily from monotonic total-energy deltas.
  • Ignore hardware daily-counter resets at sunrise or other times, including the PLAY2 / 1097 reset observed around 18:00.
  • Recover same-day missed production after a Home Assistant restart when persisted tracking references are available.

Logger Wi-Fi signal

  • Preserve the last valid logger RSSI across one transient five-minute HTTP refresh miss.
  • After two consecutive RSSI refresh misses, mark Logger Wi-Fi signal unavailable instead of keeping an indefinitely stale value.
  • Never synthesize 0% when an RSSI read fails.
  • Restore the real signal immediately on the next successful logger metadata read.
  • Apply the same RSSI freshness policy to 1511, 02B0 and 1097.

Compatibility and regression safety

  • Keep the validated protocol register maps and decoders unchanged.
  • Keep existing entity keys, protocol framing, PV-input handling, alarms, firmware information and advanced diagnostics unchanged outside the targeted resilience fixes.
  • Keep the integration local and strictly read-only.

Validation

The 1.6.1-beta.6 source passed the complete unit-test suite, HACS validation and Home Assistant Hassfest before promotion. The stable release contains no functional change from beta.6; only stable release metadata and documentation are updated.

Version 1.6.1-beta.6

Version 1.6.1-beta.6 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 08 Sep 22:21

TSUN Local 1.6.1-beta.6

This beta keeps the validated beta.5 daily-energy handling unchanged and fixes logger Wi-Fi RSSI freshness across all protocol families.

Logger Wi-Fi signal

  • Preserve the last valid logger RSSI across one transient five-minute HTTP refresh miss.
  • After two consecutive RSSI refresh misses (about 10 minutes), mark Logger Wi-Fi signal unavailable instead of keeping an indefinitely stale value.
  • Never synthesize 0% for a failed RSSI read.
  • Restore the real RSSI immediately on the next successful logger HTTP read.
  • Apply the same common logger-metadata policy to 1511, 02B0 and 1097.

Daily energy retained from beta.5

  • Home Assistant local midnight remains the only displayed day boundary.
  • Daily AC/PV energy continues from monotonic total-energy deltas and remains protected from hardware counter resets at sunrise or around 18:00.
  • No protocol register mapping or device write behavior is changed.

Validation

  • The complete unit-test suite and beta source checks passed before publication.

Safety

TSUN Local remains local and strictly read-only. This beta changes only Home Assistant-side logger metadata freshness.

Version 1.6.1-beta.5

Version 1.6.1-beta.5 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 07 Sep 23:04

TSUN Local 1.6.1-beta.5

This beta harmonizes daily-energy handling across 1511, 02B0 and 1097 after field tests showed that TSUN hardware does not always reset its own daily counter at Home Assistant midnight.

What beta.5 changes

  • Home Assistant local midnight is the only calendar-day boundary shown by TSUN Local.
  • *_energy_total is the preferred monotonic reference used to advance *_energy_today.
  • A hardware daily-counter drop at another time is treated as a logger/inverter reset, not as a new Home Assistant day.
  • Tracking references are stored with the Home Assistant state so a same-day HA restart can recover missed energy from the total counter.
  • The correction covers the PLAY2 / 1097 behavior reported in issue #73 and the overnight/sunrise behavior observed on MP3000 / 1511 and MX500 / 02B0.

Cases covered

MP3000 / 1511 and MX500 / 02B0: if hardware keeps yesterday's daily value overnight and only resets when the inverter wakes, HA remains at 0 after midnight and starts the new day cleanly.

Sunology PLAY2 / 1097: if the raw daily counter drops around 18:00, the displayed Home Assistant day stays continuous from total-energy deltas and does not start a false new day.

Restart behavior

  • Same-day restart: recover missed energy from the monotonic total counter when beta.5 tracking metadata is available.
  • Restart just after midnight: use the persisted 00:00 total reference.
  • Long outage spanning midnight: exact allocation across midnight can be impossible; use the first fresh hardware daily value as best effort rather than inventing a split.

Safety

TSUN Local remains local and strictly read-only. This beta changes only Home Assistant-side interpretation and persistence of already-read energy counters.

Version 1.6.1-beta.4

Version 1.6.1-beta.4 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 07 Sep 08:00

TSUN Local 1.6.1-beta.4

This beta focuses on the logger Wi-Fi signal behavior observed on TITAN / 1511 hardware while retaining the communication-resilience and energy-restoration changes from the previous 1.6.1 betas.

Logger Wi-Fi signal

  • Preserve the last valid logger Wi-Fi signal when a periodic local HTTP read temporarily fails instead of publishing a false 0%.
  • Retry the logger RSSI once after the first successful inverter protocol refresh when the initial Home Assistant startup metadata read did not contain a signal.
  • Accept firmware variants in strict priority order: cover_sta_rssi, sta_rssi, wifi_rssi, then wifi_signal.
  • Keep logger RSSI independent from inverter online/offline state and adaptive polling decisions.

This specifically targets the MP3000 / 1511 case where inverter polling remained healthy while the logger Wi-Fi entity became Unknown or dropped to a misleading 0%.

Communication resilience retained

  • 1511, 02B0 and 1097 persistent healthy-cycle TCP session reuse remains unchanged.
  • The bounded single reconnect/retry remains unchanged.
  • Per-logger FIFO and adaptive polling remain unchanged.
  • No validated register range is changed or removed.

Energy behavior retained

  • Daily energy restoration and local midnight rollover from beta.3 remain unchanged.
  • Daily energy can reset locally to 0 while the inverter remains offline overnight.
  • The first fresh daily-energy value is published immediately when the inverter returns.
  • Total energy remains preserved while offline.

What to test

  1. On MP3000 / 1511, watch Logger Wi-Fi signal for several hours and across low-light/offline periods.
  2. Confirm a transient logger HTTP failure no longer creates a false 0% drop.
  3. Restart Home Assistant and verify the logger RSSI appears promptly once the local logger page becomes readable.
  4. Confirm inverter communication remains stable and unaffected.
  5. Keep checking 02B0 and 1097 for regression-free behavior.

Safety

TSUN Local remains local and read-only. This beta adds no inverter configuration or control writes.

Version 1.6.1-beta.3

Version 1.6.1-beta.3 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 07 Sep 06:38

TSUN Local 1.6.1-beta.3

This beta corrects the daily-energy recovery behavior introduced in beta.2 while retaining all communication-resilience improvements from beta.1 and beta.2.

Daily energy after an offline midnight rollover

  • Every *_energy_today entity still resets locally to 0 kWh at local midnight while the inverter/logger is sleeping or offline.
  • When the inverter returns, the first successful protocol poll containing a fresh daily-energy value is published immediately.
  • The extra two-successful-poll hold from beta.2 has been removed, so a valid value such as 3.4 kWh no longer remains hidden behind the locally generated 0 kWh for another polling interval.
  • Total-energy restoration is unchanged.
  • Instantaneous voltage/current/power measurements remain unavailable while the inverter is offline.

Example expected behavior: yesterday ends at 2.5 kWh; at midnight the daily counter becomes 0 kWh while the inverter remains offline; if the inverter reconnects at noon and reports 3.4 kWh, Home Assistant shows 3.4 kWh on that first valid update.

Communication resilience retained

  • 1097, 02B0 and 1511 retain persistent healthy-cycle TCP sessions and one bounded reconnect/retry after a failed block.
  • Existing per-logger FIFO and adaptive polling behavior are unchanged.
  • No validated 02B0 or 1511 register range is removed, merged or reinterpreted.
  • Existing 1097 transient reconnect protection remains unchanged.

Regression safety

  • The production correction is limited to the shared Home Assistant sensor restoration layer.
  • One legacy 1511 unit-test fixture was aligned with the persistent-session transport already released in beta.1; production 1511 transport code was not changed by this correction.
  • Complete unit tests, HACS validation and Home Assistant Hassfest must pass before publication.

What to test

  1. Let the inverter remain offline across local midnight and verify daily AC/PV energy becomes 0 kWh.
  2. Reconnect or wait for sunrise and verify the first fresh daily-energy value appears immediately.
  3. Verify total AC/PV energy retains its previous valid value while offline.
  4. Verify instantaneous measurements remain unavailable while offline and recover normally afterward.
  5. Watch communication stability on 1097, 02B0 and 1511 over several hours.

Safety

TSUN Local remains local and read-only. This beta adds no inverter configuration or control writes.