feat(cli): Add control commands (set temperature, on/off, speed)
评估
调研方向
从 OmniLogic 被实例化并调用 refresh() 的 CLI 入口点开始,将提议的 set 组与现有的 get 组进行比较。通过 omni.backyard.bow 跟踪列出的库原语和设备查找。完成的标准是:提议的加热器、太阳能、设备、速度和灯光命令使用文档中说明的参数调用相应的控制项。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 10
- 派生
- 13
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cryptk/python-omnilogic-local 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
cryptk/python-omnilogic-local#156 ·
-
难度 5/5 一周以上 新手友好度 35/100
cryptk/python-omnilogic-local#150 ·
-
Pumps can be VSPs as well as features可能已有人在做 @tonyfruzza 于 146 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 52/100
cryptk/python-omnilogic-local#99 · 8 条评论 ·
查看 cryptk/python-omnilogic-local 的全部 Issue
相似的 Issue
-
bug difficulty:2 good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
MakazhanAlpamys/Soup#1865 ·
维护者通常 1 天内回复
-
area: agents area: docs good first issue
难度 2/5 1-3 小时 新手友好度 88/100
openapi/gknowledge#23 ·
-
useless-suppression reported for deprecated-* messages that should be exempt可能已有人在做 @adityasinha-ghub 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
pylint-dev/pylint#11656 ·
维护者通常 1 天内回复
-
area:provisioning effort:S priority:P2 provider:local-libvirt risk:daytime-only status:in-progress type:bug
难度 2/5 1-3 小时 新手友好度 78/100
randomparity/kdive#3203 · 2 条评论 ·
维护者通常 1 天内回复
-
get() for StrEnum可能已有人在做 @FeJo5952 今天认领。 未关闭good first issue
难度 2/5 1-3 小时 新手友好度 72/100
collective/icalendar#1921 · 1 条评论 ·
维护者通常 1 天内回复