As for the flickering, add the capacitor and it should solve your problem.
If it doesn’t, you can also feed the power and ground at the other end of your strip (but not data!). Especially if you notice that the led at the end of your strip have a flickering problem.
I tried this already, seems like i get few colors alright now… I will have to take a look after i get 470ohm ressistor today.
Also about the powering of the strip… Do I have to cut the strip in pieces to power it again, or I just take +and- from power to the end of the strip?
So the connection would go like this:
+and- from power to the beginning and the same +and- to the end of the strip? So the strip would be powerd on both sides? Data pin goes from the beginning only.
Also wich capacitor to use? I found some 1000 uF 16V?
That capacitor should be fine. Personally I’ve always used the color order: GRB for ws2812b (neopixels.) Yes you can just reapply the power to the leads on the back end of the strip and the data to the first pin.
On my way home I bought resistor and capatitor, but when I connected all of that, only few leds lighted up (only first 10 or so). So i removed ressistor, and whole strip lighted up, but flickerd like hell! I removed capatitor, and left power on both ends of the strip. Strip works but with the same old gliches. Also when I try to reduce brightnes, it changes colors instead of brightnes .
This is realy starting to stress me out!
Did you make other modification to the code? Did you try changing the effect speed? Maybe try to see if home-assistant is not sending too much command (check the log).
Really weird problem. Maybe the clock speed of your node mcu is off? Which would explain the weird communication on the data line (timing is important for those strip as they don’t have any clock line)
Finaly managed to get some better results.
I still get flickering, but not so much. I had bunch of ressistors at home so I tryed them on data pin, and with one of those (don’t know the ressistance of it) seems to work better. When i installed 470ohm resistor, only few leds lighted up… And finaly i managed to sort out color order (it is GRB). Also brightness started to work out as it should, no longer changes color when i adjust brightnes.
So, i have some promising results, but still get flickering. I did install the capatitor too, but only one capatitor for both ends of the strip. Meybe I should connect seperate capatitor for both ends of the strip?
I have separate outputs on the power supply, meybe I shuld use both of them? Its 5V 12A power supply with 2+ and 2- output on it. Curently I have all connected on 1 output.
I was just about to post this, but just the #define FASTLED_INTERRUPT_RETRY_COUNT 0 as the other one casued me reboot issues.
I have had all sorts of issues with my kitchen ones, because there was so much space between 2 sets of LEDS the data signal dropped that much I had huge flickering. So I split them, with 2 nodeMCUs, 1 each side of the kitchen cupboards.
I still had to remove the 3.3v to 5v converter as that also caused issues on 1 part of the LEDs, drove me crazy trying to sort it.
That finaly worked out, but as @MarkR said, I got some restart issue, so ill try it without
#define FASTLED_ALLOW_INTERRUPTS 0
Ill make some video later today, when I’m back home from work.
Thank you all for helping me out, I will put my config and sketch on github and link it here for future use, meybe it will help others with similar project.
Edit: here is the video of new sketch.
Sry about the quality, just couldn’t wait to get home so I had this filmed with lower quality phone…
You might have problem with the precise timing needed to control those led with the addition of a temperature sensor.
Honestly you’d better spend 4,70$ and buy a Wemos D1 + a SHT30 shield, that will give you a precise temperature sensor (with humidity as a bonus) and you won’t be messing with your current installation
Will order those too!
My xiaomi gateway should come this week, so meybe i won’t be needing another temp sensor.
The lights finaly work as they should, it would be awsome to sync them to music…Is there a way to do it?
The music would come from kodi box (PI 3) already added to HA (HA has dedicated PI3 box).
everything works here,and i understand.
what i dont understand and doesnt work is this :
service: mqtt.publish
data_template:
topic: “bruh/porch/set”
payload: ‘{“transition”:{{ trigger.to_state.state | int }}}’
i try to publish in mqtt,i try to publish in services in hass…nothing happens
any idea how to use this command?? and is this for random loop effects?
Never seen a way to do that. Not through HA at least. Maybe Kodi could control a light through mqtt, but you’ll have to see with the Kodi team.
You can add an input number inside your RGB traka group (define the input_number somewhere and then add - input_number.strip_brightness as entity in the RGB traka group)
I didn’t test it myself, so they might be some adjustment needed ^^ don’t forget to replace the entity_id in the automation with the name of your lamp.