Skip to content

Micropython script to integrate Pimoroni Plasma Stick 2040W to Home Assistant via MQTT. Supports Home Assistant auto discovery and provides an MQTT Light entity. Supports colour, brightness and several effects.

License

Notifications You must be signed in to change notification settings

zim514/homeassistant-plasma

Repository files navigation

HomeAssistant Plasma

Overview

Micropython script to integrate Pimoroni Plasma Stick 2040W to Home Assistant via MQTT. Supports Home Assistant auto discovery and provides an MQTT Light entity.
Supports colour, brightness and several effects.

Setup

  1. Setup MQTT in Home Assistant
  2. Install Pimoroni Micropython to your Plasma Stick, ensure you have at least version 1.23
  3. Modify CONFIG.py with your settings. You can also copy and rename to config_local.py to avoid overwriting your settings if updating the whole package
  4. If correctly configured and connected, your device should now be visible as a light in Home Assistant, where it can be used and controlled like any other light.

CONFIG.py

Setting Default
NUM_LEDS 50 Integer, Number of leads on the light strip
WIFI_SSID "WIFI" WiFi Access Point Name
WIFI_PSK "PASSWORD" WiFi Password
WIFI_COUNTRY "CA" Change to your local two-letter ISO 3166-1 country code
MQTT_SERVER "192.168.1.10" Address of MQTT broker
MQTT_PORT 1883 Integer, 1833 is the default MQTT port
MQTT_CLIENTID "plasma_1" Unique ID for this device, with no spaces
MQTT_NAME "Plasma 1" Friendly name, as displayed in Home Assistant UIs
MQTT_DISCOVERY_PREFIX "homeassistant" Default for home assistant, configure in HA

Status Effects and troubleshooting

At initial start up, the light strip colour will show the connection status and errors. However, if the light strip successfully connected, it will keep the previous light state and quietly reconnect in the background. This is to avoid the strip suddenly going on in the middle of the night for a simple connection problem.

Strip Colour Meaning
Alternating Blue Connecting to Wi-Fi
Green, then off Successfully connected to Wifi and MQTT. Ready!
Red Error connecting to Wi-Fi.
Orange Error establishing initial connection to MQTT broker, retrying

The LED on the Pico W indicates a connection in progress.

Pico W LED Meaning
On Attempting Wi-Fi or MQTT connection
Rapid blinking Successfully connected and ready for use
Off Connected to Wifi and MQTT

About

Micropython script to integrate Pimoroni Plasma Stick 2040W to Home Assistant via MQTT. Supports Home Assistant auto discovery and provides an MQTT Light entity. Supports colour, brightness and several effects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages