-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT - knolleary or ESP8266 library not working in same directory #16
Comments
The problem seems to revolve around my library including from WiFiClient.h, which is provided by either ESP8266WiFi or the Arduino WiFi library. This is because early in my customising of pubsubclient I didn't like that the constructor took a "Client" object from the sketch. I thought "the sketch isn't doing anything else with that object, pubsubclient can handle that itself". I didn't realise what effect this would have on compatibility. |
** API BREAKAGE ** We have to go back to passing a "Client" object to the PubSubClient constructor. I didn't like this when I originally saw it and moved the WiFiClient object into the class. But this meant that other platforms couldn't easily provide compatible objects from their own network stacks. I have no idea if this work on the Arduino Ethernet/WiFi/Yun boards because I don't have them. It compiles though. Brought to light by #16.
Is it possible to rename your library, so it can co-exist with the standard knolleary/pubsubclient? Calling this one something like esp8266_pubsubclient wuold be much better. Thanks, Ian |
+1 Il 30/giu/2015 10:52 PM, "Ian Chilton" notifications@github.com ha
|
I made changes so that it could work with any platform providing a "Client" interface (WiFiClient, EthernetClient, etc). There's nothing really ESP8266 specific that I know of, so calling it esp8266_pubsubclient would not make sense. |
Hi Imroy, Just wondered if you have got any further on getting the library working for Ethernet Arduino board and ESP2866 module ? Regards Gary |
Hi Imroy,
I am trying to use MQTT using the following:
Ethernet Arduino board or using ESP2866 module
For the past 3 years I have been using this library, https://github.com/knolleary/pubsubclient this has worked well.
I now wish to use the ESP8266 with MQTT using this library, https://github.com/Imroy/pubsubclient
Both of these have there own PubSubClient.h , so cannot be in my arduino library at the same time !
My problem is when I compile my code for Ethernet Arduino it will only compile error free using the knolleary library and the ESP8266 will only compile error free using the Imroy library.
This gives me the problem of removing one then installing the correct library every time I use ESP8266 or Ethernet Arduino code.
How can I get both to work ?
regards
Gary
The text was updated successfully, but these errors were encountered: