Telemetry parse fails: TelemetryColorLogicLight.special_effect required but MSP R4.4 omits @specialEffect
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
Hướng nghiên cứu
Bắt đầu trong models/telemetry.py tại TelemetryColorLogicLight và theo dõi Telemetry.load_xml qua Telemetry.model_validate(). Tái hiện việc phân tích cú pháp với phần tử ColorLogic-Light được示示 và không có @specialEffect; hoàn thành khi telemetry được xác thực thành công mà không có thuộc tính đó, đồng thời giữ nguyên hành vi mặc định không có hiệu ứng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 10
- Fork
- 13
- Merge trung bình
- 5 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cryptk/python-omnilogic-local
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
cryptk/python-omnilogic-local#156 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
cryptk/python-omnilogic-local#150 ·
-
feat(cli): Add control commands (set temperature, on/off, speed)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
cryptk/python-omnilogic-local#145 · 1 bình luận ·
-
Pumps can be VSPs as well as featuresCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
cryptk/python-omnilogic-local#99 · 8 bình luận ·
Tất cả issue của cryptk/python-omnilogic-local
Issue tương tự
-
bug llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Arkansas 2025 tax is $1.70 high above $100,000 net taxable income ($3,809 + 3.9% rule)Có thể đã có người làm @PavelMakarchuk đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
PolicyEngine/policyengine-us#9828 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jellyfin/jellyfin-mpv-shim#800 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
skillfs: one malformed chat-log line aborts the entire skill-usage analysis (skill_usage_from_chat_logs.py)Có thể đã có người làm @zjncs đã nhận hôm nay. Đang mởcomponent:skillfs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
agentic-os-org/ANOLISA#6116 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
P4: low query
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
jeffknupp/association#336 ·