Git Product home page Git Product logo

tuya-ir-string-lights's Introduction

tuya-ir-string-lights

Some information about cheap Tuya-based Wifi fairy lights with IR remote

Fairy light box pyramid

  • Branding: Dekor Smarte LED-Lichterkette
  • EAN: 4311536003073
  • Imported by: Light Trade GmbH for KOFUR Handelsgesellschaft mbH
  • Product video: http://lighttrade.net/kofur/smarte_lichterkette/
  • Article number: 41958
  • Tuya Firmware version: 1.0.4
  • Tuya name: IR8FunctionLightString

Software

Originally, this runs Tuya firmware for use with the "Smart Life" App, but an exploit in the original firmware can be used to upgrade to custom firmware without taking the controller apart.

Tuya Cloudcutter

There is now a profile for tuya-cloudcutter called 1.0.4 - tiandu_bk7231n_light2_strip to flash the firmware via WiFi.

IIRC, you run Cloudcutter, put the lights in pairing mode, wait until Cloudcutter saved the profile, then unplug and and plug it back in, then put the lights into pairing mode again, then the rest of the exploit/flashing will happen.

It makes sense to flash the ESPHome Kickstart firmware so the ESPHome image can be easily flashed in the next step

To get into Wifi pairing/AP mode:

  • plug in the string
  • hold the button for ~10 seconds until it flashes fast
  • release and hold the button again for ~10 seconds until it flashes slow

ESPHome

An ESPHome fairylights.base.yaml and example fairylights-1.yaml are provided in /esphome/. Currently, the lights themselves, the button and the IR receiver are implemented.

@LeoDJ implemented a BK7231N-specific (a)synchronous PWM H-bridge component which is used here instead of the janky ESPHome hbridge light component which is flickery and glitchy as it switches polarity in the ~60Hz ESPHome main loop.

Hardware

  • BK7231N
  • button
  • IR receiver
  • two half-bridges
  • UART pads for flashing

PCB front view PCB back view

Pins

  • P6: Button (should be input with internal pullup)
  • P7: Output stage L1
  • P8: Output stage L2
  • P16: IR receiver (should be input with internal pulldown)

Output Stage

The output stage is basically just two half-bridges so the lights' polarity can be changed (to turn on the two colors). However, it is designed in a weird way, which causes the transistors to short out the power supply when both outputs are active at the same time.

PCB output stage (part numbers match PCB silkscreen) LTSpice output stage

tuya-ir-string-lights's People

Contributors

leodj avatar patagonaa avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

leodj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.