Hi - I am trying to use the HiveMQ Cloud to start getting familiar with MQTT using a Raspberry Pico W as the client device. I was using your recent blog about using Raspberry Pi Pico / Airlift WiFi as a reference although I am using microPython instead of circuitPython.
I can use the HiveMQ public broker service without any issues but when I try to connect to the HiveMQ cloud I get the error message “MQTT connect failed: extra keyword arguments given” which seems to be related to the ssl_params
Snippet of code:-
from umqtt.simple2 import MQTTClient
mqtt_client = MQTTClient(
client_id=secrets[‘mqtt_clientid’],
server=secrets[“mqtt_server”],
port=secrets[“mqtt_port”],
user=secrets[“mqtt_username”],
password=secrets[“mqtt_key”],
ssl=True,
ssl_params={‘keyfile’:‘/server.key’,‘certfile’:‘/server.pem’}
)
mqtt_client.connect()
Any help would be appreciated