Pico w mqtt_as to HiveMQ Cloud
Posted: Thu Aug 18, 2022 8:02 pm
Newbie trying to understand MQTT
Situation: With a HiveMQ Cloud broker I can simultaneously pub/sub using:
But I can't get a Pico W with MQTT_AS connected to the HiveMQ Broker
I've added the following to the MQTT_AS config.py file and obviously populated secrets.py accordingly:
With port set to 8883 I get the following error (I'm using the mqtt_as code example range.py as a basis):
I would appreciate a push in the right direction to solving this problem.
Thanks
Situation: With a HiveMQ Cloud broker I can simultaneously pub/sub using:
- * Mosquitto command line
* Standard Python (on laptop) using HiveMQ code examples
* Windows MQTT Explorer app
But I can't get a Pico W with MQTT_AS connected to the HiveMQ Broker
I've added the following to the MQTT_AS config.py file and obviously populated secrets.py accordingly:
Code: Select all
config['server'] = secrets['hivemq_broker']
config['port'] = secrets['port']
config['user'] = secrets['hivemq_username']
config['password'] = secrets['hivemq_key']
Code: Select all
Checking WiFi integrity.
Got reliable connection
Connecting to broker.
Connection failed. Error: (-1, 'Connection closed by host')
I would appreciate a push in the right direction to solving this problem.
Thanks