muxa / esphome-wled-output Goto Github PK
View Code? Open in Web Editor NEWControl external WLED from ESPHome
Control external WLED from ESPHome
Issue Description:
I am experiencing difficulty updating my working configuration due to the error described below.
Error Message:
error: invalid cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'unsigned int'})
Related Issues:
I found similar issues at:
Environment Information:
ESPhome Version: 2023.12.5
Platform/Operating System: Home Assistant
Configuration Files:
light:
- platform: wled_output
id: starlights
address: 192.168.178.134
num_leds: 100
default_transition_length: 0ms
effects:
- automation:
name: udp
sequence:
- light.control:
id: starlights
brightness: 100%
red: !lambda |-
return id(strip).remote_values.get_red();
green: !lambda |-
return id(strip).remote_values.get_green();
blue: !lambda |-
return id(strip).remote_values.get_blue();
- delay: 100ms
Logs:
INFO ESPHome 2023.12.5
INFO Reading configuration /config/esphome/tonie-wheel.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing tonie-wheel (board: d1_mini; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
|-- Wire @ 1.0
|-- NeoPixelBus @ 2.7.3
Compiling .pioenvs/tonie-wheel/src/esphome/components/wled_output/light/wled_light_output.cpp.o
Compiling .pioenvs/tonie-wheel/src/main.cpp.o
In file included from src/esphome/components/wled_output/light/wled_light_output.cpp:3:
src/esphome/components/wled_output/light/wled_light_output.h: In member function 'void esphome::wled::WLEDLightOutput::set_address(esphome::network::IPAddress)':
src/esphome/components/wled_output/light/wled_light_output.h:62:77: error: invalid cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'unsigned int'}
62 | void set_address(network::IPAddress address) { this->address_ = IPAddress((uint32_t)address); }
| ^~~~~~~~~~~~~~~~~
*** [.pioenvs/tonie-wheel/src/esphome/components/wled_output/light/wled_light_output.cpp.o] Error 1
In file included from src/esphome.h:71,
from src/main.cpp:3:
src/esphome/components/wled_output/light/wled_light_output.h: In member function 'void esphome::wled::WLEDLightOutput::set_address(esphome::network::IPAddress)':
src/esphome/components/wled_output/light/wled_light_output.h:62:77: error: invalid cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'unsigned int'}
62 | void set_address(network::IPAddress address) { this->address_ = IPAddress((uint32_t)address); }
| ^~~~~~~~~~~~~~~~~
*** [.pioenvs/tonie-wheel/src/main.cpp.o] Error 1
========================== [FAILED] Took 2.52 seconds ==========================
Any advice is welcome.
I've built a garage door controller in ESPHome.
I currently have an automation running in Home Assistant that sets WLED presets based on the state of the garage door. LED Effects like this
- if:
- condition: state
entity_id: light.wled_mikes_door
state: "off"
then:
- service: light.turn_on
data: {}
target:
entity_id: light.wled_mikes_door
- service: select.select_option
target:
entity_id: select.wled_preset
data:
option: " Mike red flash"
I'd love to be able to take HA out of the equation and control the presets directly from ESPHome. This way if HA is down for whatever reason, the light automation could still be run.
In WLED There are 2 segments (for 2 doors) and presets used for the effects.
Is this something that can be done with this component?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.