DETA Grid Connect 3 and 4 Gang Light Switches and Home Assistant

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.

~ Mike

8 thoughts on “DETA Grid Connect 3 and 4 Gang Light Switches and Home Assistant

  1. Hi Mike,

    I’ve just purchased one of these and while the above makes some sense, I don’t understand all of it… any chance you could explain and/or film a little? Just mostly need some advice with regards to boot/program mode and process…

  2. Just confirming I finally worked it out and have successfully flashed a 4 gang switch.

    Appreciate this guide, was great the 4 gang is slightly different although the above pictures are still relevant.

    Cheers

  3. Hi Mike. Wondering if the individual switches be used to control other devices? For example. I’d like to replace a single light switch with a 3-gang. First button will control the existing light via the current wire and give the switch its power, the other two buttons programmed (in home assistant) to run another device elsewhere in the house (maybe trigger a HA automation). Would this type of config be possible with ESPHome or can they only control wired lights?

    Cheers.

    1. Hi Andrew – you could leave one of the output light connections not connected to anything – the software running on the controller doesn’t actually know if there’s something there. You can do a lot of cool stuff with them just as a switch.

      I’ve actually got one connected to a LIFX wifi light. However, its programmed so that when I press the wall switch, it doesn’t actually power off the light, but rather tells HA to inform the wifi bulb to turn off (but it stays powered). If I then hold the light switch down for 3 seconds, it actually powers the circuit off. I’ve got a friend with one where if you hold the button down, it tells HA to turn off all lights.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s