GithubHelp home page GithubHelp logo

homebridge-wled-preset's Introduction

πŸ‘‹ Who am I?

πŸ’Ό Work

  • I am Lead Software Developer for Revanista (Hotel Revenue Management Web Application)
  • Previously Cloud Solution Architect at Microsoft ☁️

🚧 Ongoing Projects

  • Improving and automating workflows to only focus on what matters!
  • Get my dotfiles and Neovim config repos to look super neat ✨
  • Spend time on Pluralsight to learn new skills (e.g. AWS Certifications, Rust πŸ¦€)

πŸ“Š Statistics

πŸ“ˆ GitHub Stats

Top Langs

Top Langs

πŸ§‘β€πŸ’» Coding Stats

Top Langs

πŸ“ Open-Source Contributions

🎨 PRs
πŸ’¬ Discussions

Β 

homebridge-wled-preset's People

Contributors

agoodshort avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

homebridge-wled-preset's Issues

IOS TV remote from plug-in??

Have been using this plug-in for a while and it’s great.

A few issues. For some reason I’m now showing an iOS tv remote for the WLED device!!?? Any ideas why this would be? Screenshot attached.

Secondly when homebridge reboots, the default for this plug-in is for the light to be on where as all other plugins default to off. Is it possible to change this?

Many thanks

Home Kit Bulb State is based off of Brightness toggle

Hello,

I've added this to my HomeBridge installation and it works. However the issue I see is that the Bulb Status in HomeKit seems to be linked to the brightness toggle rather than if the LED's controlled by WLED are actually on or off. So if I go into HomeKit, hit the power button, the LED's attached to my WLED controller turn off. However the Bulb in HomeKit still says the 'lights' are on. Then looking in the 'Room' in HomeKit, it shows that light is on when it is actually off. If I move the brightness toggle all the way down, the bulb in HomeKit shows it off and the LED lights are off too, but it would be nice if hitting the power button to turn off the LED's also showed the Light off in HomeKit.

Plugin crashes if IP address is wrong

If the IP address of one of the device is wrong (not sure what happens if a device goes down after Homebridge restart) the plugin crashes and Homebridge with it.

