Skip to content
Gerry33 edited this page Aug 17, 2017 · 12 revisions

Welcome to the ESP8266 Temperature Humidity Sensor - wiki!

Motivation

I was fed up with the simple thermo sensors from the discounters which constantly crash after one year and have no way to get their data out of it.

Idea was to integrate into OpeHAB2 using MQTT as transport protocol.

Hardware

It's up to you to build a hardware on your own.

Hardware:

ESP8266 : ESP07/12 or Mini.

Display: SSD 6630 compatible display

Sensor : one of SI7021 | DHT | DS18B20

Power supply 3V

Total HW costs : < 10 € Benefit: priceless ;-)

Here is my decent implementation:

My Sample

MQTT datapoints

Sensor data

 <mqttID>/temp/DHT|SI|DS         

where mqttID is set by WEB GUI

payload: temperature;humidity e.g. 21.4;45

'humidity' only if supported by sensor. Otherwise empty string.

WEB configuration GUI

Just enter IP. reported in display or announced via MQTT and SYSLOG

Compile

I'm using ECLIPSE SLOEBER IDE which runs perfectly. Posting my .project would make no sense as libraries location is alwys diffeerent.

External libs

Download, add the libs noted in the header.

Cudos go to the creators of all the libs.

Changes needed to the source code for your own adaptations

  • SSID, WIFI Password
  • optional: NTP server adresse (currently: 'pool.ntp.org')
  • SYSLOG Server address. Should be the same as the MQTT server, but it does currently not work.

Change:

Wifi_onConnectedGotIP(WiFiEventStationModeGotIP ipInfo) {
  IPAddress syslogServer ...

All other parameter can be entered via WEB GUI to be accessed by just entering the IP.

Over- the- air update

enter /update

and select the bin file of the project.

Known problems: Using too many PSTR macros to put strings into flash memory, results in crashes on calling the web-GUI. Therefore PSTRs are used rarely.