Comments (4)
you have to use trigger ? when ur esp goes online turn on the light ?
from esp-mqtt-json-digital-leds.
So you are implying that the strip is off when powered on just because the current state in home assistant is off (because is goes to off when esp is pulled offline)?
I will try an automation which sets the strip state to on and use esp onlinestatus as trigger.
But, isn't this going to rely on the device_tracker monitoring the esp? I dont want this because my tracker only checks status every 30 seconds and i intend to keep it that way.
Compare this to a meelight or yeelight smartbulb: They do not depend on home assistant and device tracking. When i give them power via a regular wall switch they light up and then report current state to home assistant.
I want the same for this led-strip: To be able to set the initial state to on, this will then report to home assistant via MQTT with the correct state.
from esp-mqtt-json-digital-leds.
can you leave the code so us (little rusty) to use it ?? and also can you do random effects in the loop ?? because i think will be boring same order effects non stop. i wish i can find like 100+ effects that work with this bruh automation so more choice-the better.
from esp-mqtt-json-digital-leds.
@encor50
Got it sorted out! One word in the code did the trick.
Look for these lines: (note that the initial state is set to false)
/******************************** GLOBALS for fade/flash *******************************/
bool stateOn = true; //true = Strip ON when powered on. false = strip OFF when powered on
@bruhautomation: It would be awesome if you could add this comment in your code to make is easier for newcomers to find this tweak.
from esp-mqtt-json-digital-leds.
Related Issues (20)
- OTA not working HOT 1
- ArduinoJSON Library has breaking changes. HOT 4
- inconsistent colors HOT 2
- Compiling error 'StaticJsonBuffer' was not declared in this scope HOT 2
- LEDs will not light up with this script. MQTT works, Circuit tested with another script and works HOT 3
- Lights turning off/freezing (already tried encor50's fix).
- Last Will Message - Availability HOT 5
- Problem with Home Assistant HOT 2
- Animation Freezes upon internet/wifi disconnection HOT 1
- MQTT_MAX_PACKET_SIZE in PubSubClient 2.7.0
- Only Lightning/Dots effects not working properly
- Outdated codes and not getting the leds to turn on
- Home Assistant Integration HOT 1
- ESP8266 realted
- Decrease brightness when switching the effect to solid
- how do i get rid of this
- Cyclon rainbow crashing MQTT HOT 11
- Incorrect colors HOT 1
- Animation speed not working HOT 3
- Need help, strip not lighting up
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-mqtt-json-digital-leds.