Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Commands #445

Open
BlueWings172 opened this issue Sep 7, 2021 · 2 comments
Open

CLI Commands #445

BlueWings172 opened this issue Sep 7, 2021 · 2 comments

Comments

@BlueWings172
Copy link

Hello

I'm very new to TasmoAdmin and just installed it as part of IOTstack (docker).

I was wondering if you can turn on and off devices from the Linux command line using TasmoAdmin.

If yes, where can I find a list of commands and functions that I can run from the command line?

Thanks

@mprins
Copy link

mprins commented Sep 7, 2021

I was wondering if you can turn on and off devices from the Linux command line using TasmoAdmin.

no as far as I know; ofcourse you could use curl to call out to tasmoadmin eg.

curl 'http://pi.hole:5555/index.php?doAjax' \
  -H 'Connection: keep-alive' \
  -H 'Pragma: no-cache' \
  -H 'Cache-Control: no-cache' \
  -H 'Accept: application/json, text/javascript, */*; q=0.01' \
  -H 'DNT: 1' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
  -H 'Origin: http://pi.hole:5555' \
  -H 'Referer: http://pi.hole:5555/devices' \
  -H 'Accept-Language: nl,en-GB;q=0.9,en;q=0.8' \
  -H 'Cookie: TASMO_SESSION=lq67e7ukn9ctg0o6otug506e5s; devices_show_more=0' \
  --data-raw 'id=3&cmnd=Power1%2520toggle' \
  --compressed \
  --insecure

to toggle a power button on a device, YMMV

@inverse
Copy link
Collaborator

inverse commented Mar 2, 2022

In theory we could do that by wrapping the HTTP calls as described above.

See https://tasmota.github.io/docs/Commands/#control for full list of commands.

This feels like it would be better suited for another project though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants