Tasmota
by @wmantly
Discover, monitor, and control Tasmota smart home devices on local networks. Use when tasks involve finding Tasmota devices via network scanning, checking device status and power states, controlling devices (on-off, brightness, color), managing device inventory, or any other Tasmota management operations on ESP8266 or ESP32 devices running Tasmota firmware.
clawhub install tasmota-skillπ About This Skill
name: tasmota description: Discover, monitor, and control Tasmota smart home devices on local networks. Use when tasks involve finding Tasmota devices via network scanning, checking device status and power states, controlling devices (on-off, brightness, color), managing device inventory, or any other Tasmota management operations on ESP8266 or ESP32 devices running Tasmota firmware.
Tasmota Device Management
Overview
Automated discovery and control of Tasmota-powered smart home devices (ESP8266/ESP32) on local networks. Includes network scanning, status monitoring, power control, dimming, color control, and inventory management.
Quick Start
Scan network for Tasmota devices:
python3 scripts/tasmota-discovery.py
Check device status:
python3 scripts/tasmota-control.py status 0
Control device:
python3 scripts/tasmota-control.py power on|off|toggle
python3 scripts/tasmota-control.py brightness 0-100
python3 scripts/tasmota-control.py color
Discovery
Network Scan
Run a full network scan to find all Tasmota devices:
python3 scripts/tasmota-discovery.py
The script:
1. Performs ping sweep to identify live hosts
2. Scans HTTP (port 80) on live hosts
3. Detects Tasmota via Server header (e.g., "Tasmota/13.1.0")
4. Confirms via JSON API (/cm?cmnd=status%200)
5. Retrieves device names, versions, and hardware
Output includes:
Identification Signals
Tasmota devices are identified by:
Tasmota/ () /cm?cmnd=status%200 returns structured statusDevice Control
Power Control
Toggle or set power state:
# Toggle
python3 scripts/tasmota-control.py power toggleOn/Off
python3 scripts/tasmota-control.py power on
python3 scripts/tasmota-control.py power off
Brightness (Dimmers)
Set brightness level (0-100):
python3 scripts/tasmota-control.py brightness 50
Works on devices with Dimmer support (check StatusSTS).
Color (RGB Lights)
Set RGB color (hex or comma-separated):
# Hex format
python3 scripts/tasmota-control.py color FF0000 # Red
python3 scripts/tasmota-control.py color 00FF00 # GreenRGB comma format
python3 scripts/tasmota-control.py color 255,0,0
Works on devices with RGB support (AiYaTo-RGBCW, etc.).
Status Queries
Device Status
Retrieve status information:
# Basic status
python3 scripts/tasmota-control.py status 0All statuses
python3 scripts/tasmota-control.py status all
Status codes:
0 = Status - Device info, friendly name, power state1 = StatusPRM - Parameters, uptime, MAC2 = StatusFWR - Firmware version, hardware3 = StatusLOG - Log settings4 = StatusNET - Network config (IP, gateway, WiFi)5 = StatusMQT - MQTT configuration9 = StatusTIM - Time, timezone, sunrise/sunsetKey Status Fields
StatusSTS (Status 0):
POWER - Current state (ON/OFF)Dimmer - Brightness level (0-100)Wifi.RSSI - Signal strengthWifi.SSId - Connected WiFi networkStatusNET:
IPAddress - Device IPHostname - mDNS hostnameMac - MAC addressBulk Operations
Get All Device Status
python3 scripts/tasmota-status.py
Iterates through inventory file and shows power state for all devices.
Managing Inventory
Devices are tracked in a CSV inventory file. Format:
IP Address,Device Name,Version,Hardware,Response Time (ms)
192.168.1.116,Office Hall Light,13.1.0,ESP8266EX,53
After discovery, save output to inventory file for batch operations.
Common Tasks
Finding Labeled Devices
# Scan and grep for specific device names
python3 scripts/tasmota-discovery.py | grep "Kitchen"
python3 scripts/tasmota-discovery.py | grep "Bulb"
Checking All Lights
# Get status of all devices
python3 scripts/tasmota-status.py
Power Cycle a Device
# Off, wait 2s, on
python3 scripts/tasmota-control.py 192.168.1.116 power off
sleep 2
python3 scripts/tasmota-control.py 192.168.1.116 power on
Tasmota API Reference
Command Format
http:///cm?cmnd=
Common Commands
| Command | Description |
|---------|-------------|
| Power | Toggle power |
| Power ON | Turn on |
| Power OFF | Turn off |
| Power TOGGLE | Toggle state |
| Status 0 | Device status |
| Status 4 | Network status |
| Dimmer <0-100> | Set brightness |
| Color | Set RGB color |
| Fade | Enable fade effects |
Troubleshooting
Device Not Found
curl http:///cm?cmnd=Status%200 Timeout Errors
Unknown Power State
Some devices (BLE gateways, sensors) don't have power control. Check capability in StatusSTS.
Network Configuration
Tasmota devices typically:
Best Practices
Resources
scripts/tasmota-discovery.py
Network scanner that finds live hosts and identifies Tasmota devices via HTTP and JSON API.scripts/tasmota-control.py
Device controller supporting power, brightness, color, and status queries via Tasmota JSON API.scripts/tasmota-status.py
Bulk status checker that queries all devices in inventory and displays power states.π‘ Examples
Scan network for Tasmota devices:
python3 scripts/tasmota-discovery.py
Check device status:
python3 scripts/tasmota-control.py status 0
Control device:
python3 scripts/tasmota-control.py power on|off|toggle
python3 scripts/tasmota-control.py brightness 0-100
python3 scripts/tasmota-control.py color