node-red-contrib-xiaomi-gateway 1.0.10

Node-red blocks for Xiaomi gateway

npm install node-red-contrib-xiaomi-gateway

Package node-red-contrib-xiaomi-gateway

The package is only for use on xiaomi gateways running OpenWRT

Nodes:

  • gateway-button
  • gateway-led
  • gateway-led-notify
  • gateway-illuminance

gateway-button

Receiving events from an embedded button. Returns an object:

{"action": "click", "multiclick": 1}         // one click
{"action": "multiclick", "multiclick": 3}    // three clicks
{"action": "hold", "multiclick": 1}          // hold

gateway-led

Before using the backlight control node, you need to configure the control paths of the LED devices. You can change the paths at any time. Sometimes this is relevant when updating the operating system.

Controls the built-in backlight. Accepts data in the payload field, the data type is configured in the node.

payload = "on";                     // state
payload = "off";
payload = "toggle";
payload = "ff00ff";                 // hex color
payload = {r: 0, g: 0, b: 100};     // object color

gateway-led-notify

The notification node allows you to create various light notifications using the built-in LEDs. Three colors with indices are available for customization (1, 2, 3, 0 - no light). You can also configure the duration of the notification and the duration of the pattern step.

payload = "any type";                           // triggers an alert for a specific period
payload = "start";                              // triggers an alert before manual stop 
payload = "stop";                               // stop alert

gateway-illuminance

Receives data from the built-in light sensor. Returns data depending on the settings of the node:

payload = 3059;                                 // raw data from sensor
payload = 36;                                   // converted value, in lux 
payload = "day";                                // day or night event
payload = "night";
payload = {raw: 3059, lux: 36, state: "day"};   // full data

Node Info

Version: 1.0.10
Updated 3 years, 6 months ago
License: Apache-2.0
Rating: not yet rated

Categories

Actions

Rate:

Downloads

23 in the last week

Nodes

  • gateway-button
  • gateway-led
  • gateway-led-notify
  • gateway-led-config
  • gateway-illuminance

Keywords

  • xiaomi
  • gateway
  • node-red

Maintainers