0.0.10-beta.1 • Published 2 years ago

homebridge-wled-ws v0.0.10-beta.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

homebridge-wled-ws

npm npm GitHub last commit GitHub build

Homebridge WLED plugin

This is a Homebridge dynamic platform plugin for controlling LED strips using Websockets. It is based on the fantastic wled-client library, which provides access to WLED's JSON API using websockets.

!NOTE Websockets are enabled by default since WLED version 0.10.2

The plugin adds a Lightbulb to Homekit for every configured WLED controller. The Lightbulb can be switched on and off and it's dimmable. Depending on the LED configuration additional services will be made available (e.g. color selection). For each configured preset a switch is created that can be used in for automation. Unlike other plugins the preset selection is not implemented as a Homekit Television service.

Configuration

The plugin supports schema based configuration. All settings can be entered using the plugin's configuration dialog. There is a basic input data validation included, however this needs to be improved in future versions.

Using Homebridge's integrated JSON Editor requires the following configuration entries:

{
    "name": "Homebridge-Wled-WS",
    "platform": "wled-ws",
    "controllers": [
        {
            "name": "My WLED Controller",
            "address": "192.168.1.100",
            "presets": "DoorClosed,DoorOpen"
        }
    ],
    "logging": false
}

Settings

SettingValueComment
nameName of the WLED controllerThis name is used for the acessory in Homekit and for the Homebridge logs
addressIP address or host nameEnter the address of the controller - make sure it is the same which is shown as Client IP in the WLED Wifi settings
presetslist of presetsEnter a comma separated list of presets. A switch will be created in Homekit for each preset
loggingTrue or FalseIf enabled (=True) WLED's JSON data will be logged. Leave it disabled if everything works as expected. If you want to file an issue on Github turn it on for later analysis

!IMPORTANT WLED organizes presets by id. This plugin uses names for configuration. When starting, it checks whether the name exists. If not, an error message is generated. In such a case please check the preset name for typos.

Why using websockets instead of MQTT or HTTP?

Before starting the implementation of this plugin I intended to use WLED's MQTT feature to control my LED strips. While sending data in JSON format to the WLED controller is straightforward, it was difficult for me to parse the answer, which is in XML format. I am not aware of an existing MQTT Homebridge plugin to handle such a device. The HTTP interface is more consistent in that sense, but requires polling to get state updates when the WLED state is modified outside Homekit/Homebridge (e.g. by mobile apps or other smart home automation systems). The websocket approach allows real-time state updates for all connected clients.

Limitations

  1. WLED supports segments, however the created Homekit accessory only controls the first (main) segment
  2. The brightness is set for the whole strip, brightness per segment is ignored

TODOs

  • harden controller communication (reconnects)
  • support color picker
  • add presets and playlists
  • add effects
0.0.15-beta.0

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.12-beta.1

2 years ago

0.0.12-beta.0

2 years ago

0.0.11

2 years ago

0.0.10-beta.1

2 years ago

0.0.10-beta.0

2 years ago

0.0.9

2 years ago

0.0.8-beta.3

2 years ago

0.0.8-beta.2

2 years ago

0.0.8-beta.1

2 years ago

0.0.7-beta.2

2 years ago

0.0.6-beta.1

2 years ago

0.0.7-beta.0

2 years ago

0.0.7-beta.1

2 years ago

0.0.8-beta.0

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.6-beta.0

2 years ago

0.0.4-beta.4

2 years ago

0.0.5

2 years ago

0.0.4-beta.3

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.4-beta.2

2 years ago

0.0.4-beta.1

2 years ago

0.0.4-beta.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago