Office: Shelf lighting (more Tuya shit)

As mentioned at the end of the previous installment of office rennovations, I bought a Tuya-powered RGB light strip from Kmart. On the face, it seems okay: it boots up pretty fast (albeit defaults to “on” in a power failure, always), it’s bright but dims down pretty good without flickering noticeably and has a pretty good gamut of colors available with no bullshit like “16 color-safe HTML triplets only” like the dogshit RGB Christmas lights we bought.

So I set about hooking it up to tuya-local in our Home Assistant installation, and nothing. Check the logs… it’s crashing, throwing a traceback! I initially thought this was broken from my last time fucking about with it, but when I checked, no, this device is just really different and doesn’t seem supported by tuya-local yet.

So I popped it open for a look (it’s very easy to open) and it’s definitely not an ESP device. After taking a macro photo of it so I could fucking read it, I found it’s powered by a Beken BK7231N microcontroller, and some research suggests that most of the new Tuya stuff is coming out based on this chipset. Fuck.

Good news: there’s ESPHome-style LibreTiny and similar firmwares available for it, and flashing it looks pretty trivial! So warranties be damned, I soldered some wires up, dug out a MAX3232 and… nothing. Tried several different flashers, hooked up my oscilloscope, it just does not seem to respond. I can hook up my serial adaptor to UART2 and get some debug output:

[01-01 00:00:00 TUYA N][lr:0x5835b] < TuyaOS V:3.3.40 BS:40.00_PT:2.3_LAN:3.5_CAD:1.0.5_CD:1.0.0 >                                                      
< BUILD AT:2022_11_25_18_35_59 BY ci_manage FOR tuyaos-iot AT bk7231n >                                                                                 
IOT DEFS < WIFI_GW:1 DEBUG:1 KV_FILE:0 LITTLE_END:1 TLS_MODE:2 OPERATING_SYSTEM:9[01-01 00:00:00 TUYA N][lr:0x58365] oem_bk7231n_strip_ty:2.0.21        

(shortened for brevity, it’s way more verbose than that)

I spent quite some time just trying to get anything out of the TX pin of the UART1, to no avail. Thought maybe I had them the wrong way around, so I swapped the pins around (from crossover to straight-through and back), still nothing.

Eventually I gave up, and someone on Discord suggested a provider named Athom, who appear to have the same thing with an open firmware already installed - just point it at your MQTT server and off it goes. So I’m thinking I’ll just give that a shot instead, and this might be the start of moving away from Tuya finally?

Horsham, VIC, Australia fwaggle



Filed under:


Horsham, VIC, Australia

Navigation: Older Entry Newer Entry