new text, images and title change pending

blakadder 2019-11-07 11:06:51 +01:00
parent d0d1bc4a23
commit 9ee05aa294
1 changed files with 29 additions and 79 deletions

@ -1,93 +1,43 @@
Pre-work: > Read before continuing:
* [Device Configuration](https://github.com/arendst/Tasmota/wiki/Initial-Configuration) >  - [Components](Components)
* [How To Connect a Sensor](https://github.com/arendst/Tasmota/wiki/Expanding-Tasmota) >  - [Expanding Tasmota](Expanding-Tasmota)
The software allows for easy configuration of sensors and devices to selected GPIO pins. Depending on the type of Template/Module, certain GPIO pins are user configurable. Sensor configuration is possible by either the WebUI or using the commands [`Template`](Commands#template), [`Module`](Commands#module) or [`GPIO`](Commands#gpio). _**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.**_
_**Note: A sensor must be connected to the device prior to booting the device 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.
Tasmota supports: Configuration is possible in the webUI **Configure - Configure Module** page
- [Single wire sensors](#single-wire-sensor)
- [Dual wire or I<sup>2</sup>C sensors](#i2c-sensor)
- [Single wire devices](#device)
or by using commands: [`Module`](Commands#module) and [`GPIO`](Commands#gpio), or [`Template`](Commands#template).
## Single wire sensor #### [`Module`](Commands#module)
The following single wire sensors are supported: First select desired module for the device (Wait for the restart). Depending on the type of [Module](Modules), only certain GPIO pins are user configurable. Module Generic (18) has all the GPIOs configurable.
- DHT11 Temperature and Humidity - ``DHT11 (1)`` in group 1
- DHT21 Temperature and Humidity - ``AM2301 (2)`` in group 1
- AM2301 Temperature and Humidity - ``AM2301 (2)`` in group 1
- DHT22 Temperature and Humidity - ``AM2301 (2)`` in group 1
- AM2302 Temperature and Humidity - ``AM2301 (2)`` in group 1
- AM2321 Temperature and Humidity - ``AM2301 (2)`` in group 1
- Itead SI7021 Temperature and Humidity - ``SI7021 (3)`` in group 1
- DS18B20 Temperature - ``DS18x20 (4)`` in group 2<br/>Enable option ``USE_DS18x20`` in ``user_config_override.h`` for multiple sensors using OneWire library
- DS18S20 Temperature - ``DS18x20 (4)`` in group 2<br/>Enable option ``USE_DS18x20`` in ``user_config_override.h`` using OneWire library
- External switch - ``Switch (9)``<BR>Use [`SwitchMode`](Commands#switchmode) to tune its behaviour
- HC-SR501 PIR Motion Detection - ``Switch (9)``<BR>Use [`SwitchMode`](Commands#switchmode) to tune its behaviour
Note: With older releases DHT22, AM20302, and AM2321 sensors operated under ``AM2302 (3)``. They now operate under ``AM2301 (2)``. If you are using a DHT22 or similar and do not see ``AM2302 (3)`` use ``AM2301 (2)``. _[`Modules`](Commands#modules) shows supported modules_
You can add a sensor using the following commands: #### [`GPIO`](Commands#gpio)
Assign a [component](Components) to a GPIO.
* [`Template`](Commands#template) - select desired template functionality for the device (Wait for the restart) - `gpio14 2` configures sensor AM2301 to GPIO14_
* [`Modules`](Commands#modules) - show supported modules - `Backlog gpio14 5; gpio4 6` sets I<sup>2</sup>C SCL to GPIO14 and I<sup>2</sup>C SDA to GPIO4
* [`Module`](Commands#module) - select desired module functionality for the device (Wait for the restart) Tasmota will auto-detect all connected and supported I<sup>2</sup>C devices. If you have conflicting I<sup>2</sup>C addresses see [I2CDevice](Commands#I2CDevice)
* [`Gpios`](Commands#gpios) - show supported sensor types. (e.g. DHT21 = AM2301)
* [`GPIO`](Commands#gpio) - show current defined sensors on supported GPIO pins or assign a GPIO function, - e.g., ``gpio14 2`` configures sensor AM2301 to GPIO14 (Wait for the restart)
For some sensors to show up you may need to cycle power to reset the device you just configured. _[`Gpios All`](Commands#gpios) shows list of all available components by name and index_
## I<sup>2</sup>C sensor **For a peripheral to show up you may need to power cycle your device instead of a soft restart.**
The following I<sup>2</sup>C sensors are supported using I<sup>2</sup>C SCL (5) and I<sup>2</sup>C SDA (6) in group 3:
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/sensors1.jpg" width="230" align="right" /> #### [`Template`](Commands#template)
Instead of using `Module` and `GPIO` you can define all using `Template` [Read more...](Templates#template-configuration-with-commands)
## Additional Options
### Measurement Units
Temperature units can be set to Celsius or Fahrenheit with [`SetOption8`](Commands#setoption8) command.
- BH1750 Ambient Light Intensity Pressure units can be set to hPa or mmHg with [`SetOption24`](Commands#setoption24) command.
- DS3231 External RTC
- BMP180 Pressure and Temperature in group 3a
- BMP280 Pressure and Temperature in group 3a
- BME280 Pressure, Temperature and Humidity in group 3a
- HTU21 Temperature and Humidity in group 3b
- SI7013 Temperature and Humidity in group 3b
- SI7020 Temperature and Humidity in group 3b
- SI7021 Temperature and Humidity in group 3b
- SHT10 Temperature and Humidity in group 3c
- SHT11 Temperature and Humidity in group 3c
- SHT15 Temperature and Humidity in group 3c
You can add I<sup>2</sup>C sensors using the following commands:
* [`Template`](Commands#template) - select desired template functionality for the device (Wait for the restart)
* [`Modules`](Commands#modules) - show supported modules
* [`Module`](Commands#module) - select desired module functionality for the device (Wait for the restart)
* [`Gpios`](Commands#gpios) - show supported sensor types. We need two pins: I<sup>2</sup>C SCL (5) and I<sup>2</sup>C SDA (6)
* [`GPIO`](Commands#gpio) - show current defined sensors on supported GPIO pins or assign a GPIO function, - e.g., ``Backlog gpio14 5; gpio4 6`` - select I<sup>2</sup>C SCL and SDA respectively (Wait for the restart)
The software will auto-detect the connected I<sup>2</sup>C devices. For some sensors to show up you may need to cycle power to reset the device just configured.
## Device
The following additional device(s) are supported:
- WS2812/WS2813 led string - ``WS2812 (7)`` in group 4<br/>Using NeoPixelBus library and external 5V power supply<BR>[LED Effects](../issues/3480#issuecomment-515042427)
- IR Remote - ``IRremote (8)`` in group 5<br/>Using IRremoteESP8266 library and additional IR led hardware as documented [here](https://github.com/altelch/SonoffIR)
You can add a device using the following commands:
* [`Template`](Commands#template) - select desired template functionality for the device (Wait for the restart)
* [`Modules`](Commands#modules) - show supported modules
* [`Module`](Commands#module) - select desired module functionality for the device (Wait for the restart)
* [`Gpios`](Commands#gpios) - show supported sensor types. We need WS2812 (7)
* [`GPIO`](Commands#gpio) - show current defined sensors on supported GPIO pins or assign a GPIO function, - e.g., ``gpio14 7`` - select WS2812 led string (Wait for the restart)
For some sensors to show up you may need to cycle power to reset the device just configured.
## Additional Configuration
### Temperature Units
The temperature units can be set to report in Celsius or Fahrenheit with the [`SetOption8`](Commands#setoption8) command:
### Update Interval ### Update Interval
To change the update interval (teleperiod) of MQTT messages change the [`TelePeriod`](Commands#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.
To change the update interval change the [`TelePeriod`](Commands#teleperiod). The default interval is 300 seconds. The interval 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](Commands#Sensor) page for peripheral specific commands.