-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Using PubSubClient with WiFiManager #15
Comments
Hi Jan,
WiFiManager is active only during the startup phase. after it connects, you can build your app as normal. |
@lunanigra is it ok? did you get it running in the end? |
Hi! Thanks for your support. Not sure if already fixed... When I tested the WifiManager few weeks ago some Wifi networks got listed twice. Nothing serious... |
hi, no problem, have not seen that happening. if it becomes an issue please open another issue/ cheers |
Hi Tzapu, First of all, thank you for your library that gave all of us. I also can't work out pubsubclient with wifi manager. Can you give me an example how to work out with it. Below code that i gave executed but doesn't work. Any help will be greatly appreciated. `#include`` <ESP8266WiFi.h> //https://github.com/esp8266/Arduino //needed for library const char* mqtt_server = "myadress.com"; WiFiClient espClient; //needed for library void callback(char* topic, byte* payload, unsigned int length) { // Switch on the LED if an 1 was received as first character } void reconnect() { void setup() {
} void loop() { long now = millis(); } `` |
Ho tzapu. Bob |
1 similar comment
Ho tzapu. Bob |
This should work: (ref to your MQTTserver) WiFiClient wclient; |
can you share your code ?...how to get it working? |
does not work .It throws error |
Hi Neither Edit (I forgot the logs): PubSubClient client(wclient, mqttserver);
PubSubClient client(espClient);
|
Hello, can you give some hints how to use PubSubClient with your WiFiManager?
To init the PubSubClient a WiFiClient is given as parameter...
WiFiClient espClient;
PubSubClient client(espClient);
Works simple and fine. But how to retrieve a PubSubClient instance when using WiFiManager? If you recommend a different MQTT library it would be fine for me as well.
Thanks, Jan Christian
The text was updated successfully, but these errors were encountered: