You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d9960ae
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,24 @@
1
1
# Changelog
2
2
3
+
## [Unreleased]
4
+
5
+
### Added
6
+
7
+
-**Configurable reporting mode** — New "Live reporting" toggle (default on) under **Configure → Change reporting settings**. When disabled, readings are cached and delivered as a time-weighted average every *reporting interval* (5–300 s, default 30), reducing CPU and recorder load on installations with many panels. Energy totals are always integrated from raw readings, so only the instantaneous values are averaged.
8
+
9
+
### Changed
10
+
11
+
- Reporting interval default changed from 5 to 30 seconds; allowed range tightened from 1–300 to 5–300 seconds.
12
+
- Config entry schema bumped to version 5 (adds `live_reporting`, default `True`, via automatic migration).
13
+
- The reporting interval is now collected on its own follow-up screen that appears only when live reporting is turned off, so the interval is never shown (effectively greyed out) while live reporting is enabled.
14
+
15
+
### Fixed
16
+
17
+
- Live reporting no longer buffers readings internally, preventing unbounded memory growth over time in the default mode.
18
+
- Live reporting now publishes an immutable copy of node data to Home Assistant, avoiding rare races where consumers (sensors, diagnostics) could observe the data changing mid-read.
19
+
- Averaged interval mode now flushes buffered readings on schedule during quiet periods (e.g. at dusk), instead of waiting for the next reading or a reconnect.
20
+
- The version 5 migration clamps any pre-existing reporting interval below 5 seconds up to the new minimum, so the reporting settings form stays submittable after upgrade.
Copy file name to clipboardExpand all lines: README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ Please note that this integration requires RS485 to TCP converter that needs to
15
15
## Features
16
16
17
17
-**Real-time streaming** — Push-based data delivery with sub-second latency (no polling).
18
+
-**Configurable reporting** — Choose **live reporting** (default; every reading delivered as it arrives) or a **time-weighted averaged interval** that caches readings and pushes a single representative value every few seconds to reduce CPU and recorder load on large installations.
power, voltage in/out, current in/out, temperature, DC-DC duty cycle, RSSI,
20
21
daily energy, total energy, and readings today.
@@ -120,10 +121,22 @@ Check your Home Assistant logs after the gateway has been running for a while (u
120
121
Go to **Settings → Devices & Services → PyTap → Configure** to:
121
122
122
123
-**Change connection** — Update the gateway IP address and port.
124
+
-**Change reporting settings** — Toggle live reporting or set the averaged reporting interval (see [Reporting modes](#reporting-modes)).
123
125
-**Add** new optimizer modules (if the barcode was previously seen on the bus, it resolves instantly).
124
126
-**Remove** modules you no longer want to track.
125
127
-**Save and close** to apply changes.
126
128
129
+
### Reporting modes
130
+
131
+
PyTap can deliver readings to Home Assistant in two ways, selectable under **Configure → Change reporting settings**:
132
+
133
+
-**Live reporting (default)** — Each reading is pushed to Home Assistant as soon as it arrives from the gateway, giving sub-second latency. Best for most installations.
134
+
-**Averaged interval** — When live reporting is turned off, readings are cached and a **time-weighted average** is pushed once per *reporting interval* (5–300 seconds, default 30). Weighting each reading by how long it remained the latest value yields a representative average even when readings arrive at uneven intervals. This reduces event-loop, CPU, and recorder/database load on installations with many panels.
135
+
136
+
> **Setting the interval:** The reporting interval only applies in averaged mode, so it is hidden while **Live reporting** is enabled. To change it, open **Change reporting settings**, untick **Live reporting**, and click **Submit** — a follow-up **Reporting Interval** screen then lets you enter the value. Leaving **Live reporting** ticked skips that screen entirely.
137
+
138
+
Energy totals (daily and lifetime) are always integrated from the raw readings, so the reporting mode only affects the instantaneous values (power, voltage, current, temperature) shown on dashboards — never the accumulated energy figures.
139
+
127
140
### Diagnostics Download
128
141
129
142
PyTap diagnostics are available from the integration page:
@@ -157,7 +170,7 @@ PyTap Coordinator
157
170
└── Sensor entities update in real time
158
171
```
159
172
160
-
PyTap uses a background listener thread that streams data from the gateway, parses protocol frames, and dispatches events to the Home Assistant event loop. Only events matching your configured barcodes create or update sensor entities.
173
+
PyTap uses a background listener thread that streams data from the gateway, parses protocol frames, and dispatches events to the Home Assistant event loop. Only events matching your configured barcodes create or update sensor entities. In the default **live reporting** mode each update is forwarded immediately; in **averaged interval** mode updates are buffered and flushed as a time-weighted average every few seconds (see [Reporting modes](#reporting-modes)).
161
174
162
175
On startup, PyTap restores persisted coordinator state (barcode mappings, energy accumulators, and last node snapshots). Sensor entities also use Home Assistant restore fallback if needed, so a restart during low/no production does not force entities into unavailable when prior data exists.
0 commit comments