feat(cli): Add control commands (set temperature, on/off, speed)
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Beginne am CLI-Einstiegspunkt, an dem OmniLogic instanziiert und refresh() aufgerufen wird, und vergleiche die vorgeschlagene set-Gruppe mit der bestehenden get-Gruppe. Verfolge die aufgeführten Bibliotheksprimitive und die Gerätesuche über omni.backyard.bow. Die Aufgabe ist erledigt, wenn die vorgeschlagenen Befehle für Heizung, Solar, Geräte, Geschwindigkeit und Beleuchtung die entsprechenden Steuerelemente mit den dokumentierten Argumenten aufrufen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- 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 ·
-
Pumps can be VSPs as well as featuresEvtl. vergeben @tonyfruzza hat das vor 161 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 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
521xueweihan/HelloGitHub#4150 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
aws-samples/sample-per-model-bedrock#595 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug connectors
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 67/100
pyinfra-dev/pyinfra#2036 ·
Maintainer antworten meist innerhalb von 9 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag