Skip to content

Commit 13a30ca

Browse files
committed
Document that FRITZ read head needs USB power; battery cadence too slow
The read head only refreshes ~every 2 min on battery, which is far too slow for AstraMeter's ~1 s control loop, so battery balancing won't work. Make this explicit (USB raises it to ~10 s) in docs/powermeters.md, config.ini.example, and the web generator blurb.
1 parent 0691730 commit 13a30ca

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

config.ini.example

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,10 @@ THROTTLE_INTERVAL = 0
366366
# HTTPS = False
367367
# VERIFY_SSL = True
368368
# TIMEOUT = 10.0
369-
## The read head refreshes every ~2 min on battery (≈10 s when USB-powered), so
370-
## throttle polling toward its update cadence — e.g. 10 (USB) up to 120
371-
## (battery-only) — instead of hitting the box every second.
369+
## IMPORTANT: power the read head over USB. On battery it only refreshes every
370+
## ~2 min — too slow for AstraMeter's ~1 s control loop, so battery balancing
371+
## won't work. USB raises the update rate to ~10 s; this throttle matches that
372+
## so AstraMeter doesn't hammer the box between fresh readings.
372373
# THROTTLE_INTERVAL = 10
373374

374375
# [SCRIPT]

docs/powermeters.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@ SERIAL_NUMBER = 0
417417

418418
Reads grid power from an [AVM FRITZ!Smart Energy 250](https://fritz.com/en/products/fritz-smart-energy-250-20003088) smart-meter read head. The read head pairs with a FRITZ!Box over DECT and clips onto a digital electricity meter; AstraMeter polls the FRITZ!Box's [AHA-HTTP-Interface](https://fritz.com/fileadmin/user_upload/Global/Service/Schnittstellen/AHA-HTTP-Interface.pdf) (`getdevicelistinfos`) for the current reading.
419419

420+
> **⚠️ Power the read head over USB.** On battery the read head only refreshes its reading roughly **every 2 minutes** — far too slow for AstraMeter's ~1 s control loop, so battery balancing **will not work** (the batteries would be steered from a reading that's minutes stale). Connect the read head to USB power, which raises the update rate to ~10 s and makes it usable. Even at 10 s it's on the slow side; a meter that updates every second (e.g. SML/P1, Shelly, SMA) gives noticeably tighter control.
421+
420422
```ini
421423
[FRITZ]
422424
HOST = fritz.box
@@ -427,15 +429,16 @@ AIN = 12345 0123456
427429
# HTTPS = False
428430
# VERIFY_SSL = True
429431
# TIMEOUT = 10.0
430-
# The read head updates every ~2 min on battery, so don't poll faster than that
431-
THROTTLE_INTERVAL = 2
432+
# Power the read head via USB: on battery it only updates ~every 2 min, too slow
433+
# for control. USB raises that to ~10 s, which this throttle matches.
434+
THROTTLE_INTERVAL = 10
432435
```
433436

434437
**Authentication.** Create a FRITZ!Box user with the **Smart Home** permission under *Home Network → FRITZ!Box Users* and put its name/password in `USER`/`PASSWORD`. AstraMeter logs in through `login_sid.lua` (supporting both the PBKDF2 and legacy MD5 challenge) and reuses the session, re-authenticating automatically if the box expires it.
435438

436439
**AIN.** Find the AIN under *Home Network → SmartHome* (open the device's detail/edit view). The read head exposes two sub-units under that base AIN: `-1` (*Strombezug* / grid import) and `-2` (*Einspeisung* / feed-in). Both report the **signed** instantaneous power (positive = import, negative = feed-in), so AstraMeter reads the `-1` branch as net grid power and appends `-1` automatically when no suffix is given. Spaces in the AIN are optional.
437440

438-
**Update rate.** The read head reports about every 2 minutes on battery, speeding up to ~10 s when powered over USB. Set `THROTTLE_INTERVAL` so AstraMeter doesn't poll the box faster than it gets fresh data.
441+
**Update rate.** USB power is effectively required (see the warning above): the ~2 min battery cadence is too slow for battery control, while USB raises it to ~10 s. `THROTTLE_INTERVAL = 10` then matches that USB cadence so AstraMeter doesn't hammer the box between fresh readings.
439442

440443
## Script
441444

web/ts/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ export const POWERMETERS: Powermeter[] = [
623623
id: "fritz",
624624
label: "FRITZ!Smart Energy 250",
625625
section: "FRITZ",
626-
blurb: "An AVM FRITZ!Smart Energy 250 meter read head, via the FRITZ!Box AHA-HTTP-Interface.",
626+
blurb: "An AVM FRITZ!Smart Energy 250 meter read head, via the FRITZ!Box AHA-HTTP-Interface. Power it over USB — on battery it only updates every ~2 min, too slow for battery control.",
627627
docPython: "docs/powermeters.md#fritzsmart-energy-250",
628628
fields: [
629629
{ key: "HOST", label: "FRITZ!Box host", type: "text", default: "fritz.box", placeholder: "fritz.box", required: true, help: "The FRITZ!Box hostname or IP the read head is paired with." },

0 commit comments

Comments
 (0)