homieiot / homie-esp8266

💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
http://homieiot.github.io/homie-esp8266
MIT License
1.36k stars 308 forks source link

Need to include another library #170

Closed violachie closed 7 years ago

violachie commented 7 years ago

Hi,

There are two questions i would like to ask:

  1. When i write the minimum code (only include Homie.h), i always have error message that i have to include another libraries (ESP8266WiFi.h, PubSubClient.h, etc). After i include it all, there are no error message (I use Arduino IDE). Do i miss something during my installation step?
  2. When i configure the homie mqtt, when enter the mqtt credentials, and click next button. It is still in mqtt credentials page instead of to the next page, like it has no respond.

I am new to this iot world, sorry if the question is so trivial. Thanks.

benzino77 commented 7 years ago

Did you install homie in library folder in sketch folder location? Skech folder location can be obtained from File->Preferences. There should be subfolder libraries and there should be homie located (and other needed libraries).

violachie commented 7 years ago

I find the homie libraries in folder Arduino/Portable/sketchbook/libraries/homie-esp8266-1.5.0 Same place with ArduinoJson, PubSubClient, etc (all the dependencies for homie mqtt), but i still need to include it in the code.

benzino77 commented 7 years ago

But all dependecies are in Arduino/Portable/sketchbook/libraries and not in Arduino/Portable/sketchbook/libraries/homie-esp8266-1.5.0 ?

violachie commented 7 years ago

The other dependencies library is in Arduino/Portable/sketchbook/libraries. So homie-esp8266-1.5.0 and PubSubClient, etc are in the same folder, Which is automatically located there by my Arduino IDE when I add .zip or via "manage libraries" menu.

marvinroger commented 7 years ago

What's your Arduino version?

violachie commented 7 years ago

I use wemos d1 mini

marvinroger commented 7 years ago

I mean the version of your Arduino IDE.

violachie commented 7 years ago

Oh sorry, now i am far from my computer. But I downloaded it about two months ago from Arduino website. I will confirm the version of my IDE as soon as I get home.

violachie commented 7 years ago

Hi @marvinroger

My arduino IDE version: 1.6.5

This is the folder where homie mqtt libraries are located img_20161014_091817

And this is the my "minimal" code for homie mqtt to run

`#include

include

include

include

include

include

include

include

include

include

include

void setup() { Homie.setup(); }

void loop() { Homie.loop(); }`

marvinroger commented 7 years ago

This is indeed not written in the getting started guide, but library to library dependencies was added in Arduino 1.6.6. Update your IDE to the latest version and you'll see it works. The 1.6.5 is a year old.

violachie commented 7 years ago

Oh, i see. Now i wonder where did i download arduino IDE from. Thanks for the answer, i will download the latest version.