Zemismart touch lamp

I have this device

I have already disassemled it.
It seems it has four? pins used for driving leds (RGBW) and one is probably used to detect “touch” - well actualy, i believe it does not detect touch but vibration (using that black cylinder?)

Does anyone has configuration for tasmota or esphome?

I can see, that GPIO 2,4,5,15,16 are connected to traces.

When i download firmware, is there some way to tell which gpio is used for what from that blob?

You could try running strings - there is sometimes xml or something that can tell you stuff.

Great, i will try.

I’m unable to boot it to flash mode, strange

I can’t see all the traces on the board or how the connections are labelled, but I am not entirely convinced you have it right. GPIO0 has to be grounded to get into boot mode. Pinouts are here https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/ (1st diagram).

A picture of the board with the connection labels clear would be helpful.

Yeah i think i have it, there is pad IO0 (left side of my picture), i have it connected to ground. It is connected on GPIO0 pin on ESP module. I have google yesterday and problem might be with low power delivered from USB - all LEDs are on. Iwiil try to power it from it’s battery instead of USB

Discovered this while measuring resistance and leds lighted up:

gpio04 - red
gpio12 - green 
gpio14 - blue
gpio05 - white

But esptool still cannot read flash_id.

But it must be in some kind of boot mode, because it does not respond to tapping on it by changing colors

So, year later, i managed to flash it using tuya-convert, no luck with direct flashing.
It’s very … unstable , it takes several attempts to boot.

I can confirm pinout for lights, it’s same as zemismart downlight

output:
  - platform: esp8266_pwm
    pin: 14
    id: output_blue
  - platform: esp8266_pwm
    pin: 12
    id: output_green
  - platform: esp8266_pwm
    pin: 4
    id: output_red
  - platform: esp8266_pwm
    pin: 5
    id: output_cold_white
  - platform: esp8266_pwm
    pin: 13
    id: output_warm_white

I cannot find the touch sensing gpio , yet

Ok, i just cannot pinpoint how to detect the “touch” event. I’m pretty sure, it is detected by that black cylinder, as a vibration. I tried setting up button on GPIO 0,2,15,16 , also on GPIO 1,3 . And to read voltage from A0 , no luck on any of these.