Output - NeoPixel (Basic)

.

Plugin details

Type: Output

Name: NeoPixel (Basic)

Status: NORMAL NEOPIXEL CLIMATE

GitHub: P038_NeoPixel.ino

Maintainer: .

Used libraries: .

Supported hardware

NeoPixel RGB and RGBW LEDs and LED Strips

A few examples of NeoPixel LEDs and strips

A few examples of NeoPixel LEDs and strips (Image sourced from Aliexpress)

Power consumption

By the physical design of these modules, using NeoPixel leds for display that can consume up to 60 mA each, the power consumption is dependent on the number of neopixels that are activated and the brightness that is set. On a set of NeoPixels, like consisting of 64 pixels, the max. power used 60 mA * 64 = 3840 mA @ 5V = 19.2 watt with all leds on at max brightness (255), so it requires an adequate power supply, preferably separate from the power supply used to power the ESP.

When reducing the brightness to 40% (0.4 * 255 = 102), that power is reduced to ca. 1.5 A @ 5V = ca. 7.5 watt. 40% is usually enough during daylight conditions, at night the brightness can often be reduced to 20%.

For a set of 300 pixels, the max. power would count up to 300 * 60 mA @ 5V = 90 W. At 40% brightness, that is reduced to 36 W.

Reasoning back from the available power supply max. load (f.e. 30 W), the max. allowed brightness can be calculated by dividing the max. load by the voltage (5V) and the number of pixels (300) = 20 mA, 60 / 20 = 3 = ~33% brightness = 85. That will still be bright enough, but will put quite a strain at the power supply.

Configuration

Device configuration
  • Name A unique name should be entered here.

  • Enabled The device can be disabled or enabled. When not enabled the device should not use any resources.

Actuator

  • GPIO -> DIN: Select the GPIO pin that the LED stripe is connected to.

  • Led Count: The number of LEDs available. This is the amount of LEDs that will be allowed for the NeoPixel* commands to be set, and that will be set using the NeoPixelAll* commands.

  • Strip Type: Select the type of the LEDs mounted on the strip:

  • Initial brightness: The brightness that the stripe is initially set to. Default is 255, the max. available brightness, and default before this setting was introduced. Range: 1..255.

  • Maximum allowed brightness: The brightness that is the maximum it can be set to, either from UI or via the NeoPixelBright command, to optionally help protect both the eyes and the power-supply powering the stripe. Default is 255. Range: 1..255.

The Strip type options

GRB : Most commonly, the LEDs are of GRB type.

GRBW : If the LEDs also support Brightness control, then the GRBW type should be selected, and the Brightness can be added in the NeoPixel* commands.

Commands available

Command Syntax

Extra information

NeoPixel,<led nr>,<red>,<green>,<blue>[,<brightness>]
Set the LED to the provided R/G/B[/W] color value.
led nr: 1..<Led Count>
red: 0..255
green: 0..255
blue: 0..255
brightness: 0..255 (only applicable when using GRBW LEDs)
NeoPixelAll,<red>,<green>,<blue>[,<brightness>]
Set all LEDs to the provided R/G/B[/W] color value.
NeoPixelLine,<start led nr>,<stop led nr>,<red>,<green>,<blue>[,<brightness>]
Set a group of LEDs to the provided R/G/B[/W] color value.
Start LED nr and Stop LED nr should be within range 1..<Led Count>.
NeoPixelHSV,<led nr>,<hue>,<saturation>,<value>
Set the LED to the provided H/S/V color value.
led nr: 1..<Led Count>
hue: 0..255
saturation: 0..255
value: 0..255
NeoPixelAllHSV,<hue>,<saturation>,<value>
Set all LEDs to the provided H/S/V color value.
NeoPixelLineHSV,<start led nr>,<stop led nr>,<hue>,<saturation>,<value>
Set a group of LEDs to the provided H/S/V color value.
Start LED nr and Stop LED nr should be within range 1..<Led Count>.
NeoPixelBright[,<brightness>]
Set the level of display brightness, range: 0..255. If no brightness or 0 is provided, the Initial brightness setting is used.
The maximum brightness allowed is determined by the Maximum allowed brightness setting.

Change log

Changed in version 2.0:

improved 2022-01: Make plugin multi-instance compatible, improve/fix pin selection, allow RGBW color selection for NeoPixelLine* commands.

added Major overhaul for 2.0 release.

Added in version 1.0:

added Initial release version.