1.1.7 • Published 4 years ago
pimote v1.1.7
pimote
Control Energinie Switches from a Raspberry Pi
This module is based on node-energenie-pimote but it is structured as a class. Also the pins are set up and dropped each time. The original module has the problem that it stops working if the cli version is used while a long-term program is running.
Installation
For the pimote CLI
npm install -g pimoteFor use as a module
npm install pimoteCommand Line Interface CLI
Pairing a socket
- Press and hold the button on the socket until the light begins to flash quickly
- Run
pimote pair NwhereNis the device number 1 to 4.
Switching on or off a socket
- To switch on a socket run
pimote on Nwhere N is 1 to 4. - To switch off a socket run
pimote off Nwhere N is 1 to 4.
Switching on or off all sockets
- To switch on all four sockets, run
pimote on - To switch off all four sockets, run
pimote off
Usage as a module
Note that the module is defined as a static class. You should
not try to run new on it.
const Pimote = require('pimote');Methods
Switch number 1 on
Pimote.switchOn(1);Switch number 2 off
Pimote.switchOff(2);Switch all devices on
Pimote.switchOn()Switch all devices off
Pimote.switchOff()Pair device 4
Pimote.pair(4);Author
Cliff Stanford
Issues
Please open an issue on Github.