equation-connect
v2.2.0
Published
[](https://github.com/AndreMiras/equation-connect.js/actions/workflows/tests.yml) [
Install
yarn add equation-connectUsage
Here's a basic example for logging and retrieving installations information.
import { createClient } from "equation-connect";
const showInstallations = async (email, password) => {
const client = createClient();
const user = await client.login(email, password);
const installations = await client.getInstallations(user.uid);
console.log(installations);
};
showInstallations(process.env.EMAIL, process.env.PASSWORD);Explore the documentation for more: https://andremiras.github.io/equation-connect.js
CLI
The library includes a CLI tool that is useful for debugging.
yarn cli login --email $EMAIL --password $PASSWORD
yarn cli getInstallations --email $EMAIL --password $PASSWORD
yarn cli getDevice --email $EMAIL --password $PASSWORD --device-id $DEVICE_ID
yarn cli setDevicePower --email $EMAIL --password $PASSWORD --device-id $DEVICE_ID --value true
yarn cli setDevicePreset --email $EMAIL --password $PASSWORD --device-id $DEVICE_ID --value comfort
yarn cli setDeviceTemperature --email $EMAIL --password $PASSWORD --device-id $DEVICE_ID --value 20
yarn cli setDeviceMode --email $EMAIL --password $PASSWORD --device-id $DEVICE_ID --value manualOr with npx once the library is installed:
npx equation-connect getDevice --email $EMAIL --password $PASSWORD --device-id $DEVICE_IDUse --config rointe to connect to Rointe instead of Equation:
yarn cli login --email $EMAIL --password $PASSWORD --config rointe