-
1Create a free HiveMQ Cloud account
First off, the requirements for the following setup instructions are:
- A Canique Ambience sensor
- A Canique Pico Gateway
- an MQTT server that is reachable (can be in local network or in the internet): we will use a free HiveMQ MQTT server in the Azure cloud infrastructure here but you're free to change this.
Visit https://console.hivemq.cloud/ and create a free account.
When asked, select "Azure" as the cloud provider (although "aws" should be fine too).
Note the URL and the TLS port of your cluster.
Then create MQTT Client Credentials for your cluster and note them. -
2Note IP of your Canique Pico Gateway
Get the IP of your Canique Pico Gateway. If you log into the administration console of your router, it will show the IP.
-
3Enter MQTT credentials
Browse to http://your-pico-gateway-ip (use IP from step 2) and set custom MQTT server settings using the data from step 1
Save the settings, wait a couple of seconds and reload the settings page.
It should display that you're connected to the HiveMQ cluster.
-
4View data with an MQTT Client
Install mosquitto-clients on your linux PC. (You can also use any other MQTT client like MQTTfx etc.)
One of the tools in this package is: mosquitto_sub
Run this command, replacing the upper case words with your own data:mosquitto_sub -v -h YOUR_HIVEMQ_CLUSTER_URL -p 8883 -t "#" -i RANDOM_STRING -u YOUR_HIVEMQ_USER -P YOUR_HIVEMQ_PASSWORD
Now you'll see JSON encoded data every 30 seconds with temperature, relative humidity and barometric pressure from the Canique Ambience sensor.
On every vibration and reed sensor change, you'll also see some JSON data.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.