Tasmota is an open source firmware for ESP devices.
It features total local control with quick setup and updates.
The ability to control devices using MQTT, Web UI, HTTP or serial.
You can automate using timers, rules or scripts, and integrate with home automation solutions.
At Local Bytes, we have chosen Tasmota as our go-to firmware for a few main reasons:
- Devices can be controlled on their own, via the WebUI (inc. via Mobile Apps).
- Devices can be connected to multiple different smart home systems flexibly.
- It's feature rich, and very well documented!
As noted above, we have several reasons for shipping with Tasmota by default as opposed to ESPHome (another commonly used firmware). This has a few advantages over Tasmota when using Home Assistant:
- Devices on the network will become automatically discoverable
- Users can update the functionality of the devices via a declarative yaml file
- Home Assistant can talk directly to ESPHome without the need of an MQTT Broker
When using a MQTT broker, HomeAssistant must publish commands and subscribe for state changes, the Tasmota device must subscribe for commands and publish changes.
Whereas ESPHome will use a bidirectional api to talk directly to HomeAssistant.
If you're reading this, you're probably looking at one of the following devices:
To get started, you'll first need a broker. We recommend using the Mosquitto addon.
Installing this is as simple navingating
to Settings → Addons → Mosquitto
, and the clicking "Install"
We recommend enabling "Start on boot" and "Watchdog" to ensure the broker doesn't unexpectedly go down!
Once installed you'll need to add a set of credentials. You can do this by adding a person (recommended), or adding a set of credentials to the config (great for testing)!
Adding a person:
- Navigate to Configuration → People
- Click "Add User"
- Add a name (eg: Tasmota), and then select "Allow person to login"
- Add a username and password. Theese will be your
MQTT_PASSWORDin the step Connecting the Devices
Adding a credentials config:
- Navigate to Settings → Addons → Mosquitto
- Click "Configuration". If you cannot see this, you may need to enable advanced mode (Click on your name in the bottom right → Advanced Mode)
- Add the following to the "Logins" box. (Replace
tas-passwordwith credentials of your choosing)
- username: tas-user password: tas-password
Connecting Tasmota to Wi-Fi:
- Power on the device. This may be plugging it in to the wall, or turning on a light switch.
- Open the Wi-Fi settings on your Mobile Device/Computer.
- Wait until you see a Wi-Fi network that starts with tasmota, join it. Eg "tasmota-ebaec4"
- Either open a browser to 192.168.4.1, or click on the "Sign in to this network" prompt.
- You'll be presented with a list of Wi-Fi networks, select yours and type in the password.
- Take note of the IP address that you are presented with.
Your browser should automatically redirect to the devices new IP address.
Connecting Tasmota to MQTT
- Navigate to the previously presented IP Address.
- Click "Configure Other" and update the Device Name & Friendly Name 1, then click save.
We recommend using the same name value for both
- Click "Configure MQTT" and fill in the following details:
- Host - The IP address of you MQTT instance. (Starting on Tasmota 12.1.1, you can use homeassistant.local).
- Client - This must be unique for the user. The default value will work.
- User - Use the user you previously created.
- Password - Use the password you previously created.
- Click Save
Connecting Tasmota to HomeAssistant
Providing HomeAssistant is set to auto-discover (on by default), your plug/bulb should be discovered automatically.
That's all. You should now have a functioning Tasmota device
Time to get automating!