So here is what I by mistake did and sort of locked me out of that device ! It’s a multisocket strip with USB ports controled by ESP and tuya software ! I used tuya-convert to change firmware OTA in it and use ESPHome. Unhappy being stupid, I loaded in it an ESP-01 based firmware which means only 512K of flash and so no OTA I discovered that when I tried to upload the final firmware I had prepared for it and OTA was always refused ! I tried to upload a basic firmware with nothing in it out of Wifi config but still it doesn’t fit so no way to recover it by OTA.
I opened the device but the ESP module is on a little board soldered to main board without any indication of pinouts of module ! Did someone has already seen such module and would know pinout of it so I can flash it with USB adapter and recover it ?
I include few photos of device in case
Hi, I’m in the same boat, but with another device. I found the pinout by googling the silkscreen label, in my case it’s TYWE2S, then I noticed the pins are printed also on the module. Looking at your photos though, it seems there’s nothing written on it. Try googling the model of your device and try to find out alternative namings (these devices are sold under many brandings), maybe you can trace it from there. BTW I don’t seem to be able to flash it in place, it seems that the button and led are interfering with the esptool connection
Already tried that and also contacted Tuya that is the manufacturer of the ESP module used in that device but as all references on module have been removed they are unable to identify the module
Impossible as having flashed a firmware for small memory it refuses any OTA
Sorry to tell you you are now as me with a dead product you can do nothing with it !! Tuya-converter won’t work now that you have no more the original firmware ! Even if you open it I didn’t succeed to find the wiring of the ESP board soldered on main board ! I guess it can perhaps be found back by analysing the board and testing contacts but too long so I gave up but interested to know if you find a solution ! as product is not bad by itself !
I thought also an other solution that would be to completely unsolder the ESP board from main board, plug it on power (being very careful and using insulation gloves) and then check where are the 5 or 3.3V and find back contact pushing buttons and the rest should be the output to switch the sockets !
how come you did not fix this yet?
In the link I provided there is the pin specification of the ESP board.
Comparing the pin specification with the board you can easily solder in place some small wires and using a FTDI to usb flash ESPHome again via USB.
Again let me know if you need info exactly where to solder the wires.
Looking at this pic, it is clear the left most pin here is ground, as it is connected to the electrolytic cap ground lead. Solder a black wire here for ground
now that you know where ground is, and comparing with this schamatic, just to the right of GND is UTXD, solder a wire from this blob to FTDI RX wire
on the opposite side of the board there is 3V3, and URXD which needs to be connected to the TX of the FTDI.
The only one left is the IO0 to set in Flash mode, according to the schematic it is the pin in the middle in the side where the esp shield is, I would guess it is connected to GND via the pushbutton it is there, so check for continuity between ground and this pin when you push the button, if it beeps then you won’t need to solder a wire there and just press the button when connecting the FTDI to usb port.
Thanks for your investigations and help but it’s based on a different module of the one I have in the power strip unhappy so out of GND I think it’s wrong for the other pins
This the ESP8266-S3 chip. There are atleast 2 blogs detailing about this. Please read and happy soldering and reflashing
Please note that this chip does not have reset. Also if you are trying to load the firmware directly in the power strip, make sure you DO NOT connect the power strip to wall.
Oki so with all details you have been kind to supply here I have been able to flash my power strip too but it never starts
Tried to flash it in USB from my computer with esptool and also flash it with ESPHome straight from hassio but same:
INFO Successfully compiled program.
INFO Running: esptool.py --before default_reset --after hard_reset --chip esp8266 --port /dev/ttyUSB0 write_flash 0x0 /data/power_strip_bureau_vincen/.pioenvs/power_strip_bureau_vincen/firmware.bin
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: 84:0d:8e:9c:0e:bc
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Compressed 378112 bytes to 260308...
Wrote 378112 bytes (260308 compressed) at 0x00000000 in 23.0 seconds (effective 131.7 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
It compiles and uploads successfully and that’s it, nothing else happens I have done the shortcut GPIO0 with GND only when I first plugged my USB/serial adapter in hassio computer for flashing !
How are you sure it never starts?
Are you just pressing the button and listening for the first relay to switch?
Are you sure that the button is controlled by GPIO5?
After flashing, have you disconnected the device and waited a few seconds to make sure it boots normally?
I’m still new to ESPHome - so someone can correct me if I’m wrong on what I see.
You don’t specify a port for your web_server - the port is optional, but the docs don’t say if there is a default. To be safe add port 80:
web_server:
port: 80
After this you should be able to connect to is’t IP address from your PC (or .local) and see if the device booted and is online.
Let us know if the web server is available… that is very useful in knowing if the problem is boot releated, or configuration related.
well I get nothing in USB for logs and device never shows up on my Wifi (I use same setup for all my ESP device so I’m sure of my settings
For web server port is only needed if you want to use a non standard one
Update: very strange but the ESP module is not able to boot in normal mode just with the 3.3V of my USB FTDI adapter but no problem for flashing it this way…
So once plugged the power strip back on main power it shows up now online.
For other people that would have same device, here is layout of GPIO in it (I’m still missing the power button on it, it acts on none of the GPIO so not sure what happens there with it…
USB power: GPIO4
Socket 1 (the one nearest of power button): GPIO15
Socket 2: GPIO 5
Socket 3: GPIO14
Socket 4: GPIO12
Status LED on Power Button: GPIO2
Will update this post when I figured out how the power button is wired !
Okay, thanks for clarifying… by any chance did you erase the original firmware before flashing?
I have read that sometimes this prevent corruption - maybe your flash did get corrupted somehow.
esptool.py --port /dev/ttyUSB0 erase_flash
Then try flashing again - I don’t know if you need all those extra options though - might be able to just do:
You could probably leave off the -fs 1MB since it appears it was auto-detected. You can try using dout flash mode too… this is slow, but I believe is the most compatible. Worth a try .
On the topic of worth a try… there is a newer version of esptool (2.7) you could update, but I highly doubt that is the issue.