Skip to content

PyPortal_MQTT_Control: not working on CircuitPython 5.3 #1110

@mikewop

Description

@mikewop

It seems the library MiniMQTT has changed. The code in PyPortal_MQTT_Control uses

# Set up a MiniMQTT Client client = MQTT(socket, broker = secrets['broker'], port = 1883, username = secrets['user'], password = secrets['pass'], network_manager = wifi)
But the latest MiniMQTT library from adafruit-circuitpython-bundle-py-20200516.zip
defines a signature of:
def __init__( self, broker, port=None, username=None, password=None, client_id=None, is_ssl=True, log=False, keep_alive=60, ):

Notice that "socket" and "network_manager" are no longer part of the constructor.

Error:
Traceback (most recent call last): File "code.py", line 205, in <module> TypeError: function got multiple values for argument 'broker'
The code seems to be out of date w.r.t to the latest version of minimqtt

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions