Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Subscribe to Locations
Copy Markdown
Open in ChatGPT
Open in Claude
To subscribe to locations from a device, connect to the MQTT API and subscribe it to the locations topic for that device.
To subscribe to locations the MQTT topic is:
devices/{device.id}/locations
Replace {device.id} with your device ID (should begin with dev_).
Example Code
Subscribe to all device locations using the Wia SDK
Javascript
x
// Create an instance of Wia// Replace 'd_sk_abcdef' with your device secret keyvar wia = require('wia')('d_sk_abcdef');// Subscribe to all locations for a device// Replace 'dev_abc123' with your device IDwia.locations.subscribe({ device: 'dev_abc123',}, function(location) { console.log(location);});// Connect to the MQTT APIwia.stream.connect();Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Next to read:
CoAP APIDiscard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message
