I need to utilize umqtt.simple2 for an application in an ESP-01S 1MB.
According to https://pypi.org/project/micropython-umqtt.simple2/ this module is included since version 1.12. However, I've installed esp8266-1m-20210902-v1.17.bin into the ESP-01S, and the result for help('modules') is:
__main__ inisetup ucryptolib usocket
_boot lwip uctypes ussl
_onewire machine uerrno ustruct
_webrepl math uhashlib usys
apa102 micropython uheapq utime
btree neopixel uio utimeq
builtins network ujson uwebsocket
dht ntptime uos uzlib
ds18x20 onewire upip webrepl
esp port_diag upip_utarfile webrepl_setup
flashbdev uarray urandom websocket_helper
framebuf ubinascii ure
gc ucollections uselect
Apparently "umqtt.simple2" is not included. I've downloaded umqtt.simple2 to my PC from GitHub.
The question is how to merge it with the existing microPython flashed on to the ESP-01S. From what I've read I should be able to import it, however I've also read that the order of the import is important to avoid conflicts the following should be executed first:
import sys
sys.path.reverse()
followed by:
import upip
upip.install("micropython-umqtt.simple2")
Should I replace "micropython-umqtt.simple2" with the path to the module on my PC?
Is this the proper way to install the MQTT functionality into the ESP-01S.
Any help would be appreciated.
Require umqtt.simple2
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Require umqtt.simple2
upip installs directly to your device so after running it you should be able to access the module. I'm not aware of anyone in here using that version, however, so support may be limited.
I think the original version may be absent on your build to conserve space.
I think the original version may be absent on your build to conserve space.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Require umqtt.simple2
pythoncoder,
Thanks for the reply. I gave up on the so called "umqtt.simple2" got everything working with "imqtt.simple". I had wanted to load the module via internet connection, I was hoping to load it from a local file, but it kept throwing an error. (still investigating that)
Right now I have an MQTT Broker & Client running under Node-RED.
The Broker on Node-RED is only for test purposes, will probably switch to Mosquitto, but right now it's working well.
I have a client each on two Windows 10 PC.s running MQTTBox
and now umqtt running on an ESP-01S.
Not too bad for someone who just started using this stuff about a week ago
Although in truth, this are all just toy applications right now; I've got a bit more to learn before I can turn them into practical applications.
Thanks for the reply. I gave up on the so called "umqtt.simple2" got everything working with "imqtt.simple". I had wanted to load the module via internet connection, I was hoping to load it from a local file, but it kept throwing an error. (still investigating that)
Right now I have an MQTT Broker & Client running under Node-RED.
The Broker on Node-RED is only for test purposes, will probably switch to Mosquitto, but right now it's working well.
I have a client each on two Windows 10 PC.s running MQTTBox
and now umqtt running on an ESP-01S.
Not too bad for someone who just started using this stuff about a week ago
Although in truth, this are all just toy applications right now; I've got a bit more to learn before I can turn them into practical applications.