Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

feat(cli): Add control commands (set temperature, on/off, speed)

未关闭
#145 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@tonyfruzza 已经在做这个了。

开始于 2026年5月19日。

  • #146 来自 @tonyfruzza —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
python
领域
cli

调研方向

从 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 82 to 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 OmniLogic and calls refresh() in the entrypoint, so adding a set command group would follow the same pattern as the existing get group.
  • Equipment lookup by bow_id/system_id can use omni.backyard.bow and 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 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cryptk/python-omnilogic-local 的其他 Issue

查看 cryptk/python-omnilogic-local 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。