Closed ruben-mar closed 1 year ago
I can't replicate this. I use mpremote
rather than Thonny, but I don't think this is a Thonny issue. Here is my traceback
MPY: soft reboot
MicroPython v1.20.0 on 2023-04-26; Raspberry Pi Pico W with RP2040
Type "help()" for more information.
>>> import range_ex
Checking WiFi integrity.
Got reliable connection
Connecting to broker.
Connected to broker.
We are connected to broker.
publish 0
The line that is failing is
self._addr = socket.getaddrinfo(self.server, self.port)[0][-1]
Are you sure your server address is correct? You might like to use ping
to check this.
Now, this is embarrassing, I assigned the port as a string. I am not excused by having declared the IP address of the server as a string
"server": '192.168.1.139',
followed by the port also as a string
"port": '1883',
because the default value of port is an integer 0 all right
"port": 0,
Both example scripts work now. Apologies and thank you.
Fresh new pull today, with mqtt_local.py configured in a Pico, when running the Example Usage code I get:
When running range.py the console output is: