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?
Publish an Event with CoAP
Copy Markdown
Open in ChatGPT
Open in Claude
To send an event to Wia, connect to the CoAP API and send a POST request to the URL coap://coap.wia.io/events.
Example Code
x
// Install node coap client using `npm install node-coap-client`const coap = require("node-coap-client").CoapClient;// Create the buffer payload// Replace 'your-device-secret-key' with the secret key for your device// it should start with `d_sk`const bufferPayload = Buffer.from(JSON.stringify({ accessToken: 'your-device-secret-key', name: 'temperature', data: 21.5}));coap .request( 'coap://coap.wia.io:5683', 'post', bufferPayload ) .then(response => { console.log(response.payload.toString('utf-8')); }) .catch(err => { console.log(err); });Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Discard 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
