Sonoff firmware DS18B20 sensor installation

Table of contents


Installing DS18B20 temperature sensor

Required:

  • DS18B20 sensor
  • 4,7k resistor mounted between 3.3V and data line

I’m suggesting not to install sensor inside the Sonoff switch case because electronics inside generates heat which would cause wrong temperature values if you wanted actually to measure outside temperature.

How to connect sensor

  • Red: +3.3V line
  • Yellow: data line
  • Blue: Ground

Configuration

In order to enable temperature sensor in your Sonoff switch you have to turn it on in configuration.

Steps:

  • select checkbox: is present
  • additionally you can correct temperature by value specified in the configuration panel. It’s useful if your sensor was not well calibrated or you wanted to calculate temperature to another units eg Fahrenheit (by default it Celsius)
  • you can define the frequency how often temperature should be read by the sensor. Be aware that only changes are published to MQTT Broker.

 

> Go to information about date exchanging with the switch