Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oceanBT/7e16368faad90a72cf6a880b89b1ec44 to your computer and use it in GitHub Desktop.
Save oceanBT/7e16368faad90a72cf6a880b89b1ec44 to your computer and use it in GitHub Desktop.
tasmota installation on nodeMCU or sonoff (esp8266) and configure TH11 or TH22 (AM2302) Sensor
  1. connect hardware (USB, if necessary CH340G)
  2. flash tasmota firmware (install tasmotize via pip)
  3. configure (tasmotize - config: wifi + mqtt(ip and port of mqtt server))
  4. open webinterface of tasmota (IP see router)
  5. cofigure - cofigure module - template + activate: 6 . open web interface of tasmota
  6. if it is a ...
    1. ... a hardware where the sensors/switches/... are already hardwired to the esp8266: cofiguration -> cofigure module -> module type: select the hardware -> save.
    2. ... nodeMCU or similar board, where the pins of the 8266 can be used freely: cofiguration -> cofigure template -> name: any hardware name (e.g. "NodeMCU LoLin V3"), Based on: generic -> save -> configure module -> module type: select the just created name -> save
  7. in the modules now select the GPIO assignment, at ...
    1. ... sonoff th: select here at GPIO14 the sensor type SI7021 (at least it was with me) -> save
    2. ....nodeMCU + TH22-Sensor: at "D2 GPIO4" select the sensor type "AM2301", if the data pin of the TH22-Sensor is connected to port D2 of the nodeMCU (and therefore connected to GPIO4 of the ESP) -> save

Connect DHT22 / AM2302 temperature and humidity sensor on esp 8266 (nodemcu):

  • pin1: +3v
  • pin2: D2 (or other free D-port on the nodemcu)
  • pin3: empty
  • pin4: grd

Optional 10k Ohm resistor between pin 1 and pin 2 of the sensor (probably to smooth the signal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment