Posting so I don't forget...

Posting so I don’t forget…
http://www.wemustbegeeks.com/esp8266-send-dht-temperature-humidity-mqtt-oled-display/

I get an error when compiling the example:

xxx\documents\Arduino\libraries\homie-esp8266-1.5.0\src/Homie/MqttClient.hpp:4:26: fatal error: PubSubClient.h: No such file or directory

What am I missing?

@Markus_Illenseer
“PubSubClient.h: No such file or directory”

Check your Arduino libraries. Make sure you have installed the MQTT client library called PubSubClient :slight_smile:

@Alan_Lord Well, the missing library is not mentioned on the page, though beeing very complete. Same goes for ArduinoJson, and Bounce2. Is that your page? Or how can I contact the author?

Sorry about that and thanks for pointing out that I left those steps out. I have edited the post to include those 4 additional library dependencies.

@Rich_Plakas Maybe you can also help me for the next Step: the initialization requires an account and an ID somewhere - MQTT?. I couldn’t figure out where?

I am truely impressed though, worked out of the box, once I installed the missing libs. I am amazed about how Homie and MQTT and the self-installation process work.

Is it possible to have the initialization “software” (Javascript) be loaded (side loaded) directly from the ESP?

@Markus_Illenseer are you using an MQTT broker already? If not you can set one up on a local computer. See https://mosquitto.org/download/ or alternatively you could use a cloud MQTT service like https://www.cloudmqtt.com/. You only need MQTT if you want to send the data to another MQTT enabled service which in my case was OpenHAB.

@Rich_Plakas No, I had no idea about MQTT before I tried your code :slight_smile:

Is it possible to disable the MQTT-related part in the code?

Questions on questions about a fascinating idea. May I contact you by PM?

@Markus_Illenseer If you are not using MQTT then you really do not need to use Homie. I am not sure if you can disable MQTT and you would need to check the Homie documentation. I haven’t tried it that way.

@Markus_Illenseer if you do not use Homie, you will have to add in the wifi statements to connect to your wifi in the sketch.

Actually I want to understand Home and MQTT. Will give cloudmqtt a try!

MQTT is a great way to get various IoT devices talking together. That said, here is a link to a similar Arduino Sketch that does NOT use the Homie MQTT framework: http://pastebin.com/rmnnXXB8