Re: MQTT With Local Server
by matterantimatter on Fri Dec 25, 2020 8:32 am
I'm having a similar problem. I'm trying to connect to a local MQTT server that has no hostname (just port and IP address). When I store the IP address in the secrets.py broker entry, as a string, it appears that the esp32spi's socket module is trying to interpret it as name (it dies on a call to get_host_by_name()).
I've tried placing a tuple of the IP address in the secrets file, and embedding it directly in the code, and that doesn't work either.
I can call the esp.ping() method by IP address, but something in the call stack of the MQTT.connect() method is trying to look up the IP address by name.