Hmm. I am rather confused by the wiring / config of these lights. I bought the normal straight string last week and did a quick test run on Wednesday just by plugging them in a pressing the button (didn’t try the app yet) to see what the effects looked like. I’m guessing the lights are the same as the tree ones just in a single string rather than multiple lengths. Some effects turn on only parts of the string in sequence, others have a rainbow colour effect. So these make me think there must be some sort of addressable function going on rather than just the setup shown in that link to the 2-wire LED’s you had originally posted… what are your thoughts on this? Does your tree version have the same effects using the stock firmware?
there are 8 listed functions on the stock firmware.
- Combo
- in waves
- Sequential
- slow glow
- chase and flash
- slow fade
- twinkle and flash
- steady on
I would agree the wiring is probably the same. There is perhaps a fine voltage control that gives the chase style option, (so perhaps that is how they are achieving part of the string coming on) Although I don’t really recall from when I tested the different functions on stock to confirm that was happening.
Steady on works with this yaml, but only allows switching of channels as brightness slider is moved. not dimming. I should probably upload some gifs
edit: well guess uploads ain’t happening. stuck in a bootloop now.
editt2: got it back, had to slide the dimmer slider around abit in between boots
esphome strobe
esphome various slide positions
tasmota scheme 4, it may not look it, but the tasmota one is heaps faster.
It’s not clear to me what’s happening there, but a few comments on what I provided. I mentioned that it would only cross-fade betwen the (two?) colors, no brightness control. This was just a test to verify that the PWM outputs are synchronized and that this method does work with the lights. I think the speed issue is because there’s a default fade time of 1s for the light control. If you add “default_transition_length: 0s
”, you should get instant changes. Also, you can try the “strobe” effect which will instantly switch between the two sides.
Yep, I wasn’t expecting brightness control as it was. My comment was more a statement of what was occurring.
So of the 3 gifs I linked.
No. 1 is using the strobe effect from your code. as you say, switches between the channels.
No. 2 is just sliding the slider around to various positions on the slider bar.
No. 3 is the scheme 4/strobe effect from tasmota. Scheme 4 strobes and fades as far as I know, so really just a combo effect. I haven’t been able to find a definitive answer on what it is doing.
The speed is not of a concern.
So overall yes the code functions as expected on the lights.
Now I just have to figure out how it should show up in HA. I guess I’ll just make it two separate monochrome lights.
Something to try. Add these sections:
globals:
- id: colorlevel
type: float
initial_value: '0'
restore_value: no
- id: brightlevel
type: float
initial_value: '0'
restore_value: no
script:
- id: calc_outputs
then:
- output.set_level:
id: output1
level: !lambda return id(colorlevel) * id(brightlevel);
- output.set_level:
id: output2
level: !lambda return 1 - ((1 - id(colorlevel)) * id(brightlevel));
Change the template outputs to this:
- platform: template
id: colorval
type: float
write_action:
- globals.set:
id: colorlevel
value: !lambda return state;
- script.execute: calc_outputs
- platform: template
id: brightval
type: float
write_action:
- globals.set:
id: brightlevel
value: !lambda return state;
- script.execute: calc_outputs
And the lights to this:
light:
- platform: monochromatic
name: "color"
id: color
output: colorval
gamma_correct: 1
default_transition_length: 0s
effects:
- strobe:
- platform: monochromatic
name: "brightness"
id: bright
output: brightval
default_transition_length: 0s
effects:
- strobe:
This will cause two “lights” to show up in HA. One for the brightness and one for the color. I’m not too happy with my testing. It seems a little glitchy, so I suspect it might require creating a real component.
I added flicker in also.
With brightness set to flicker and color set to strobe. it gets similar results to the first gif I posted previously, except with brightness control. on1-on2, on1-on2, on1-on2.
If both are set to strobe it does on1-on2-off, on1-on2-off. Which I assume is the glitchiness you were referring too.
Both set to flicker bugs it out abit.
Both set to strobe would be weird. You’re switching colors and switching it on and off at different times.
The glitchiness is just that the lights don’t always seem to follow what they’re being set to.
yes effects can be removed from the 1st channel, brightness. So with just a brightness slider in brightness you can adjust the actual brightness.
With the brightness slider that is in the color light, it will switch between channels as you slide it around. you can vary it between channel1, channel2, or both, but it is not linear as to what the results will in relation to slider position, except 0% will be 1 channel only and 100% will be the other channel only. Variations to the slider between 1-99% give results where it tries to have both channels on, and 50% will try for both on but often cuts out. That is with no effect on, (although I wouldn’t leave it on steady on with both channels comfortably in this setup, it might be ok, but seems abit dodgy)
With strobe on It will just try and jump to the other channel if the slider is moved and continue strobing.
The color channel light has no independent control of the power, and needs to be on to get the second channel of lights on. So functional power is on brightness, although if used alone only 1 channel will come on.
Has anyone had any of the CCT downlights or RGBW downlights apart or flashed them? I am curious if they are a viable of the shelf item as opposed to bringing in some zemismart downlights.
Benny, that is a completely different topic. Please start a new discussion for that.
@HasQT, that’s what I meant by glitchy. It’s not possible for it to cause any harm, but it’s also not so useful. Clearly it will require a dedicated component as the PWM is not sufficiently synchronized to work well.
My apologies reading back I probably wasn’t clear enough. It was the Mirabella genio downlights I was referring to, but I can start a new post if my question is inappropriate.
It’s fine Benny id say, we hijacked this thread really.
I haven’t flashed any of them myself.
https://blakadder.github.io/templates/light.html see if you can find them here. If you get em flashed with tuya-convert, figuring out a template should be pretty easy.
@BennyB44 I’m very sorry! I was brought in this discussion late and didn’t realize it was started with a very different topic.
Time for me to chime in as I’ve been watching this thread for a while.
I picked up 4x of these vintage G95 Genio tunable globes from Kmart yesterday https://www.kmart.com.au/product/mirabella-genio-wi-fi-dimmable-5w-led-bulb/2746328
Took me forever to figure out how to get them into config mode. I haven’t installed the Genio app by the way.
Turns out I needed to have it turned on for at least 10 seconds, then turn it off for about 5-10 seconds, and then on-off-on-off-on-off-on-off-on. (that’s on 5 times). Sometimes it would start to blink fast, other times it would blink only once, other times it wouldn’t blink at all, so I’m sure there is a more specific way to do it and I just managed to fluke it.
Anyway once I was there it was easy to run tuya-convert. I did find however that once the first step was done (the intermediate firmware) it wouldn’t reconnect. Tuya-convert timed out. I power cycled the bulb, which at this point was really dim. I then ran Tuya-convert again and it proceeded with the backup and then the flash.
Once I got Tasmota onto it, after some trial and error I found that the Calex 429036 G125 7,5W CCT template worked. Calex 429036 G125 7,5W CCT
So all good in the hood now, one more to add to our arsenal!
EDIT 22/12: Okay so now after playing a bit more, I still have the issue where the filaments still glow ever so slightly when toggled off. I can’t get to the bottom of that and I’d be interested to know if someone else picks up any of these bulbs if they do that with the stock firmware. I have however found out that they don’t really need the whole Calex template. The only settings they need is GPIO 12: PWM2 and GPIO 14: PWM1.
Excellent! Have you submitted this as a separate entry to blakadder so it is easy for others to find?
Not as yet but I intend to. Interestingly what I have found as 2 I’m using for bedside lamps, last night I noticed when they are switched off, the LED filaments give off just the faintest flickering glow. This is not just residual, it’s as though they are still powered, but the smallest current. Unfortunately I don’t have a non-flashed bulb to compare with now, but I do have one with a vanilla tasmota on it, and it does the same, until you configure the template. I’m curious now to know whether they do this with the original firmware out of the box, or if it’s something specific with the tasmota firmware.
Perhaps try ESPhome?