Telemetry parse fails: TelemetryColorLogicLight.special_effect required but MSP R4.4 omits @specialEffect
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 88/100
Rechercherichtung
Beginne in models/telemetry.py bei TelemetryColorLogicLight und verfolge Telemetry.load_xml durch Telemetry.model_validate(). Reproduziere das Parsen mit dem gezeigten ColorLogic-Light-Element ohne @specialEffect; fertig ist es, wenn die Telemetrie ohne dieses Attribut erfolgreich validiert wird und dabei das standardmäßige Verhalten ohne Effekt erhalten bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
Telemetry.load_xml() raises OmniParsingError for a controller whose <ColorLogic-Light> telemetry element does not include a specialEffect attribute. TelemetryColorLogicLight.special_effect is declared as a required field with no default, so Telemetry.model_validate() fails with a pydantic missing error and the whole telemetry fetch dies. For the haomnilogic-local HA integration this makes setup impossible — the config flow is permanently stuck on cannot_connect.
Environment
python-omnilogic-local5.0.2 (also present onmain—models/telemetry.pyline ~269)- Hayward OmniLogic, MSP firmware R4.4
- Equipment: 1 variable-speed filter pump, 1 ColorLogic light, 1 valve-actuator water feature, 1 HydraPure, unconfigured CSAD slot, virtual heater (no physical heater)
- Consumed via
cryptk/haomnilogic-local2.0.2 on Home Assistant
Actual telemetry element from this controller
<ColorLogic-Light systemId="4" lightState="0" currentShow="11" speed="4" brightness="4" />
No specialEffect attribute. (Backyard, BodyOfWater, Filter, VirtualHeater, Relay, CSAD, Group all parse fine — this is the only failure, so CSAD empty ph/orp is not currently an issue for this system.)
Traceback
File ".../pyomnilogic_local/models/telemetry.py", line 559, in load_xml
instance = Telemetry.model_validate(data["STATUS"])
pydantic_core._pydantic_core.ValidationError: 1 validation error for Telemetry
ColorLogic-Light.0.@specialEffect
Field required [type=missing, input_value={'@systemId': 4, '@lightState': 0, '@currentShow': 11, '@speed': 4, '@brightness': 4}, input_type=dict]
The above exception was the direct cause of the following exception:
...
pyomnilogic_local.models.exceptions.OmniParsingError: Failed to parse Telemetry: 1 validation error for Telemetry
ColorLogic-Light.0.@specialEffect
Field required [type=missing, ...]
Suggested fix
special_effect isn't required for correct operation (the HA light entity doesn't read it). Give it a default:
# pyomnilogic_local/models/telemetry.py (class TelemetryColorLogicLight)
special_effect: ColorLogicSpecialEffect = Field(
alias="@specialEffect", default=ColorLogicSpecialEffect.NO_EFFECT
)
Older / simple-mode ColorLogic configs and some MSP firmwares just don't send the attribute. A quick audit of the other Telemetry* models for required fields that older firmware may omit (e.g. @lastSpeed, CSAD @ph/@orp when empty-string) would likely prevent similar reports.
Workaround (in case it helps others)
Monkey-patched Telemetry.load_xml in the HA custom component's __init__.py to catch the specialEffect OmniParsingError, inject specialEffect="0" into <ColorLogic-Light .../>, and re-parse. Integration then sets up and all entities (light, valve, pump speed/presets, HydraPure, schedules, sensors) work.
- Vorherrschende Sprache
- Python
- Sterne
- 10
- Forks
- 13
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cryptk/python-omnilogic-local
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
cryptk/python-omnilogic-local#156 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
cryptk/python-omnilogic-local#150 ·
-
feat(cli): Add control commands (set temperature, on/off, speed)Evtl. vergeben @tonyfruzza hat das vor 163 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
cryptk/python-omnilogic-local#145 · 1 Kommentar ·
-
Pumps can be VSPs as well as featuresEvtl. vergeben @tonyfruzza hat das vor 162 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
cryptk/python-omnilogic-local#99 · 8 Kommentare ·
Alle Issues in cryptk/python-omnilogic-local
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistenciesEvtl. vergeben @github-actions hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
admission-deferred priority: medium status: ready work-class: scoped
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
melodic-software/claude-code-plugins#10887 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
backend bug good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
PoCInnovation/Distribox#255 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
google/langextract#598 ·
Maintainer antworten meist innerhalb von 1 Tag