Field | Value | Required |
---|---|---|
Host | www.connectedwater.ca | Yes |
Port | 1883/8883 (Non-TLS/TLS) | Yes |
Username | Your Auth Token | Yes |
Password | Any character or leave blank | No |
Quality of Service | 0 -v or 1 -v | No |
Subscribe to all of the Variable’s Last Values of all Devices: `/v1.6/devices/#`
Example
Note: The bash example from this section makes use of the Eclipse Mosquitto library
Subscribe to all of the Variable’s Last Values of all the Devices
Constantly obtain all of the Variable’s Last Values of all the Devices:
$mosquitto_sub \
-h “www.connectedwater.ca”\
-t “/v1.6/devices/#” \
-u “BBFF-Rfcgaxns6HlVb155WA0RhSY85xNDmB” \
-p 1883 \
-q 1 -v
Subscription Response
/v1.6/devices/water-monkey-api-label-1/actual_consumption_per_update {“value”: 69.0, “timestamp”: 1691523736600, “context”: {}, “created_at”: 1691523737786}
/v1.6/devices/water-monkey-api-label-2/actual_cost_per_update {“value”: 4.23, “timestamp”: 1691523736600, “context”: {}, “created_at”: 1691523737786}