Official MicroPython MQTT client

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
danielm
Posts: 167
Joined: Mon Oct 05, 2015 12:24 pm

Re: Official MicroPython MQTT client

Post by danielm » Tue Aug 02, 2016 9:23 am

pfalcon, will TLS/SSL be supported by MQTT client sometime in the near future? In my opinion it is an important feature for any real-world IoT use-case.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Official MicroPython MQTT client

Post by pfalcon » Thu Aug 04, 2016 9:43 pm

SSL support pushed to micropython-lib master (note that it requires mciropython master).
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Official MicroPython MQTT client

Post by pfalcon » Mon Aug 15, 2016 2:17 pm

User/password authentication support was contributed: https://github.com/micropython/micropython-lib/pull/91
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

41536172@qq.com
Posts: 11
Joined: Sun May 08, 2016 3:41 pm

Re: Official MicroPython MQTT client

Post by 41536172@qq.com » Tue Aug 16, 2016 2:06 pm

how can i use the 'setup.py'?

41536172@qq.com
Posts: 11
Joined: Sun May 08, 2016 3:41 pm

Re: Official MicroPython MQTT client

Post by 41536172@qq.com » Wed Aug 17, 2016 1:09 am

i copied the file 'simple.py' which looks like the module file into micropython/esp8266/scripts and rename it as 'mqtt.py' and then i made the new port file ,wrote it into my 8266.

and then i can import mqtt it looks work!

41536172@qq.com
Posts: 11
Joined: Sun May 08, 2016 3:41 pm

Re: Official MicroPython MQTT client

Post by 41536172@qq.com » Wed Aug 17, 2016 1:36 am

but when i 'client=mqtt.MQTTClient(1, 192.168.1.88, 0)'
the prompt shows: invalid syntax for number

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Official MicroPython MQTT client

Post by deshipu » Wed Aug 17, 2016 6:46 am

Pass the ip address as a string.

danielm
Posts: 167
Joined: Mon Oct 05, 2015 12:24 pm

Re: Official MicroPython MQTT client

Post by danielm » Thu Aug 25, 2016 4:35 pm

I encountered MQTT client or SSL library related issue.
I described it in this post: http://forum.micropython.org/viewtopic. ... 172#p13172
Could you please take a look at it?

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Official MicroPython MQTT client

Post by pfalcon » Sun Sep 18, 2016 6:27 pm

danielm, I don't have WiPy/CC3200, so can't test that. SSL connection works well for me with esp8266 or unix port.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Official MicroPython MQTT client

Post by pfalcon » Sun Sep 18, 2016 6:28 pm

"Last will" feature support was contributed: https://github.com/micropython/micropython-lib/pull/97 .
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

Post Reply