1.0.6 • Published 4 months ago

gree-lib v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

gree-lib

All credits go to tomikaa87 who made an amazing work. Check out his work: gree-remote It's a very simple library for handling GREE air conditioners from Node.js.

Basic usage

import { scan, bindOne } from "gree-lib";
import { getDeviceStatus, updateDevice } from "gree-lib";
import { DeviceParameterKeys, ModeParameter, PowerParameter, QuietParameter } from "gree-lib";
...
const devices = await scan("192.168.1.255"); // Broadcast address

const acDevice = await bindOne(devices[0]);
const parameters: Record<string, number> = {
    [DeviceParameterKeys.Power]: PowerParameter.on,
    [DeviceParameterKeys.Mode]: ModeParameter.heat,
    [DeviceParameterKeys.QuietMode]: QuietParameter.mode3      
}

// Returns true if it was successful, otherwise false.
const updateResult = updateDevice(acDevice, parameters);
1.0.6

4 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago