I’ve been using the Deta Grid Connect 1 and 2 gang light switches with Home Assistant for about 6 months now – as mentioned in this post. The 3 and 4 gang switches have finally arrived, and having picked one up from Bunnings, I was keen to get it setup and the firmware replaced with my own.
As mentioned in that previous post, replacing the firmware with ESPHome, your own firmware, or Tasmota has two methods. The first method is to use tuya-convert over WiFi, and the second method is to use the headers on the circuit board to plug your own leads in and upload firmware through a serial connection. Unfortunately, the good people at Deta have removed the headers on the circuit board, and changed the key used by the firmware rendering tuya-convert unusable.
It is only a matter of time though before tuya-convert is updated which will enable a wireless push of new firmware to the device. Luckily though, even without the headers, you can still use a serial connection to the board. The difficulty though, is you either need to solder your own leads on or be a little dexterous. As I mentioned on the earlier post, you need to provide power and ground to the board; you need to connect your serial programmer’s TX and RX; and you need to pull RST and GPIO0 to ground, release RST to boot the device and then release GPIO0 for programming mode.
In order to avoid soldering, or needing 4 hands, you can connect power and ground to the bottom pins on the board. You need to supply 5V though, as the pin doesn’t connect directly to VCC on the chip, rather it connects to the input side of the voltage regulator. So providing 5V on the pin gets you 3.3V on the chip. I used a bread board power supply to get the 5V, and I shared the ground on the bread board power supply to my programmer.
I then used a couple of ground connected leads to hold against RST and GPIO0 to reboot the device. Releasing RST boots the device, and then releasing GPIO0 a few seconds later enables programming mode.
Once in programming mode, I used a little header block with 2 pins bent away, and connected them to TX and RX on my programmer. I then simply held it against the TX and RX pins on the chip while pushing firmware through the programmer.
Once the firmware had uploaded, I released the TX and RX pins, and then pulled RST to ground momentarily to boot the device.
The firmware I pushed to the device supports OTA (over the air) updates, so hopefully that was only a one off activity! The good news is though, you only ever have to hold 2 pins against the chip at any one time in your hand – so its not too difficult even without the header area on the board.