/ October 1, 2019/ Home Assistant, MQTT, tuya-convert/ 0 comments

I recently bought this led strip: https://www.action.com/nl-nl/p/lsc-smart-connect-slimme-multicolor-ledstrip-/

A multi-color LED strip, cheap and can by buyed by Action in NL.
You can flash this with tuya-convert2 and control it by Home Assistant via MQTT.

Tuya-Convert

  • Use a raspberry and instructions here: https://github.com/kueblc/tuya-convert
  • Clone tuya-convert
  • Start flashing by ./start-flash.sh
  • Connect vt-trust network
  • Set LED Strip in pairing mode by plug/unplug power 3 times, LED Strip will flash continously
  • Firmware will be downloaded to raspberry as a backup
  • Flash by using: curl http://10.42.42.42/flash3 (This will flash Sonoff Basic to the LED Strip controller)
  • LED Strip will reboot

Tasmota

  • Connect tot the LED-Strip with the newly wifi network: sonoff-xx and configure your own WIFI settings, save
  • After reboot, check your router to identify the new IP-address
  • Browse, on youre own network to the Tasmota web interface
  • Go to Configuration \ Configure Other
  • Fill in the following template: {"NAME":"LSC-RGBW-Strip","GPIO":[51,0,0,0,37,0,0,0,38,40,39,0,0],"FLAG":0,"BASE":18}
  • Choose Activate, MQTT Enable, fill in a Web Admin password
  • Save, reboot
  • After reboot goto console en give in:
    • SetOption17 1 – This enables decimal colors
    • SetOption59 1 – This enables sending of tele//STATE on POWER and light related commands
  • Go to Configuration \ MQTT and configure your MQTT Server settings

Home Assistant

  • Give in the following into your configuration.yaml. Make shure the name ‘LEDSTRIP’ is the same as configured in Tasmota ‘Friendly Name’ and/or topic (MQTT).
  • - platform: mqtt
        name: "LEDSTRIP"
        command_topic: "cmnd/LEDSTRIP/POWER"
        state_topic: "stat/LEDSTRIP/RESULT"
        state_value_template: "{{ value_json.POWER }}"
        availability_topic: "tele/LEDSTRIP/LWT"
        brightness_command_topic: "cmnd/LEDSTRIP/Dimmer"
        brightness_state_topic: "stat/LEDSTRIP/RESULT"
        brightness_value_template: "{{value_json.Dimmer}}"
        brightness_scale: 100
        on_command_type: "brightness"
        rgb_command_topic: "cmnd/LEDSTRIP/Color"
        rgb_state_topic: "stat/LEDSTRIP/RESULT"
        rgb_value_template: "{{value_json.Color.split(',')[0:3]|join(',')}}"
        effect_command_topic: "cmnd/LEDSTRIP/Scheme"
        effect_state_topic: "stat/LEDSTRIP/RESULT"
        effect_value_template: "{{value_json.Scheme}}"
        effect_list:
          - 0
          - 1
          - 2
          - 3
          - 4
        payload_on: "ON"
        payload_off: "OFF"
        payload_available: "Online"
        payload_not_available: "Offline"
        qos: 1
        retain: false

Enjoy!

Share this Post

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*

four × 5 =