pimote

1.1.7 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i pimote

Weekly Downloads

4

Version

1.1.7

License

Unlicense

Unpacked Size

6.87 kB

Total Files

6

Last publish

Collaborators

  • cliff