1.1.7 • Published 3 years ago

pimote v1.1.7

Weekly downloads
3
License
Unlicense
Repository
github
Last release
3 years ago

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 pimote

For use as a module

npm install pimote

Command Line Interface CLI

Pairing a socket

  1. Press and hold the button on the socket until the light begins to flash quickly
  2. Run pimote pair N where N is the device number 1 to 4.

Switching on or off a socket

  • To switch on a socket run pimote on N where N is 1 to 4.
  • To switch off a socket run pimote off N where 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.

1.1.7

3 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago