Useful Tasmota Commands: Part 1

Warning: This post is over a year old. The information may be out of date.

I’ve recently started using some Tasmota plugs for power monitoring using Home Assistant, in setting them up I found (and was shown) some useful commands!

Using commands in Tasmota allows you to do and configure a whole range of things. I shan’t cover all of them, just the ones I’m using, mostly for my own blogumentation, but if these posts help someone else, cool.

PowerOnState

So, I had these plugs. They were reporting data into MQTT (I wrote a post documenting my exploration into MQTT), awesome.

Except, they could be turned off via Home Assistant. I didn’t want them to be turned off, I got them as I was interested in power usage stats. Now, some people might say “well, just don’t turn them off then” - which is fine, but I wanted to remove the chance that they might get turned off via Home Assistant.

I posted about it on twitter and Matt Liebowitz responded with just the option!

  1. Head to the IP address of the plug in question (authenticate if you have to, mine all require a username and password to access)
  2. Click “Console”
  3. Type PowerOnState 4 and it’ll ensure that the plug can’t be toggled on or off anymore.

Even clicking “Toggle” on the main Tasmota web UI screen didn’t turn it off. Neat!

Now, it could still have a software issue and turn off (bugs are a thing after all) - but this was an extra step I wanted just in case

TelePeriod

I noticed that data was appearing in MQTT, but wasn’t updating as frequently as I’d like.

The TelePeriod command would let me set the update frequency, neat!

  1. Head to the IP address of the plug in question (authenticate if you have to, mine all require a username and password to access)
  2. Click “Console”
  3. Type TelePeriod 20 and it’ll send messages to MQTT every 20 seconds instead of the default of the default 300 seconds (every 5 minutes)