Skip to content
Snippets Groups Projects
Commit 1e08c33d authored by Marin Karamihalev's avatar Marin Karamihalev
Browse files

README: fixed connection info

parent c34f8c82
No related branches found
No related tags found
No related merge requests found
Pipeline #9682 passed
...@@ -10,15 +10,19 @@ Helper library for easy usp communication using mqtt over tcp or ws. ...@@ -10,15 +10,19 @@ Helper library for easy usp communication using mqtt over tcp or ws.
# Usage # Usage
To connect provide necessary info to the default export. (Values will differ depending on setup)
```javascript ```javascript
const connect = require("usp-js").default const connect = require("usp-js").default
const run = async () => { const run = async () => {
// Connect // Connect
const usp = await connect({ const usp = await connect({
host: "192.168.1.1", "host": "192.168.1.1",
username: "admin", "username": "admin",
password: "admin" "password": "admin",
"fromId": "self::usp-controller",
"toId": "proto::rx_usp_agent_mqtt"
}); });
// Get property // Get property
...@@ -129,4 +133,4 @@ const usp = await connect(options); ...@@ -129,4 +133,4 @@ const usp = await connect(options);
- Delete - Delete
```javascript ```javascript
await usp.del("Device.NAT.PortMapping.4."); // => void await usp.del("Device.NAT.PortMapping.4."); // => void
``` ```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment