Giter Club home page Giter Club logo

homeassistant-wled-card's Introduction

WLED Hassio Lovelace Card

First of all big thanks to Aircoookie and his incredible work at the WLED repo, without it this wouldn't be possible!

Test

Installation Guide

  1. Set up MQTT Broker for WLED (restart after setting it)

Guide: https://www.home-assistant.io/addons/mosquitto/

  1. Download libs and put them into config/www/lib on your hassio/config
  1. Clone repo and put it under www/wled_control/

  2. Add this to ressources in config/lovelace.ui.yaml

  - url: /local/lib/tingle.min.css
    type: css
  - url: /local/wled_control/static/wled.css
    type: css
  - url: /local/wled_control/static/effects.js
    type: js
  - url: /local/wled_control/static/fastLEDPallete.js
    type: js
  - url: /local/lib/tingle.min.js
    type: js
  - url: /local/lib/iro.min.js
    type: js
  - url: /local/wled_control/wled_control.js
    type: module

  1. Add the custom card like this

Note: IP is needed to load the initial state of WLED since we don't save the state in hassio all communication with the led will happen by MQTT-Messages

- type: custom:wled-control-card
        topic: "wled/[MQTTCHANNEL]"
        ip: "[WLEDIP]"
        title: WLED Strip
        

Troubleshooting

Example lovelace.config.yaml

title: Home
resources:
  - url: /local/lib/tingle.min.css
    type: css
  - url: /local/wled_control/static/wled.css
    type: css
  - url: /local/wled_control/static/effects.js
    type: js
  - url: /local/wled_control/static/fastLEDPallete.js
    type: js
  - url: /local/lib/tingle.min.js
    type: js
  - url: /local/lib/iro.min.js
    type: js
  - url: /local/wled_control/wled_control.js
    type: module

views:
    # View tab title.
  - title: MyLoveLaceUi
    cards:
      - type: custom:wled-control-card
        topic: "wled/lamp1"
        ip: "192.168.0.94/"
        title: lamp1
      - type: custom:wled-control-card
        topic: "wled/lamp2"
        ip: "192.168.0.95/"
        title: lamp2

Resulting folder/file structure

  /wwww
    /wled_control
      /static
        effects.js
        fastLEDPallete.js
        wled.css
      wled_control.js
    /lib
      iro.min.js
      tingle.min.css
      tingle.min.js
  ui-lovelace.yaml

Still got problems?

Report the issue via github and I will try to help you!

homeassistant-wled-card's People

Contributors

marvinwalther avatar shaegi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homeassistant-wled-card's Issues

Custom element doesn't exist: wled-control-card

OK still learning Home assistant
Version: HassOS 3.12

Added to raw configuration editor:
resources:

  • type: css
    url: /lib/tingle.min.css
  • type: css
    url: /wled_control/static/wled.css
  • type: js
    url: /wled_control/static/effects.js
  • type: js
    url: /wled_control/static/fastLEDPallete.js
  • type: js
    url: /lib/tingle.min.js
  • type: js
    url: /lib/iro.min.js
  • type: module
    url: /wled_control/wled_control.js

Added to config folder:
lib folder containing:
lib folder

Added to wled_contol
image

My tree is like this:
image

I added the card and and getting Custom element doesn't exist: wled-control-card
image

When I go in chrome and look at the errors I get 404 files not found
image

In firefox I get get this error saying it was block
image

Nothing is SSL and I don't see anything related in the other issues (or I missed it)

I have restore to a version before I tried this and redid everything still with no luck.

All the paths appear to be correct. Really stumped on this one.

Looking for where to start.

Thanks

fixed

Hi there, sorry im not used to github this is my first time using it to showcase some work.
I fixed the broken version of this where javascript modules refused to load and I have also found a small workaround for the https issue where a secured home assistant instance cant access a WLED on HTTP.
my code and some bad instructions can be found at https://github.com/jake92918/Homeassistant-WLED-Card

for those interested in the https fix:
install the nginx proxy manager.
add a proxy host using an external IP or internal

for internal/Lan:(
domain name = ip of homeassistant server
scheme = https
forward hostname/ip = ip of homeassistant server
forward port = port of homeassistant [usually 8123]
websockets support = on

under custom locations add
location = /anyword you want
scheme = HTTP
forward hostname/ip = ip of WLED server
forward port = 80

under SSL add:
make a new SSL certificate
)

for external/Wan:(
domain name = wan ip or dns hostname
scheme = https
forward hostname/ip = lan ip of homeassistant server
forward port = port of homeassistant [usually 8123]
websockets support = on

under custom locations add
location = /anyword you want
scheme = HTTP
forward hostname/ip = localip of WLED server
forward port = 80

under SSL add:
make a new SSL certificate
)

then on line 33 of wled_control.js where it says fetch('http://${this.config.ip}/win', {
change it to fetch('https://${this.config.ip}/win', {

lastly when you add the card put

"
type: 'custom:wled-control-card'
topic: *wled/mqqt-topic
ip: hostname or ip of WLED server
title: WLED Strip
"

ip should be whatever you used for nginx proxy in the domain field followed by / and what you put for custom location field
an example of what the ip should be is example.com/wledserver.
thanks

HomeAssistant iOS App

The card works fine on my MacBook with Firefox. But when I use the iOS app, the card remains blank. Is there a solution for this or is it a problem with the app?

WLED with HA integration?

Hello I added all the files into my www folder but I m getting this:
image

here is the my resource file:
image

Icon Change?

Is there a way to change the icon? Seems to be defaulted to the lamp, as Lamp123. Is there any way to change the icon to something else?

can someone tell me what i need to add to the lib folder??

hey guys,

i am a rookie to hassio

and i made a wled controller yesterday.

now i want it to add this controlpanel to my hassio.
but i cant figure out what to add to the lib folder.
can someone help me out?
maybe with sharing a screenshot?

or something?

kind regards
damian

Blank Card

I feel this issue is related, at least I have the same results so far. I've added the light to my config.yaml, I can control it from the unused entities section (when I don't have it tied to the card) but the card doesn't even show up unless I'm in the UI Editor.

From my config.yaml:
light:
- platform: mqtt
name: "striplights1"
brightness_state_topic: "wled/1/g"
rgb_state_topic: "wled/1/c"
command_topic: "wled/1"
brightness_command_topic: "wled/1"
rgb_command_topic: "wled/1/col"
rgb_command_template: "{{ '#%02x%02x%02x' | format(red, green, blue)}}"
effect_command_topic : "wled/1/api"
effect_list:
- "[FX=00] Solid"
- "[FX=01] Blink"
- "[FX=02] Breathe"
- "[FX=03] Wipe"
....

And the custom card code:
cards:
- entity: light.striplights1
ip: 192.168.xxx.xxx
title: WLED Strip 1
topic: wled/1
type: 'custom:wled-control-card'

I'm hoping it's a simple issue somewhere that I've just missed now that I'm thinking it's more complicated, but who knows... Any support would be great! Thanks!

Lock dependencies and build project

As mentioned in #6 and #13 there are a lot of problems with integrating the dependencies separatly. It will be a huge advantage to bundle dependencies (via webpack or something else) right into one file and get this one loaded by HASSIO instead of multiple files.

Error in Home Assistant

I'm most likely doing something stupid but i get this error
You need to define an entity
{
"type": "custom:wled-control-card",
"topic": "wled/stripone",
"ip": "192.168.86.32",
"title": "WLED Strip"
}

This is my yaml code
cards:

  • type: vertical-stack
    cards:
    • type: horizontal-stack
      cards:
      • type: custom:wled-control-card
        topic: "wled/stripone"
        ip: "192.168.86.32"
        title: WLED Strip

Error when adding card

Hi
just trying the card for WLED

when i add teh config, its says its missing the entity, if i add the entity for the wled strip, then get a blank display

in regrads to adding the resource to my lovelaceui-yaml, there are some resources in the example that are missing, do i need to download those?

Blank in Lovelace

Hello. Thanks for this. Trying to get it working, but with the card is blank and not shown once I save my lovelace config.

Using MQTT Explorer, I have two topics related to my WLED controller:
image
I have tried setting both in the lovelace card, but nothing works.
I have also tried moving the files to www/community and changing the lovelace resources to reflect that - same result.

Any ideas why it might be completely blank?

I am using hass.io on a VM and have used the WLED integration in HA to discover and integrate my WLED controller. I am running WLED on a ESP32 device.

Thanks in advance.

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.