Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwcnewton/rointe-sdk-node
Node SDK for Rointe
https://github.com/jwcnewton/rointe-sdk-node
Last synced: about 1 month ago
JSON representation
Node SDK for Rointe
- Host: GitHub
- URL: https://github.com/jwcnewton/rointe-sdk-node
- Owner: jwcnewton
- License: apache-2.0
- Created: 2022-06-12T16:13:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T13:18:44.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T14:22:48.443Z (2 months ago)
- Language: JavaScript
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rointe-sdk-node
Node SDK for Rointe```bash
npm i rointe-sdk
```## Example Usage
```js
// Creating a new API Object
const rointe_api = new api("EMAIL", "PASSWORD");// Initialize authentication (This might be moved into the constructor for simplicity)
const auth = await rointe_api.initialize_authentication();
``````js
// Get the local id - unique for the account
const localId = await rointe_api.get_local_id();
``````js
// Get installation by name (whatever you called the installation)
const devices = await rointe_api.get_all_devices_by_installation_name(localId.data, "Home")
``````js
// Get device info - firmware, temp, etc.
const device = await rointe_api.get_device(devices.data[0].device_id)
``````js
// Set the device temp to 10
const response = await rointe_api.set_device_temp(devices.data[0].device_id, 10)
```