PlatformIO project for Wemo D1 Mini and SHT-30 shield MQTT Temperature and Humidity logging for use with Home Assistant
-
Clone repository
-
Install Platform IO
-
Modify the definitions in main.ino to match your target environment:
#define WIFI_SSID "MyWifiAp"
#define WIFI_PASSWORD "MyPassword"
#define MQTT_ADDRESS IPAddress(192, 168, 2, 59)
#define MQTT_PORT 1883
Topics are separate for temperature and relative humidity
#define MQTT_TOPIC_TEMPERATURE "home/masterbedroom/temperature"
#define MQTT_TOPIC_HUMIDITY "home/masterbedroom/humidity"
The default publish interval is one minute
#define ONE_MINUTE 60000
- Run Platform IO build scripts:
platformio run --target upload
platformio device monitor --baud 9600