tasmota-cmd allows to execute sequence of commands on Tasmota device connected to network. With it you can automate setup of Tasmota devices.
Program reads commands from stdin, line by line. Each line should be in format
command=value
.
Most basic usage is to write sequence of commands to file:
$ cat tasmota_setup
Hostname=mydevice
# comment line (like this) and empty lines are ignored
FriendlyName=My First Device
and use that file as an input:
$ ./tasmota-cmd 192.168.1.101 <tasmota_setup
> GET http://192.168.1.101/cm?cmnd=Hostname%20mydevice
< {"Hostname":"mydevice"}
> GET http://192.168.1.101/cm?cmnd=FriendlyName%20My+first+device
< {"FriendlyName1":"My First Device"}
Also it can be used in interactive mode, where user enter one command at once.
To exit that mode user need to write EOF character (press Ctrl+D
). Example:
$ ./tasmota-cmd mydevice.lan
Status=8
> GET http://mydevice.lan/cm?cmnd=Status%208
< {"StatusSNS":{"Time":"1970-01-01T00:01:13"}}
The instruction is for Linux. On different OSes, you may need to use different commands
-
Download latest stable release from GitHub:
wget https://github.com/macie/tasmota-cmd/releases/latest/download/tasmota-cmd
-
(OPTIONAL) Verify downloading:
wget https://github.com/macie/tasmota-cmd/releases/latest/download/tasmota-cmd.sha256sum sha256sum -c tasmota-cmd.sha256sum
-
Set execute permission:
chmod +x tasmota-cmd
-
Move to directory from
PATH
environment variable:mv tasmota-cmd /usr/local/bin/
git clone [email protected]:macie/tasmota-cmd.git
cd tasmota-cmd
make install
Use make
(GNU or BSD):
make
- run checksmake test
- run testmake check
- perform static code analysismake install
- install in/usr/local/bin
make dist
- prepare for distributingmake clean
- remove distributed artifactsmake cli-release
- tag latest commit as a new releasemake info
- print system info (useful for debugging).
tasmota-cmd
is versioned according to the scheme YY.0M.0D
(calendar versioning). Releases are tagged in Git.