[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Error: connect ECONNREFUSED 192.168.1.20:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[05/12/2021, 23:30:18] Got SIGTERM, shutting down Homebridge...

Homekit doesn't show the presents.

Hi,
I use the normal settings. For example I want 3 Presents in Homekit. Sometimes I see nothing, sometimes I see 1 oder 2. I've tried a lot but never get all 3 Presents shown in HomeKit. Did someone have a solution for that?
BR Lukas

Cant get accessory to appear in HK

Describe Your Problem:
accessory appears in homebridge but i cannot get it to appear in HK

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

[2/4/2022, 8:49:02 AM] [WledPreset] Initializing WledPreset platform...
[2/4/2022, 8:49:02 AM] [WledPreset] Loading accessory from cache: Led Strip
[2/4/2022, 8:49:02 AM] [CameraUI] Config changed through interface, saving...
[2/4/2022, 8:49:02 AM] [CameraUI] Initializing camera.ui with PID: 22254
[2/4/2022, 8:49:02 AM] [CameraUI] Configuring server...
[2/4/2022, 8:49:02 AM] [WledPreset] Retrieving settings from config file: Led Strip
Setup Payload:
X-HM://0024ZT0JEPG5A
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
                       
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     
    β”‚ 921-66-906 β”‚     
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     
                       
[2/4/2022, 8:49:02 AM] Homebridge v1.4.0 (HAP v0.10.0) (Homebridge 3ACB) is running on port 51622.
[2/4/2022, 8:49:02 AM] [CameraUI] Cam1: Configuring unbridged accessory...
[2/4/2022, 8:49:02 AM] [CameraUI] Cam1: Setting up accessory...
[2/4/2022, 8:49:02 AM] [CameraUI] Cam1: Adding motion sensor service
[2/4/2022, 8:49:02 AM] [CameraUI] Cam1: Initializing HomeKit Secure Video
[2/4/2022, 8:49:03 AM] [CameraUI] Cam2: Configuring unbridged accessory...
[2/4/2022, 8:49:03 AM] [CameraUI] Cam2: Setting up accessory...
[2/4/2022, 8:49:03 AM] [CameraUI] Cam2: Adding motion sensor service
[2/4/2022, 8:49:03 AM] [CameraUI] Cam2: Initializing HomeKit Secure Video
[2/4/2022, 8:49:03 AM] [CameraUI] Cam3: Configuring unbridged accessory...
[2/4/2022, 8:49:03 AM] [CameraUI] Cam3: Setting up accessory...
[2/4/2022, 8:49:03 AM] [CameraUI] Cam3: Adding motion sensor service
[2/4/2022, 8:49:03 AM] [CameraUI] Cam3: Initializing HomeKit Secure Video
[2/4/2022, 8:49:03 AM] [CameraUI] Bedroom: Configuring unbridged accessory...
[2/4/2022, 8:49:03 AM] [CameraUI] Bedroom: Setting up accessory...
[2/4/2022, 8:49:03 AM] [CameraUI] Bedroom: Adding motion sensor service
[2/4/2022, 8:49:03 AM] [CameraUI] Bedroom: Initializing HomeKit Secure Video
[2/4/2022, 8:49:03 AM] [CameraUI] Accessories refreshed and config.json saved!
[2/4/2022, 8:49:03 AM] Cam1 0C69 is running on port 36703.
[2/4/2022, 8:49:03 AM] Please add [Cam1 0C69] manually in Home app. Setup Code: 921-66-906
[2/4/2022, 8:49:03 AM] Cam2 FC44 is running on port 38237.
[2/4/2022, 8:49:03 AM] Please add [Cam2 FC44] manually in Home app. Setup Code: 921-66-906
[2/4/2022, 8:49:03 AM] Cam3 0BF5 is running on port 44807.
[2/4/2022, 8:49:03 AM] Please add [Cam3 0BF5] manually in Home app. Setup Code: 921-66-906
[2/4/2022, 8:49:03 AM] Bedroom FB4B is running on port 42951.
[2/4/2022, 8:49:03 AM] Please add [Bedroom FB4B] manually in Home app. Setup Code: 921-66-906
[2/4/2022, 8:49:03 AM] [WledPreset] Led Strip is reachable
[2/4/2022, 8:49:03 AM] [WledPreset] Restoring existing accessory from cache: Led Strip
[2/4/2022, 8:49:07 AM] [CameraUI] Configuring socket...
[2/4/2022, 8:49:07 AM] [CameraUI] Configuring database...
[2/4/2022, 8:49:07 AM] [CameraUI] Configuring event controller...
[2/4/2022, 8:49:08 AM] [WledPreset] Led Strip: Preset is set to 2

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version:
  • Node.js Version:
  • NPM Version:
  • Operating System:

Best way to handle preset selector after a off/on

On version 0.6.0 I decided to implement a default preset when powering on the device. I would like to use this thread to gather feedback and know what would be the best way to handle the WLED behaviour described below and suit everyone's needs.


What is happening
When starting a WLED device, the preset returned by the API is 0 (i.e. but WLED displays colours from the last preset displayed before being turned off). You can reproduce this behaviour directly through the WebUI of your WLED, after off/on cycle no presets are selected.

The issue
There is no way for the plugin to know which preset is used after a off/on cycle. But I would like that the plugin is able at all time to tell on which preset your WLEDs are set.

Partial fix
On version 0.6.0, I decided that at each power cycle a default preset will be selected (i.e. at the moment it is hardcoded to the preset nb 1).


Please vote the solution you prefer the most:

  1. In the config file, implement a value to select the defaut preset used by the WLED device
  2. A way to switch off this new behaviour (default preset when switching on), and display in the preset selector a "preset undefined" selector for the value 0

Feel free to comment with your thoughts on this and/or if you have additional ideas on how to handle this.

"This plugin slows down HomeBridge"

Describe The Bug:
I get the message (pasted below in the logs section) aside from this message, when controlling the WLED LED Strip, the LED can hang after switching presets. but sometimes the dial does not appear to change presets, at which I have to "Remove Single Cached Accessory".

To Reproduce:
Install the plugin, and link to my WLED LED Strip.

Expected behavior:
I've had the plugin working fine in the past few weeks. I could change presets in the dial, but now sometimes the dial does not appear, or only the first 3 presets off appear in the dial. Once after a reinstall of the plugin and "Remove Single Cached Accessory" I only have preset 11 to 14.

Logs:

[1/18/2022, 5:23:13 PM] [homebridge-wled-preset] This plugin slows down Homebridge. The read handler for the characteristic 'Active' was slow to respond! See https://git.io/JtMGR for more info.
[1/18/2022, 5:23:13 PM] [homebridge-wled-preset] This plugin slows down Homebridge. The read handler for the characteristic 'Active Identifier' was slow to respond! See https://git.io/JtMGR for more info.

Plugin Config:

        {
            "wleds": [
                {
                    "name": "LED Strip",
                    "ip": "10.0.4.176",
                    "presetsNb": 14
                }
            ],
            "platform": "WledPreset"
        }

Environment:

  • Plugin Version: v0.5.3
  • Homebridge Version: v1.3.9
  • Node.js Version: v16.13.2
  • NPM Version: v8.1.2
  • Operating System: Docker

State of development

Hi,

I've started using this and it has been great, but with a few quirks.

Is development on this is continuing? Is the Development branch stable enough to use?

Thanks!

Presets do not work properly if there is a playlist setup

With the changes made in previous issues, you can now define the number of presets. However WLED has a feature called playlist which actually shows up as a preset, but it allows you to toggle between different presets. For example, if you have 2 presets, and create a playlist, number 3 in your list of presets will be a playlist. This playlist could alternate between presets 1-2 and have them play for 5 seconds and alternate to the next preset.

The issue here is I defined 3 presets in wled preset and 3 presets show up in HomeKit. I created 2 presets and I created a playlist. My playlist (which shows up in WLED as preset 3) alternates between preset 1 & 2 in WLED. If I select Preset 1 in wled-preset from HomeKit, Preset 1 executes. If I select Preset 2 in wled-preset from HomeKit, Preset 2 executes. If I select Preset 3 in wled-preset, my playlist executes. However once I execute Preset 3 in wled-preset, my wled lights will never stop playing that preset. Selecting Preset 1 or Preset 2 in wled-preset does not work. The Power button does work, but when I power the lights back on, they continue to run the playlist.

I am running WLED 0.13.0-b5 if that helps.

Plugin struggle to load new features after update

After a restart or update the plugin seem to struggle to load the new feature/changes applied on the devices/plugin.
This might be related with the way the UUID is being generated, as at the moment it is based on the IP address of the device. To investigate...

A new instance of the same WLED accessory is not recognized as the previous one

I am intermittently seeing an issue with WLED-preset if one of my wled controllers is crashed or off the network. Occasionally WLED seems to crash and is unreachable. If that happens, it reorders my WLED controllers in HomeKit. I setup automations in HomeKit to turn the lights on at sunset. When this problem happens HomeKit sees another WLED controller as the missing one and issues automation to that controller instead. Rebooting the down WLED controller does not fix it. The only fix is to restart homebridge and the WLED controller that was down gets discovered as a whole new controller which needs to be setup again in HomeKit. I have five digiquads and they were all configured in WLED-preset. The controllers have static ips so it is not an IP address problem.

Give Presets names that show up in homekit instead of Preset 1, Preset 2 ....

Hi Goodshort,

If you ever decide to continue on this project I would love it if you added the option to give presets names.
You could just add an array in the config file from which you take the names instead of how you do it now. One variable which would be what you have now by default and if people add names you can check the amount of items in the array by the number of presets given, and you can pass that through to homebridge and so on to homekit so the presets would be displayed accordingly to their names.

//By default the preset names will be Preset 1, Preset 2 and so on but you can change them down below, though make sure to add the correct number of names!
presetnames: [
"Rainbow",
"White",
"Blue",
"Ambient"
]

I trust you know how to code this but just an idea of how it would look!

Good luck coding and remember to have fun while doing it!

Only 3 Presets are visible in HomeKit

I only have 3 presets available to select from in the HomeKit app although I have entered 6 in the HomeBridge Config. I've tried this multiple times even with a different ESP board for WLED but no luck. I only ever get to chose the first 3 presets.

Plugin Config:

        {
            "name": "Jeriel's LED Strip",
            "ip": "10.0.4.176",
            "presetNames": [
                {
                    "presetNb": 1,
                    "name": "Fireworks"
                },
                {
                    "presetNb": 2,
                    "name": "Peachy"
                },
                {
                    "presetNb": 3,
                    "name": "Ice Fire"
                },
                {
                    "presetNb": 4,
                    "name": "Fire"
                },
                {
                    "presetNb": 5,
                    "name": "Aurora"
                }
            ],
            "platform": "WledPreset"
        }

Screenshots:
IMG_4D417F9ED714-1

Environment:

  • Plugin Version: v0.1.1
  • Homebridge Version: v1.3.8
  • Node.js Version: v14.18.0
  • NPM Version: v6.14.15
  • Operating System: Docker

Default state should be off

At the moment the default state of the WLED accessories is on when restarting the plugin or adding a new accessory.

The default state should be off, and lights should not be turning "on" on their own.

This was raised on issue post #13

Homebridge shutting down

Homebridge shutting down.

Jan 26 14:12:36 homebridge homebridge[3126]: [26.1.2022, 14:12:36] [WledPreset] Presets (KΓΌche): Preset is set to 0
Jan 26 14:12:38 homebridge homebridge[3126]: [26.1.2022, 14:12:38] [WledPreset] Presets (Wall): Preset is set to 0
Jan 26 14:12:39 homebridge homebridge[3126]: [26.1.2022, 14:12:39] [WledPreset] Presets (Panel): Preset is set to 0
Jan 26 14:12:39 homebridge homebridge[3126]: [26.1.2022, 14:12:39] [WledPreset] Presets (KΓΌche): Preset is set to 0
Jan 26 14:12:53 homebridge homebridge[3126]: [26.1.2022, 14:12:53] Error: read ETIMEDOUT
Jan 26 14:12:53 homebridge homebridge[3126]: at TCP.onStreamRead (node:internal/stream_base_commons:220:20)
Jan 26 14:12:53 homebridge homebridge[3126]: [26.1.2022, 14:12:53] Error: read ETIMEDOUT
Jan 26 14:12:53 homebridge homebridge[3126]: at TCP.onStreamRead (node:internal/stream_base_commons:220:20)
Jan 26 14:12:53 homebridge homebridge[3126]: [26.1.2022, 14:12:53] Error: read ETIMEDOUT
Jan 26 14:12:53 homebridge homebridge[3126]: at TCP.onStreamRead (node:internal/stream_base_commons:220:20)
Jan 26 14:12:53 homebridge homebridge[3126]: [26.1.2022, 14:12:53] Error: read ETIMEDOUT
Jan 26 14:12:53 homebridge homebridge[3126]: at TCP.onStreamRead (node:internal/stream_base_commons:220:20)
Jan 26 14:12:53 homebridge homebridge[3126]: [26.1.2022, 14:12:53] Error: read ETIMEDOUT
Jan 26 14:12:53 homebridge homebridge[3126]: at TCP.onStreamRead (node:internal/stream_base_commons:220:20)
Jan 26 14:12:53 homebridge homebridge[3126]: [26.1.2022, 14:12:53] Error: read ETIMEDOUT
Jan 26 14:12:53 homebridge homebridge[3126]: at TCP.onStreamRead (node:internal/stream_base_commons:220:20)
Jan 26 14:12:53 homebridge homebridge[3126]: [26.1.2022, 14:12:53] Error: read ETIMEDOUT
Jan 26 14:12:53 homebridge homebridge[3126]: at TCP.onStreamRead (node:internal/stream_base_commons:220:20)
Jan 26 14:12:53 homebridge homebridge[3126]: [26.1.2022, 14:12:53] Got SIGTERM, shutting down Homebridge...

{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:33",
"port": 51843,
"pin": "031-45-154",
"manufacturer": "@koerby",
"model": "Homebridge",
"serialNumber": "0.4.50"
},
"accessories": [],
"platforms": [
{
"platform": "Sonoff",
"name": "Sonoff",
"devices": [
{
"name": "Lavalampe",
"hostname": "192.168.1.110"
},
{
"name": "Wand Nord",
"hostname": "192.168.1.109",
"relay": "3"
},
{
"name": "Wand SΓΌd",
"hostname": "192.168.1.109",
"relay": "4"
},
{
"name": "Rasensprenger Hinten 1",
"hostname": "192.168.1.107",
"relay": "3"
},
{
"name": "Rasensprenger Hinten 2",
"hostname": "192.168.1.107",
"relay": "2"
},
{
"name": "Rasensprenger Vorne",
"hostname": "192.168.1.107",
"relay": "4"
},
{
"name": "Terassenstrahler",
"hostname": "192.168.1.108",
"relay": "1"
}
]
},
{
"name": "Config",
"port": 8068,
"auth": "none",
"theme": "green",
"restart": "sudo systemctl restart homebridge-mihub2",
"temp": "/sys/class/thermal/thermal_zone0/temp",
"tempUnits": "c",
"loginWallpaper": "/home/pi/Downloads/APPLE-HOME-KIT-04.jpg",
"sudo": true,
"platform": "config"
},
{
"platform": "WLED",
"wleds": [
{
"name": "WLED JUMPER",
"host": "192.168.1.44",
"effects": [
"Rainbow Runner",
"Candle Multi",
"Circus",
"Palette",
"Running"
],
"log": true
},
{
"name": "WLED Dart",
"host": "192.168.1.50",
"effects": [
"Rainbow Runner",
"Candle Multi",
"Circus",
"Palette",
"Running"
],
"log": true
},
{
"name": "WLED WALL",
"host": "192.168.1.67",
"effects": [
"Rainbow Runner",
"Candle Multi",
"Circus",
"Palette",
"Running"
],
"log": true
},
{
"name": "WLED KUECHE",
"host": "192.168.1.23",
"effects": [
"Rainbow Runner",
"Candle Multi",
"Circus",
"Palette",
"Running",
"Twinklefox"
],
"log": true
},
{
"name": "WLED PANEL",
"host": "192.168.1.88",
"effects": [
"Rainbow Runner",
"Candle Multi",
"Circus",
"Palette",
"Running"
],
"log": true
}
]
},
{
"wleds": [
{
"name": "Presets (Wall)",
"ip": "192.168.1.67",
"presetsNb": 6
},
{
"name": "Presets (Panel)",
"ip": "192.168.1.88",
"presetsNb": 21
},
{
"name": "Presets (KΓΌche)",
"ip": "192.168.1.23",
"presetsNb": 5
}
],
"platform": "WledPreset"
}
]
}

Environment:

  • Plugin Version:
  • Homebridge Version: 1.3.8
  • Node.js Version: 16.13.2
  • NPM Version: 8.3.0
  • Operating System: Raspbian

Plugin Says Update is available

When I go into the Plugin it says there is an update available. It says 0.5.3 is available when GitHub shows the latest at 0.5.0. Not sure if something is out of sync, but I figured I'd post an issue for it if it helps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.