mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #1179] Problem connecting to pubsubclient using wifiManager.addParameter result #1007
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1007
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AlbanT on GitHub (Dec 20, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1179
Hi,
I'm using the AutoConnectWithFSParameters example and combined it with the knolleary/pubsubclient/examples/mqtt_basic/mqtt_basic.ino to use the custom_mqtt_server and custom_mqtt_port WiFiManagerParameters.
When I manually type:
It works fine.
But how do I use the parameters I've set thru the WifiManager?
I can print them and they look alright to me but the MQTT client won't connect:
The serial prints:
I'm pretty sure it is something simple but I cannot figure it out :(
@tablatronix commented on GitHub (Dec 20, 2020):
I am assuming you need to convert your ip address to ipaddress() datatype, if you are reading it from spiffs its probably a string
@AlbanT commented on GitHub (Dec 20, 2020):
I managed to get it working but I needed to use a String object.
I'm sure there is a more elegant way so if anyone has one please let me know...
Would be nice if the example (AutoConnectWithFSParameters) was updated to show the mqtt address converted to an ipaddress datatype.
@tablatronix commented on GitHub (Dec 20, 2020):
Its a standard arduino thing
@tablatronix commented on GitHub (Dec 20, 2020):
Also its already there

@AlbanT commented on GitHub (Jan 1, 2021):
Sorry I missed that one :)
It is in the other example file.