Closed JJGO closed 2 years ago
~I tried cross compiling with mpy-cross mqtt_as.py
and copying the generated mqtt-as.mpy
and got an identical memory error to when it was copied as raw code.~
I needed to delete the mqtt-async.py
I was not aware the .py
over .mpy
priority. Adding pointers to pip install mpy-cross
and mpy-cross ./mqtt_as.py
to the tutorial would be great.
Also, clarifying the the frozen bytecode part would be great.
Information on these issues belongs in MicroPython documentation rather than in that for any one specific application.
The official docs are here. The last time I looked the official docs were a little out of date with regard to manifests. See my notes here.
If you find problems with the official docs there is always the option of raising an issue or PR against them.
Hi, thanks for sharing. In the range.py file a msg is published but sub_cb() is not called. How do I subscribe so I can activate my relays? Also, how do I get wlan parameters w/o modifing the lib? TIA
In my testing sub_cb is called. A message is printed and the blue LED flashes whenever a message is received. If this isn't occurring I would check that it is being transmitted to the correct topic. This may be verified using mosquitto_sub on a PC.
Please could you explain your query about wlan parameters.
Thank you for getting back to me. I solved the first part of the problem this morning. I had a space in the topic's string. As for the wlan, I usually pub the rssi so I can monitor its strength via a node-red gauge. I can visualize the self.dprint(s.ifconfig()) and self.dprint(s.status('rssi')) data from the library, but I need the call often the rssi from the main loop so it can be published. I tried library.function.variable but it doesn't work. Perhaps, it may be a good idea for the library to share said info so it can be available. BTW, I'm not a programmer, so, I apologize for the question.
The range_ex.py example publishes RSSI.
Will loot at it. Thank you again.
I'm following the tutorial to do the installation on a ESP8266, and I'm stumped about what I need to do. I tried copying
mqtt_as.py
andconfig.py
, and got a memory error which was expected given the warning.Could you provide further reference or pointers about how to cross-compile the module or build it as frozen bytecode?