AlexxIT / SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
https://github.com/AlexxIT/Blog
MIT License
2.75k stars 417 forks source link

feat: command line interface #1446

Closed teleshoes closed 4 months ago

teleshoes commented 4 months ago

this is a feature request for a CLI. ideally, sonofflan could be split into a sonoff/ewelink managing library, a command line interface, and a ha component, but just a hack-ish terminal api laid on top of the ha component would be fantastic.

e.g.:

python3 ./sonoff-lan-cmd --email jsmith@jmail.com --password p455w0rd --device-id 1001f83321 --get
python3 ./sonoff-lan-cmd --cookie-jar login-token.cookies --device-name Devicef83321 --set on
python3 ./sonoff-lan-cmd --host 192.168.11.3 --apikey SOME_UUID --mode local-only --set off

note: this is NOT about controlling sonoff devices in a terminal over the homeassistant api, which is easily achieved with curl. this is more about not having to install homeassistant at all.

AlexxIT commented 4 months ago

That's not in the plans