Both sides previous revision Previous revision Next revision | Previous revision |
temperature_humidity_and_pressure_meter_to_mqtt_bme280 [08.01.2019 00:50] – [OpenMQTTGateway] Pascal Suter | temperature_humidity_and_pressure_meter_to_mqtt_bme280 [08.01.2019 01:34] (current) – Pascal Suter |
---|
first try was with the [[https://github.com/1technophile/OpenMQTTGateway|OpenMQTTGateway]] as i had the arduino IDE ready to go and the code configured and compiled from trying to set up an [[ble_mqtt_gateway]] which sadly did not work, probably due to a DOA module. however, read that article on setting up the OpenMQTTGateway software for flashing. for the BME280 to work you need to enable the ''ZsensorBME280'' in ''User_config.h'', the rest is identical. | first try was with the [[https://github.com/1technophile/OpenMQTTGateway|OpenMQTTGateway]] as i had the arduino IDE ready to go and the code configured and compiled from trying to set up an [[ble_mqtt_gateway]] which sadly did not work, probably due to a DOA module. however, read that article on setting up the OpenMQTTGateway software for flashing. for the BME280 to work you need to enable the ''ZsensorBME280'' in ''User_config.h'', the rest is identical. |
| |
the hardware wiring by default looks like this: | the [[https://github.com/1technophile/OpenMQTTGateway/wiki/ESP8266-I2C-Modules|hardware wiring]] by default looks like this: |
^ I2C Module ^ NodeMCU / ESP8266 ^ | ^ I2C Module ^ NodeMCU / ESP8266 ^ |
| Vcc |Vu (5V) | | | Vcc | 3.3V | |
|GND | GND | | |GND | GND | |
|SCL |D1| | |SCL |D1| |
so lets try also | so lets try also |
===== Tasmota ===== | ===== Tasmota ===== |
| also check out my detailed description for the [[sonoff]] setup. basically download the latest [[https://github.com/arendst/Sonoff-Tasmota/releases|release]] and then copy the lib folder into your arduino ''sketchbook/libraries'' folder. then edit the ''my_user_config.h'' file and make sure the ''#define USE_BMP'' is enabled. also sest the ''#define MODULE'' to ''WEMOS''. as a side-note: this will be called "Generic" in the web-interface but in the source code it's still called WEMOS. |
| |
| the [[https://github.com/arendst/Sonoff-Tasmota/wiki/Wemos-D1-Mini-and-BME280-Temperature,-Humidity-and-Pressure-Sensor|hardware setup]] looks like this (note, the scl and sda lines could be changed to match OMG for example or vice versa, however, i have it on a breadbord, so i simply changed the patch wires): |
| ^ I2C Module ^ NodeMCU / ESP8266 ^ |
| | Vcc |3.3V | |
| |GND | GND | |
| |SCL |D4| |
| |SDA|D3| |
| |ADD |N/C (Not Connected| |
| |
| despite selecting the WEMOS module we still have to log into the web interface once the firmware is flashed and booted and go to ''Configuration --> configure module'' and then set ''D3 GPIO0 Button 1'' to I2C ''SDA(06)'' and ''D4 GPIO2'' to ''I2C SCL (05)''. |
| |
| now you get a new reading every 5 minutes via MQTT. if you want to change this interval you can either do this in the ''my_user_config.h'' file or via mqtt or the "console" in the web interface by publishing this mqtt topic and value: |
| tasmota/sonoff/cmd/TelePeriod 30 |
| this will set it to 30 seconds |
| |
| |