Hi All.
I’ve recently bought a few of these neat ripple led lamps from aliexpress.
aliexpress ripple lamp
They are usually controlled by IR remote but of course, i want it smart.
I’ve successfully integrated an esp32 c3 flashed with tasmota and i have pwm control of the rgb leds thru ha.
Which is great, works as intended.
Now, the lamp has a small geared motor which rotates the diffuser lens above the leds to give the ripple effect. This is also controlled by pwm with a logic level smd mosfet like the leds.
I have set the motor pwm as pwm 6 in tasmota config as i know there is something about the first 4 or 5 pwms are for lights and pwm 6 is a general pwm output.
Using all hardware pwm pins on the esp32c3 as well.
I am able to issue pwm commands from tasmota console to adjust the speed of the motor, works fine.
But this is where I’m a bit stuck.
I need that pwm to appear as an entity on ha so i can have a slider to adjust motor speed.
I’m guessing i need to create a custom yaml config to send mqtt commands to the tasmota pwm 6.
As this is a fairly unique setup, i haven’t been successful finding any answers that work for me.
Would anyone be able to point me in the right direction?
Here is my current card config, obviously the entity for the “motor” slider is not correct, this is where i would want the motor pwm entity.
type: entities
entities:
- type: section
label: null
- type: custom:slider-entity-row
entity: light.ripple_lamp_lamp
toggle: true
full_row: false
name: Lamp Dimmer
- type: custom:slider-entity-row
entity: light.ripple_lamp_lamp
toggle: true
full_row: false
name: Motor
- type: custom:rgb-light-card
entity: light.ripple_lamp_lamp
size: 30
colors:
- rgb_color:
- 255
- 0
- 0
transition: 1
- rgb_color:
- 255
- 127
- 0
transition: 1
- rgb_color:
- 255
- 255
- 0
transition: 1
- rgb_color:
- 0
- 255
- 0
transition: 1
- rgb_color:
- 0
- 0
- 255
transition: 1
- rgb_color:
- 75
- 0
- 130
transition: 1
- rgb_color:
- 148
- 0
- 211
transition: 1
- type: custom:rgb-light-card
entity: light.ripple_lamp_lamp
size: 30
colors:
- rgb_color:
- 255
- 177
- 110
transition: 1
- rgb_color:
- 255
- 206
- 166
transition: 1
- rgb_color:
- 255
- 237
- 222
transition: 1
- rgb_color:
- 255
- 255
- 255
transition: 1
state_color: true
title: Ripple Lamp
show_header_toggle: true
card_mod:
style: |
.card-header {
font-size: 18px;
padding: 2px 15px 2px 15px
}