LSC Smart Connect - Christmas Lights /localtuya

Hi,
I just wanted to share my configuration for the LSC Christmas Lights (also called “Multi color Smart lights”) which you can buy in the “Action” store in many EU Countries… (might help somebody to easily integrate it into HA)

I did not (and want to) open the Plug to check the Wifi-Module inside, but an IP-Scanner determined that it could be an ESP so Tasmota is “maybe” possible.

Anyway, I configured the device with localtuya, but as this light has different controls than “standard” Tuya lights, I had to create service calls for each color / effect to set the DPs manually.

With local tuya, configure only the ID which is “20”.

Then create yourself a new Lovelace Card with the following Code:

type: vertical-stack
cards:
  - type: custom:button-card
    name: Christmas Tree Lights
  - type: button
    tap_action:
      action: toggle
    entity: light.christmas_lights
    icon_height: 50px
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        color_type: card
        aspect_ratio: 2/1
        color: rgb(223, 0, 0)
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: R
            device_id: <your-device-ID>
            dp: 101
      - type: custom:button-card
        color_type: card
        aspect_ratio: 2/1
        color: rgb(225, 255, 0)
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: RG
            device_id: <your-device-ID>
            dp: 101
      - type: custom:button-card
        color_type: card
        aspect_ratio: 2/1
        color: rgb(0, 255, 0)
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: G
            device_id: <your-device-ID>
            dp: 101
      - type: custom:button-card
        color_type: card
        aspect_ratio: 2/1
        color: rgb(0, 255, 255)
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: GB
            device_id: <your-device-ID>
            dp: 101
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        color_type: card
        aspect_ratio: 2/1
        color: rgb(0, 0, 255)
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: B
            device_id: <your-device-ID>
            dp: 101
      - type: custom:button-card
        color_type: card
        aspect_ratio: 2/1
        color: rgb(225, 0, 255)
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: RB
            device_id: <your-device-ID>
            dp: 101
      - type: custom:button-card
        color_type: card
        aspect_ratio: 2/1
        color: rgb(255, 255, 255)
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: RGB
            device_id: <your-device-ID>
            dp: 101
      - type: custom:button-card
        color_type: card
        aspect_ratio: 2/1
        color: rgb(0, 0, 0)
        name: Rainbow
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: Color
            device_id: <your-device-ID>
            dp: 101
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        aspect_ratio: 2/1
        name: Bright
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: Bright
            device_id: <your-device-ID>
            dp: 102
      - type: custom:button-card
        aspect_ratio: 2/1
        name: Gradually
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: Gradually
            device_id: <your-device-ID>
            dp: 102
      - type: custom:button-card
        aspect_ratio: 2/1
        name: Star
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: Star
            device_id: <your-device-ID>
            dp: 102
      - type: custom:button-card
        aspect_ratio: 2/1
        name: Flower
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: Flower
            device_id: <your-device-ID>
            dp: 102
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        aspect_ratio: 2/1
        name: Marquee
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: Marquee
            device_id: <your-device-ID>
            dp: 102
      - type: custom:button-card
        aspect_ratio: 2/1
        name: Fireworks
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: Fireworks
            device_id: <your-device-ID>
            dp: 102
      - type: custom:button-card
        aspect_ratio: 2/1
        name: Meteor
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: Meteor
            device_id: <your-device-ID>
            dp: 102
      - type: custom:button-card
        aspect_ratio: 2/1
        name: Stream
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: Stream
            device_id: <your-device-ID>
            dp: 102

which in the end looks like this:
card

Hopefully it will help somebody!

7 Likes

Hey!

Looks nice, how did you get the details of the different modes?
I have the warm white version of the smart lights, so there are no colour modes but in the app it shows the following options:
COMBINATION
IN WAVES
SEQUENTIAL
SLO-GLO
CHASING
SLOW FADE
TWINKLE
STEADY ON

Cheers!

Hi, using the tuyadebug tool, mentioned here: HOWTO get a DPs dump · rospogrigio/localtuya Wiki · GitHub :wink:

1 Like

Hmmm, that’s something I haven’t done before.
Haven’t been running python scripts in HA before…

I’ve updated the test.py, but I can’t seem to find the output of it in the logs after I call the service from the Developer Tools.

You need to run this script from within a linux command line, not from homeassistant developer tools…

Are you running HomeAssistant OS?

1 Like

Aha, thats where it went wrong! :rofl:
I run HomeAssistant OS on a ProxMox VM. So my answer would be, yes to that question.

So I’ve been trying to run some commands on the Terminal of Proxmox and in The terminal & SSH addon of HA itself but no success this far :crazy_face: :roll_eyes:

How have you uploaded the downloaded file into the system?
The second question is, what I do not know because I do not run HomeAssistan OS, if you could install python there or if it is already available…

If you have proxmox, install Ubuntu or raspbian, install python there and run the commands inside there.

1 Like

I’ve managed to run python through my windows CMD and got the data I need so now I can start playing with it.

So I need to switch my DP to match it with the scene setting for the string and the service data value, where you for example have “Meteor”, that name is identical to the name in the app?

Hi, for me it was the case that the “effects” were the same but I cannot quarantee that it will be for every device… I had to “set” the scene through the Tuya App and then run the test.py command to get the “currently state” of the DPs, which I noted down for every “scene” in the tuya app and then created buttons with service calls which sets the DPs according to the output of test.py.

1 Like

Thanks, I’ll give it a try!

Hi!
Thank you for that, this is exactly what I was looking for.
I just started my journey with Tuya and LSC Smart Connect devices from Action. I have already configured smart plug via Smart Life app and integration via Tuya in HA. Unfortunately, neither Smart Life nor Tuya Smart apps cannot find these christmas lights, it works only with Action’s LSC Smart Connect app for me. Have you had the same problem? How does it work with local tuya if it’s not accessible in the app? Do you get it via IP somehow? Probably that’s a newbie question but I am the noobie so thanks in advance :slight_smile:

Hi, I can remember that I was not able to discover it via the tuya app automatically, I had to add it manually.

In add device → add manually → (on the left) lighting → and either “Light Source (Wi-Fi)” or “String Lights (Wi-Fi)” and then it was disocvered while in pairing mode.

Try it out!

And additionally, welcome to the community!
Nothing is a newbie question, we all learn something new everyday, also thanks to the community!

Thanks a lot, it works very good!
Hartelijk dank :slight_smile:

Thanks for warm welcome :slight_smile: It worked! Now I’m trying out some new lovelaces so wish me luck with that :stuck_out_tongue:

The hostname = ESP_8A888E

So yes seems to be ESP :slight_smile:

Thanks so much for this, works perfectly with the last box of Multi colored lights I found at Action. It works like a charm @fraintt!

How exactly are you getting this to work? I keep getting “localtuya set.dp not found”, using the following device ID:

image

At least, I assume that’s the device ID. Turning it on and off seems to work, just can’t use the colors and effects.

Do you have the custom component “local-tuya” installed? If not you also do not have the service-calls for this…
In order for this to work, you need to have GitHub - rospogrigio/localtuya: local handling for Tuya devices installed and added as an Integration.
I do not have and use the official tuya integration.

1 Like

Ah, that explains a lot. Thanks! Will look into it.