feat(cli): Add control commands (set temperature, on/off, speed)
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu tại entrypoint của CLI, nơi OmniLogic được khởi tạo và refresh() được gọi, rồi so sánh nhóm set được đề xuất với nhóm get hiện có. Theo dõi các primitive của thư viện được liệt kê và việc tra cứu thiết bị thông qua omni.backyard.bow. Hoàn tất khi các lệnh heater, solar, equipment, speed và light được đề xuất gọi các control tương ứng với các đối số được ghi trong tài liệu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The CLI currently only exposes read-only commands (get and debug subgroups). The library itself fully supports equipment control via methods like heater.set_temperature(), pump.set_speed(), light.turn_on(), etc., but there is no way to invoke these operations from the command line.
Motivation
Users who want to script pool control (e.g., cron jobs, home automation integrations, or wrapping the CLI in an HTTP API) currently have to write Python code using the library directly. Adding a set command group to the CLI would make equipment control accessible without any custom code.
Use cases
- Scripting:
omnilogic --host 192.168.1.100 set heater-temp 1 4 82to set pool heater to 82°F from a shell script - HTTP wrappers: Lightweight API services that shell out to the CLI for control commands
- Debugging/testing: Quickly toggle equipment during development without writing async Python
Proposed CLI interface
# Heater temperature control
omnilogic set heater-temp <bow_id> <equip_id> <temperature>
omnilogic set solar-temp <bow_id> <equip_id> <temperature>
# Equipment on/off
omnilogic set equipment-on <bow_id> <equip_id>
omnilogic set equipment-off <bow_id> <equip_id>
# Pump/filter speed
omnilogic set speed <bow_id> <equip_id> <percent>
# Light control
omnilogic set light-show <bow_id> <equip_id> <show_id> [--brightness N] [--speed N]
Implementation notes
- The high-level library already has all the primitives:
heater.set_temperature(),pump.set_speed(),light.turn_on(),light.set_show(), etc. - The CLI already instantiates
OmniLogicand callsrefresh()in the entrypoint, so adding asetcommand group would follow the same pattern as the existinggetgroup. - Equipment lookup by
bow_id/system_idcan useomni.backyard.bowand iterate equipment collections.
Context
I ran into this gap while building a containerized HTTP API wrapper for my OmniLogic system. I ended up importing pyomnilogic_local directly to get temperature control since the CLI had no way to set heater temperatures. Happy to contribute a PR if this aligns with the project direction.
- Ngôn ngữ chính
- Python
- Star
- 10
- Fork
- 13
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 ·
-
Pumps can be VSPs as well as featuresCó thể đã có người làm @tonyfruzza đã nhận 144 ngày trước. Đ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ự
-
area:space-accuracy good first issue track:data
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Sara-Managed-Projects/space-radar#904 ·
Maintainer thường phản hồi trong vòng 1 ngày