haier-ac-remote
v0.1.2
Published
A node module remote controller for Haier air conditioner
Downloads
23
Maintainers
Readme
haier-ac-remote
A node module remote controller for Haier air conditioner.
Usage
$ npm install haier-ac-remote
Examples
Local example
see example here
git clone [email protected]:bstuff/haier-ac-remote.git
cd packages/haier-ac-remote
npm install
- Write
ip
andmac
of your haier conditioner insrc/examples/index.ts
. - Run
npm run example
- use keyboard keys:
w
to power ons
to power off↑
to increase temperature↓
to decrease temperature
Example usage in other projects
import { HaierAC, Mode } from 'haier-ac-remote';
const ac = new HaierAC({
ip: '192.168.1.23',
mac: '00:12:34:56:78:AC',
});
// turn on
await ac.on();
// set mode to heat
await ac.changeState({ mode: Mode.COOL });
// set temperature to 23*
await ac.changeState({ targetTemperature: 23 });
// turn off
await ac.off();