peterhinch / micropython-mqtt

A 'resilient' asynchronous MQTT driver. Recovers from WiFi and broker outages.
MIT License
581 stars 127 forks source link

New location of mqtt_as.py #155

Open sgbaird opened 1 month ago

sgbaird commented 1 month ago

Typically, I've been linking to the mqtt_as.py file and the corresponding README. However, somebody brought to my attention that these links are no longer valid. I'm assuming this has something to do with the restructure into a Python package that I saw mentioned. I poked around the repository a little bit, but had trouble finding the file again. Could you help clarify? (Sorry if I'm missing it in an obvious place). On a related note, should I recommend that people install with mip for example?

Thanks @Neil-YL for pointing out.

sgbaird commented 1 month ago

Looks like the main README link on the GitHub homepage/readme also gives a 404 error.

EDIT: I'm seeing that the code seems to be in __init__.py now: https://github.com/peterhinch/micropython-mqtt/blob/master/mqtt_as%2F__init__.py

I don't see a README in the mqtt_as dir, so I'm guessing everything was surfaced to the top level readme.

peterhinch commented 1 month ago

I am sorry for the confusion. The reorganisation served two purposes:

  1. To retire the bridge project. Given modern hardware, anyone wanting WiFi connectivity would buy a platform that supported it. Retiring bridge enabled the repo to be tidied up.
  2. To convert mqtt_as to a Python package. This was preparatory to further improvements such as adding MQTT V5 support, plus other improvements that are in the pipeline. As you have discovered, the main module is in __init__.py.

I'm confused by your report of broken links. Please could you clarify any links that need fixing.

sgbaird commented 1 month ago

Thanks for clarifying! Would you suggest using mip install then?

https://github.com/peterhinch/micropython-mqtt/blob/0d759397ef4f80d48f8a419d22d0a40d5dc72526/README.md?plain=1#L24 resolves to 404: https://github.com/peterhinch/micropython-mqtt/blob/README.md (this is the link that's actually displayed at https://github.com/peterhinch/micropython-mqtt)

peterhinch commented 1 month ago

I have re-tested the MIP install as recommended in the docs:

$ mpremote mip install github:peterhinch/micropython-mqtt

and it works fine here.