Coder Social home page Coder Social logo

cyanlabs / esp-mqtt-json-digital-leds Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bruhautomation/esp-mqtt-json-digital-leds

18.0 18.0 5.0 871 KB

ESP MQTT Digital LEDs for Home Assistant's MQTT JSON Light Component. Supports flash, fade, transitions, effects, and OTA uploading!

Home Page: https://youtu.be/9KI36GTgwuQ

License: Apache License 2.0

C++ 100.00%

esp-mqtt-json-digital-leds's People

Contributors

0nikola1 avatar bilalasd avatar brahmafear avatar bruhautomation avatar cribbstechnologies avatar dramamoose avatar fma965 avatar fohdeesha avatar haleefacts avatar landrash avatar

Stargazers

 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

esp-mqtt-json-digital-leds's Issues

MQTT connection problem

I have the same problem with this code as with the original one with Bruh. Continuous MQTT reconnects.

Here is the serial monitor:
......... WiFi connected IP address: 192.168.5.112 Ready Attempting MQTT connection...connected Setting LEDs: r: 0, g: 0, b: 0 Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-4 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-4 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-4 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds

And here is mosquitto log:
1550323869: New client connected from 192.168.5.112 as tupa_allasvalo (c1, k15, u'mqttclients'). 1550323890: Client tupa_allasvalo has exceeded timeout, disconnecting. 1550323890: Socket error on client tupa_allasvalo, disconnecting.

just no clue wtf is wrong

copied the updated code...still nothing..same thing..doesn't work
im on HA 0.97.2
python 3.7

Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
base_url: example.duckdns.org:8123
Text to speech

tts:

platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
mqtt:
broker: your.mqtt.ip.address
port: 1883
client_id: home-assistant-1
username: YOURUSERNAME
password: YOURPASSWORD

light:

  • platform: mqtt
    schema: json
    name: "RGB Light Strip 1"
    state_topic: "home/RGBStrip1"
    command_topic: "home/RGBStrip1/set"
    rgb: true
    availability_topic: "home/RGBStrip1/LWT"
    white_value: true
    effect: true
    effect_list:
  • solid
  • Music - L2R
  • Music - Middle
  • Music - Fma965
  • bpm
  • candy cane
  • confetti
  • cyclon rainbow
  • dots
  • fire
  • glitter
  • juggle
  • lightning
  • noise
  • police all
  • police one
  • rainbow
  • rainbow with glitter
  • ripple
  • twinkle
  • sinelon
  • sine hue
  • full hue
  • breathe
  • hue breathe
  • Christmas
  • christmas alternate
  • random stars
  • St Patty
  • Valentine
  • Turkey Day
  • Thanksgiving
  • USA
  • Independence
  • Halloween
  • Go Lions
  • Hail
  • Touchdown
  • Punkin
  • Lovey Day
  • Holly Jolly
    brightness: true
    optimistic: false
    qos: 0

and this are the errors:

2019-08-20 16:16:40 ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] while parsing a block collection
in "C:\Users\olire\AppData\Roaming.homeassistant\configuration.yaml", line 24, column 5
expected , but found '?'
in "C:\Users\olire\AppData\Roaming.homeassistant\configuration.yaml", line 25, column 5
2019-08-20 16:16:40 ERROR (MainThread) [homeassistant.bootstrap] Error loading C:\Users\olire\AppData\Roaming.homeassistant\configuration.yaml: while parsing a block collection
in "C:\Users\olire\AppData\Roaming.homeassistant\configuration.yaml", line 24, column 5
expected , but found '?'
in "C:\Users\olire\AppData\Roaming.homeassistant\configuration.yaml", line 25, column 5
newest 0.97.2
python 3.7

Animation Freezes upon internet/wifi disconnection

My problem is when ever the wifi/internet disconnects the animation freezes only to resume after the wifi/internet is back.

In India where data disconnection is very frequent with all ISPs it is a big problem, is there any way out of this?

Wiring on my end, just not right...

Hello, I have tried for 2 days to get this hooked up and am so close. I have the upload and connection working from Arduino IDE, and can see the unit on my network and toggle switches from Hassio and see my switching across the serial monitor, just can’t get the LED strips to power up or respond. I am using the ones below.

https://www.amazon.com/gp/product/B01CNL6MNM/ref=ppx_od_dt_b_asin_title_o00_s01?ie=UTF8&psc=1

Any ideas? I’m guessing it can be something with my wiring.

Thanks in advance, Mike

Animation Speed, slider and switch

I also originally deployed the following code and it shows up on my Overview page, but does not control my strip. Any ideas if it should still work?

I know input_slider is now changed to input_number, and a few more changes I made below. Do the new changes effect it as well? Any help would be appreciated.

input_number:
led_animation_speed:
name: RGB Light Strip 1
initial: 150
min: 1
max: 150
step: 10

Animations.yaml

id: "Led Strip Animation Speed"
hide_entity: False
initial_state: True
trigger:
- platform: state
entity_id: input_number.led_animation_speed
action:
- service: mqtt.publish
data_template:
topic: "home/RGBStrip1/set"
payload: '{"transition":{{ trigger.to_state.state | int }}}'

Convert to cpp files then split file

Thank you for this project! You've taken it way further than the original. I was wondering if it's possible for you to convert this to cpp/h files? Not everyone uses the Arduino IDE but with cpp/h files you can use these on any IDE including Arduino. This would also help with splitting this monster of a file up so it can be maintained easier for everyone. I can help with this if you are interested. Thanks!

Json error

Is the arduino file updated to Jon 6?

how to fix this?

20190918_111418
Ani idea how to fix this? Do i need to go to yaml or arduino file for a fix? Im getting stuck full day and no results.

More code examples, functionality

Hello, thanks again for all of the help. My lights are up and running perfectly. Have you seen this website or looked into expanding to some more lighting effects? http://frederickvandenbosch.be/?p=267

Here is one of the examples, how could I implement it into my config:

// Light up the strip starting from the middle
void middleFill(uint32_t c, uint8_t wait) {
clearStrip();

for(uint16_t i=0; i<(dstrip.numPixels()/2); i++) { // start from the middle, lighting an LED on each side
dstrip.setPixelColor(dstrip.numPixels()/2 + i, c);
dstrip.setPixelColor(dstrip.numPixels()/2 - i, c);
dstrip.show();
delay(wait);
}

for(uint16_t i=0; i<(dstrip.numPixels()/2); i++) { // reverse
dstrip.setPixelColor(i, dstrip.Color(0, 0, 0));
dstrip.setPixelColor(dstrip.numPixels() - i, dstrip.Color(0, 0, 0));
dstrip.show();
delay(wait);
}
}

Add MSGEQ7 effects

This repo adds effects through the MSGEQ7 audio chip to make music go with lights. It works pretty well and integrating those parts into this project would be cool.

parseObject() failed

Attempting MQTT connection...connected
Setting LEDs:
r: 0, g: 0, b: 0
Message arrived [home/RGBStrip1/set] ON
parseObject() failed

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.