MQTT example in doc fails
-
Noob question - when try this MQTT Example with new Wipy and latest firmware, it fails with this error
WiFi connection established >MQTT ERROR! function got multiple values for argument 'user' >ERROR! Could not connect to Pybytes! >Pybytes configuration read from /flash/pybytes_config.json >Connected to Wifi > >Traceback (most recent call last): > File "main.py", line 29, in <module> > File "/flash/lib/mqtt.py", line 28, in __init__ >OSError: [Errno 202] EAI_FAIL >Pycom MicroPython 1.20.1.r1 [v1.11-3138a13] on 2019-10-08; WiPy with ESP32 >Pybytes Version: 1.1.3 -
Hi @ShanevanJ
I recommend using latest firmware updater tool. And then..
I would try to flash the firmware with disabled Pybytes first. (unchecked Enable Pybytes checkbox)

-
@jirkakrepl Thanks - so does this mean the example mqtt.py clashes with the internal pybytes mqtt usage ?
I did get this user app working using the umqtt simple.py and robust.py libraries and apart from the occasional
mqtt: OSError(104,)errors - seems to work ok
I will test further and advise.
It may be useful to update the mqtt example from the docs as it wasted a whole day of head scratching to get around the issue?
-
I have a similar problem, what is the true mqtt library ?
I dont' kno if is MQTTLib or mqtt.
Where can i find documentation about MQTTLib?
Or how i can work with mqtt, the examples here:
https://docs.pycom.io/tutorials/all/mqtt/
Are not working
-
@nervencid I made it work using the simple mqtt library, to connect to Azure IoT Hub without using Pybytes. Have a look at this thread:
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login