Welcome! This simple project is a great way to start learning the basics of Arduino, MQTT, wifi communication and management, soldering and 3d design.
- ESP8266 based development borad
- Wemos D1 mini (recommended)
- NodeMCU v2/v3
- BME280 temperaturen humidity and pressure sensor
- A 0,96" OLED screen
- 3x7 cm protoboard
- Download all of the libaries and insert them into your IDE
- Open the temphum.ino file and upload it into the board
- Set up the board connection like shown below
- Connect to the generated hotspot
- Configure Wifi details and MQTT info using the web interface
- Done!
I recommend using the mosquito broker you can install using Hass.io use the following JSON and start it up (Please change the username and password)
logins:
- username: sensor1
password: CHNAGEME1
anonymous: false
customize:
active: false
folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false
Then add your topics to the config.yaml using the following example:
sensor temp1:
platform: mqtt
unit_of_measurement: 'ºC'
state_topic: "room/myroom/sensor/temp"
name: "Temperatura"
icon: mdi:home-thermometer
sensor hum1:
platform: mqtt
unit_of_measurement: '%'
state_topic: "rooms/myroom/sensor/hum"
name: "Humedad"
icon: mdi:water
Great job! There is only one more step! Let's make it show it to us on the front page by adding it via Lovelace UI. I hope you already know how to do it. Right? no? fine... I'll put up an example soonTM :)