node-red-contrib-powermateble 0.1.1

A Node-RED node for interacting with a PowerMate Bluetooth device

npm install node-red-contrib-powermateble

A Node-RED node for interacting with a PowerMate Bluetooth device.

Under the hood, this node makes use of and thus has a dependency on the noble Node.js library.

Prerequisites

Linux

  • Node.js v0.12.x or greater
  • Bluetooth

Install the prerequisite bluetooth libraries by running the following command.

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev 

Optional: The noble library requires Node.js to run as sudo or root. Run the following command to grant the node binary cap_net_raw privileges so that this is no longer a requirement.

sudo apt-get install libcap2-bin
sudo setcap cap_net_raw+eip $(eval readlink -f '/path/to/node/binary')

Install

Run the following command in the root directory of your Node-RED install

npm install node-red-contrib-powermateble

Usage

powermate-in

A node that listens to a PowerMate Bluetooth device for device events.

Select or connect to a new PowerMate device via the Device field by entering it's MAC address. The msg.payload property contains the parsed event value. Additionally, msg.topic contains the name of the captured event.

Possible events/value combinations are:

Event Values
battery
  • Integer percentage battery level between 0 and 100
knob
  • 'release' for the release of a short press
  • 'clockwise' for a clockwise rotation
  • 'anticlockwise' for an anticlockwise rotation
  • 'hold1' to 'hold6' for a long press
  • 'holdClockwise' for a clockwise rotation whilst depressed
  • 'holdAnticlockwise' for an anticlockwise rotation whilst depressed
  • 'holdRelease' for the release of a long press

Screenshots

Screenshot1

Caption: powermate-in config dalog

Screenshot2

Caption: powermate-in device dialog

Screenshot3

Caption: powermate-in node wired to debug

powermate-led

A node that sets the brightness of a PowerMate Bluetooth device LED.

Select or connect to a new PowerMate device via the Device field by entering it's MAC address. Enter the percentage brightness into the Brightness field to set the devices LED brightness. If left blank the passed in msg.payload will be used.

Setting a value of -1 will pulse the LED.

Screenshots

Screenshot4

Caption: powermate-led config dialog

Screenshot5

Caption: powermate-LED node wired to random percentage generator

Node Info

Version: 0.1.1
Updated 1 year, 9 months ago
License: MIT

Downloads

0 in the last day
4 in the last week
25 in the last month

Nodes

  • powermate-device
  • powermate-in
  • powermate-led

Keywords

  • circuitbeard
  • powermate
  • bluetooth
  • ble
  • node-red

Maintainers

  • circuitbeard