Skip to content

Just Question: Can I use MQTT connexion (using PubSubClient lib) #65

@AlainF-ing

Description

@AlainF-ing

Hi

Very good esp-fs-webser function with vesion 2.x.

I have used SimpleServer.ino example and try to merge it with one of my application.
I need to connect MQTT to send my measurement to Node-red.
So far my program can not connect MQTT while the myWebServer is present (no compiler error)

ESP32 core version:
esp32:esp32 3.3.4

Libraries version:
esp-fs-webserver 2.0.10
PubSubClient 2.8

From my application program:
In declaration:
WiFiClient espClient;
PubSubClient client(espClient);

In setup()
...
client.setServer(mqtt_server, 1883);
client.setCallback(callback);
..
in reconnect function:
(client.connect(clientId.c_str()))
never connect with my MQTT server

Any ideas what is wrong ?
Do you have example program with MQTT and esp-fs-webserver ?

Thanks for your help
Alain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions