rointe-sdk
v1.0.4
Published
rointe-sdk node
Downloads
6
Readme
rointe-sdk-node
Node SDK for Rointe
npm i rointe-sdk
Example Usage
// 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();
// Get the local id - unique for the account
const localId = await rointe_api.get_local_id();
// Get installation by name (whatever you called the installation)
const devices = await rointe_api.get_all_devices_by_installation_name(localId.data, "Home")
// Get device info - firmware, temp, etc.
const device = await rointe_api.get_device(devices.data[0].device_id)
// Set the device temp to 10
const response = await rointe_api.set_device_temp(devices.data[0].device_id, 10)