Simple MQTT Tutorial
-
I am trying in Windows, by default http://www.hivemq.com/demos/websocket-client/
give port number 8000.If i try to change in the browser to 1883 then socket connection fails in websocket client.
-
@RSK , Pretty sure you have a port issue. 1883 should work. For some reason Hive MQ isn't accepting requests on 1883 currently. I will search for another public test broker..
-
-
What version of the micropython-umqtt.simple library are you using? I'm trying the latest 1.3.2. It doesn't have the same bug on line 57 anymore, in fact it doesn't seem to use the same timeout mechanism.
I'm not able to connect successfully to the HiveMQ public broker:
Traceback (most recent call last):
File "main.py", line 10, in <module>
File "/flash/lib/umqtt.py", line 74, in connect
OSError: [Errno 113] EHOSTUNREACHUsing:
client = MQTTClient("MQTT_lcg_Client", "broker.hivemq.com", port=1883)
client.settimeout = settimeout
client.connect()I can pub / sub using the MQTT.fx client on my laptop, and the WiPy is on the same network (I can ping and ftp to WiPy from laptop).
Any ideas?
-
I'm also using the same apparently current 1.3.2 simple.py file, and having the exact issue described by lcgeldenhuys 3 months ago. Any suggestions on how to get past this?
-Phil
-
Hi @pwest,
It might be work checking out https://youtu.be/3NDPSbr5J14?list=PLS09TA19umCOavPeP_FoMHoCuCzjJUWQk, where I talk about MQTT and how to get set up with it.
Currently, the documentation on MQTT that we have online is out of date and I am re-writing it as we speak. I'll post back once it has been published!
Thanks,
Alex
-
Hi,
I'm new with pycom. Maybe it's a stupid question, I would like to know how to import umqtt library.
I've put it in lib folder of sys.path, but when I import this module, it told me no module named 'umqtt'? -
@achide How are you uploading code to your device? Are you using the Pymakr Plugin?
-
@bucknall yes, I use Pymakr.
-
@achide
Pymakr IDE or Pymakr Atom Plugin?
If First then do not use it. -
-
@achide
I do not use pymakr
but if i understand screen correctly you put it into
\flash\lib\connections
but you should into
\flash\lib
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

