- Fixed EMA smoother slowing down across zero-crossings when
SMOOTH_TARGET_ALPHAwas configured above 0.5: the sign-flip "catchup" branch capped the effective alpha at 0.5, which actually reduced responsiveness for users who picked a larger alpha (e.g. 1.0 for near-instant tracking). The catchup boost now never drops below the configured alpha (#371).
- Fixed false "Home Assistant sensor is stale" errors for sensors that update infrequently or push only on value changes — including constant readings (e.g. solar production at night) and push-based integrations. The Home Assistant powermeter now treats a sensor as stale only when Home Assistant itself marks it
unavailable/unknownor the websocket connection is lost (#363).
- Rebranded project from "B2500 Meter" to "AstraMeter" (formerly b2500-meter). Package renamed to
astrameter, CLI commands are nowastrameterandastra-sim. Docker image moved fromghcr.io/tomquist/b2500-metertoghcr.io/tomquist/astrameter(the legacyghcr.io/tomquist/b2500-meterimage is still published in parallel for backward compatibility). Home Assistant users must update their app repository URL tohttps://github.com/tomquist/astrameter#main(#302, #304). - Removed CT001 emulation (Python
ct001package and thenodered.jsonflow). Usect002/ct003for multiple storage devices, or a ShellyDEVICE_TYPEotherwise. Drop obsolete[GENERAL]optionsDISABLE_SUM_PHASES,DISABLE_ABSOLUTE_VALUES, andPOLL_INTERVALif present. The Home Assistant app no longer offerspoll_intervalordisable_absolute_values; remove those keys from saved app configuration if validation fails after upgrade (#258). - Changed Shelly emulator default: event-driven powermeters (MQTT, SMA Speedwire, HomeWizard WS, HA WS) now block each Shelly response for up to 2 s waiting for a fresh push sample, then fall back to the cached value on timeout. Set
WAIT_FOR_NEXT_MESSAGE = Falseunder[GENERAL]or the powermeter section to restore the previous immediate-read behavior (#322, #330). - Changed API: the
Powermeterbase class is now async. Out-of-tree powermeter subclasses must implementasync get_powermeter_watts(); the synchronous legacy interface has been removed (#273, #274, #275, #276, #277, #278, #279, #282). - Removed 32-bit ARM (
armhf/armv7) Home Assistant images. Installations must use a 64-bit Home Assistant OS or supervisor environment (amd64oraarch64), consistent with Home Assistant dropping 32-bit support. - Removed from-source / contributor workflow: Pipenv,
Pipfile, and runningpython main.pyfrom the repo root are gone — use uv and theastrametercommand (oruv run astrameter) per CONTRIBUTING.md.
- Added CT002/CT003 emulation for steering multiple Marstek storage devices over the Marstek CT UDP protocol. Active control is on by default (
ACTIVE_CONTROL = True): the emulator smooths the grid reading, splits the target across batteries with a 15 WBALANCE_DEADBAND, and runs time-weighted saturation detection with handoff — setACTIVE_CONTROL = Falsefor relay mode (raw meter values forwarded, batteries decide). Includes fair-share balancing (FAIR_DISTRIBUTION,BALANCE_GAIN), manual target override and forced rotation via MQTT, ARP-based consumer discovery, and an opt-in efficiency mode that concentrates power on fewer batteries at low demand (MIN_EFFICIENT_POWER,EFFICIENCY_ROTATION_INTERVAL, probe-based fades,SATURATION_GRACE_SECONDS) (#283, #284, #287, #289, #291, #293, #294, #296, #298, #301, #303, #310, #311, #320, #321). - Added MQTT Insights: optional
[MQTT_INSIGHTS]section publishes internal state (grid power, targets, saturation, consumer topology, EMA poll interval) to MQTT with Home Assistant Device Discovery; per-consumer active/pause + manual target control; Shelly battery offline availability; auto-configured in the HA app when Mosquitto is installed (#292, #294, #297, #300, #306). - Added optional Marstek MQTT responder alongside MQTT Insights (HA is the main use case): when
[MARSTEK]is configured, AstraMeter can answer CT002/CT003 poll traffic on the same broker using the managed cloud MAC; with hame-relay ≥ 1.3.5 on that broker the Marstek mobile app shows live readings (see README, MQTT Insights). On by default; setMARSTEK_MQTT_ENABLED = falsein[MQTT_INSIGHTS]to disable only this add-on. - Added opt-in web-based configuration editor (
WEB_CONFIG_ENABLED = Truein[GENERAL]) accessible athttp://<host>:52500/config; supports editing all config sections and keys with type-appropriate inputs, comment preservation, and a Save & Restart button (#319). - Added HomeWizard P1 powermeter via the device WebSocket API, with optional
VERIFY_SSL(#231, #254). - Added Enphase IQ Gateway (Envoy) powermeter via the local HTTPS
production.jsonAPI, with optional Enlighten-cloud token acquisition and automatic refresh on 401, and auto-detection of single- vs three-phase readings (#245). - Added SMA Energy Meter / Sunny Home Manager support via Speedwire multicast with device auto-detection and per-phase readings (#252).
- Added SML powermeter for smart meters over a local serial port (IR head), with optional per-phase OBIS overrides (#229).
- Added multi-phase support to the MQTT powermeter via
TOPICS/JSON_PATHS(#280, issue #136). - Added multi-phase support to the Tasmota powermeter via comma-separated
JSON_POWER_MQTT_LABEL(#281). - Added multi-phase support to the VZLogger powermeter via comma-separated
UUIDvalues; phases are fetched in parallel (#332). - Added PID controller support for any powermeter via
PID_KP,PID_KI,PID_KD,PID_OUTPUT_MAX, andPID_MODE(global or per-section), with built-in anti-windup (#315). - Added per-powermeter EMA smoothing and deadband wrappers —
SMOOTH_TARGET_ALPHA,MAX_SMOOTH_STEP,DEADBAND(global[GENERAL]fallback with per-section override; off by default) (#331). - Added optional Hampel outlier filter for noisy powermeter sources (MQTT / HTTP / WiFi glitches):
HAMPEL_WINDOW,HAMPEL_N_SIGMA,HAMPEL_MIN_THRESHOLD(global[GENERAL]fallback with per-section override; off by default; sits in the wrapper chain after throttling and before EMA smoothing) (#334). - Added
POWER_OFFSETandPOWER_MULTIPLIERtransforms for any powermeter, including per-phase calibration, sign flipping, and phase nulling; the Home Assistant app exposes both as optional advanced fields (#250, #308). - Added
DEDUPE_TIME_WINDOWto the Shelly emulator to drop burst-repeat requests from the same battery IP; the value can also be set under[GENERAL]to apply regardless of which device type is emulated (#333). - Added MQTT broker configuration via a single
BROKER_URI(auth and TLS schemes) alongside the existing host/port/user/pass keys (#309). - Added optional Marstek cloud auto-registration for managed fake CT devices at startup under
[MARSTEK](#237). - Added
LOG_LEVELenvironment variable support for Docker and CLI runs (#174). - Added timestamps to application log lines (#260).
- Added
GIT_COMMIT_SHAembedding in CI-built container images; startup logs the git commit and/healthJSON includesgit_commitwhen set (#273). - Added
exc_infoto logger warnings for better debugging (#307).
- Switched the Home Assistant powermeter integration from REST polling to the WebSocket API (#232).
- Expanded Shelly emulation logs to report battery detection, inactivity, and reconnection events (#241).
- Reduced throttling output noise by replacing unconditional
printcalls inThrottledPowermeterwith structured logging (logger.debugfor routine wait/fetch/cache messages; failures remain at error level) (#251). - Improved Shelly UDP server robustness by adding socket timeouts to avoid hangs during shutdown and testing (#233).
- Upgraded
JSON_PATHSparsing in the JSON HTTP and MQTT powermeters to thejsonpath-ngextended syntax, so values that arrive with a unit suffix (e.g. openHABNumber:Powerreturning"331.74 W") can be sanitized inside the path with`split(...)`or`sub(/regex/, replacement)`instead of failing the float conversion (#349).
- Fixed Modbus
UNIT_IDhandling and clarified Home Assistant entity ID configuration in the docs (#191, #195).
- Added support for Modbus holding registers through new
REGISTER_TYPEconfiguration option (#173) - Improved Shelly emulator with threaded UDP handling for better performance under concurrent requests when throttle interval is used (#168)
- Enhanced TQ Energy Manager with signed power calculation using separate import/export OBIS codes (#153)
- Fixed powermeter test results to log at info level instead of debug level (#165)
- Added support for TQ Energy Manager devices through new TQ EM powermeter integration
- Added generic JSON HTTP powermeter integration with JSONPath support for flexible data extraction
- Fixed health check service port from 8124 to 52500
- Modbus: Support powermeters spanning multiple registers
- Modbus: Allow changing endianess
- Add dedicated health service module with endpoints on port 52500
- Implement multi-layer auto-restart: supervisor watchdog, startup retries, health checks
- Added throttling of powermeter readings for slow data sources to prevent oscillation.
- Added support for Shelly Pro 3EM on port 2220 (B2500 firmware version >=226)
- Added backward compatibility for Shelly Pro 3EM devices through shellypro3em_old (port 1010) and shellypro3em_new (port 2220) device types
- Support for three-phase power monitoring in Home Assistant integration
- Support for multiple powermeters (not through the HomeAssistant addon at this point)
- Allow providing custom config file in HA Addon
- Initial release of B2500 Meter
- Support for emulating a CT001, Shelly Pro 3EM, Shelly EM gen3 and Shelly Pro EM50 for Marstek/Hame storages
- Support for various power meter integrations:
- Shelly devices (1PM, Plus1PM, EM, 3EM, 3EMPro)
- Tasmota devices
- Home Assistant
- MQTT
- Modbus
- ESPHome
- VZLogger
- AMIS Reader
- IoBroker
- Emlog
- Shrdzm
- Script execution