Sensor Configuration - stodev-com-br/tasmota GitHub Wiki

Read before continuing:
 - Components
 - Expanding Tasmota

A peripheral must have correctly wired power, GND and data pins to the device prior to booting in order for Tasmota to detect it and initialize it properly.

Configuration in Tasmota

Tasmota allows for easy selection of peripherals (sensors, switches, etc) and configuration to GPIO pins.

Configuration is possible in the webUI Configuration - Configure Module page: image

or by using commands: Module and GPIO, or Template.

First select desired module for the device (Wait for the restart). Depending on the type of Module, only certain GPIO pins are user configurable. Module Generic (18) has all the GPIOs configurable.

Modules shows supported modules

Assign a component to a GPIO.

  • gpio14 2 configures sensor AM2301 to GPIO14_
  • Backlog gpio14 5; gpio4 6 sets I2C SCL to GPIO14 and I2C SDA to GPIO4 Tasmota will auto-detect all connected and supported I2C devices. If you have conflicting I2C addresses see I2CDevice

Gpios All shows list of all available components by name and index

For a peripheral to show up you may need to power cycle your device instead of a soft restart.

Instead of using Module and GPIO you can define all using Template Read more...

Additional Options

Measurement Units

Temperature units can be set to Celsius or Fahrenheit with SetOption8 command.

Pressure units can be set to hPa or mmHg with SetOption24 command.

Update Interval

To change the update interval (teleperiod) of MQTT messages change the TelePeriod. Default interval is 300 seconds but can be set between 10 and 3600 seconds.
TelePeriod 10 will set the update interval to 10 seconds, so the sensor will update 6 times a minute.

Peripheral Specific

Some peripherals offer, or even require, additional commands. See Commands page for peripheral specific commands.

⚠️ **GitHub.com Fallback** ⚠️