How to flash a Gosund (or other Tuya) smart bulb with Tasmota for Home Assistant? – MBReviews | Gen Tech

Posted on

I had some points with a Gosund good bulb staying linked to the app, so I made a decision to replace Tasmota’s firmware in order that I might join the good machine to the Dwelling Assistant, bypassing the Tuya Cloud server.

gosund-smart-bulb

The method is fairly simple, and whereas it does not require any soldering, neither is it essential to open the machine to attach any wires, it does require a little bit of know-how. And sure, you want to have the ability to navigate Linux – open the console and duplicate and paste the instructions – so once more, nothing to scare newcomers.

Why select Dwelling Assistant?

I bought a Gosund good bulb over three years in the past that labored high-quality with Gosund and Good Life apps, however then I bought extra good bulbs from different manufacturers. Throw in some X-Sense good smoke detectors, a Nest defend, a wise body and the listing goes on and on. The issue is that every machine can solely hook up with its app, so I find yourself having a couple of dozen apps on my telephone, and in my case, I additionally change the router fairly often. Think about my pleasure at having to re-pair all these gadgets each two months.

The thought is that you just needed to go together with a centralized resolution and why not additionally go open supply, reducing the wire to model primarily based servers. And sure, I am speaking about Dwelling Assistant, which is without doubt one of the greatest issues to occur to the IoT market, as standard, open supply to the rescue. The issue is that Tuya gadgets are in a nasty temper and producers actually do not such as you to disconnect them from their servers. I imply, how else are they going to gather your information?

seeed-mini-router-hardware
Seeed Mini router with Dwelling Assistant.

So, having put in Dwelling Assistant on a Raspberry Pi machine, I made a decision to undertake the Gosund good bulb for this platform. I used a Seeed mini router for Dwelling Assistant and you may learn this information if you wish to go this route too. Then again, it is a lot less complicated to make use of a daily Raspberry Pi, because you need not fear about eMMC onboard storage (you will not be capable to use your individual SD card).

Why flash Tasmota on a Gosund (Tuya) good bulb?

I’m totally conscious that it’s attainable to combine a Gosund good bulb into Dwelling Assistant by counting on the Tuya IoT platform, however there are a number of shortcomings in going this route. You proceed to belief the producer’s servers, so information remains to be collected, plus you may lose management over the IoT machine the second the server goes down (or simply deliberate obsolescence). The opposite draw back is that you could solely use a trial model for six months; sure, I do know you possibly can redo the steps each 6 months and never must pay for the subscription, however that is hardly a bonus.

gosund-smart-bulb
The Gosund app.

After I added Dwelling Assistant to the Seeed mini router, I bought its route and forgot about it solely to get the blinking LED (on the sunshine bulb) which disconnected me from the server. So, I did what any wise particular person would do and simply added the Gosund bulb again to its native app. That labored for a few days till I turned the blinking LED again on. He was additionally logged out of the app. That is once I determined I would had sufficient of Tuya’s antics and needed to improve to new software program for higher management. It additionally needed to be open supply – Tasmota was an ideal match.

some considerations

There are two primary potential issues that should be addressed. Producers don’t need you to stroll away from their server connection, in order that they usually embrace code and {hardware} components to maintain you from leaving their cloud server. That is additionally true for Tuya good gadgets, to a sure extent. Tasmota firmware can solely be put in on gadgets which can be geared up with particular ESP chipsets. And naturally, next-generation gadgets have moved away from that platform, closing the window of alternative for individuals to ditch the cloud connection.

On the identical time, the open supply neighborhood by no means sleeps and I’ve seen OpenBeken maintain nice promise and a possible Tasmota substitute for gadgets with newer non-ESP WiFi chips. Coming again to the ESP chips, some manufacturers have blocked the power to flash new firmware over the air, so it is best to not replace the firmware of the bulbs when you plan to make use of Tasmota.

graphical user interface
Dwelling assistant.

One other concern is, in fact, whether or not the revenue is proportional to the work that should be put into the mission. Since there is no soldering or opening the good machine required, it is about having a free hour within the afternoon to mess around with Linux and possibly a Raspberry Pi. If you do not have an RPi operating Linux, issues can get much more difficult, as we’ll see within the following sections.

The necessities

  • A wise bulb (utilizing the Tuya platform) that has a appropriate ESP chip.

As written on the official web site, these are the supported chipsets: Espressif ESP8266, ESP8285, ESP32, ESP32-S and ESP32-C3.

  • A smartphone: it may be Android or iOS.
  • A Raspberry Pi operating the Raspbian working system and having built-in WiFi help.

Why a Raspberry Pi?

pi-hole-raspberry-pi-4
raspberry pi 4.

The reply is straightforward, we have to use the power of the WiFi chip to work in entry level mode. That’s the reason. I attempted the flashing course of utilizing a PC geared up with a PCIe adapter and, as anticipated, the adapter wouldn’t be acknowledged. It’s attainable to make use of a WiFi dongle that helps AP mode, however if in case you have a WiFi-enabled RPi then the method is far simpler.

Putting in and operating Tasmota Convert

  • The very first thing to do is to guarantee that Rasbian is updated, so run these two instructions:

sudo apt-get replace

sudo apt-get replace.

Give it an excellent couple of minutes, particularly if you have not achieved this shortly and after that you must be sure the Raspberry Pi is linked to WiFi. I often simply use the shortcut within the high proper nook, Home windows OS model, but it surely’s totally attainable to make use of the ‘sudo rapi-config‘ command too. Subsequent you may have to make use of the git command and also you had the bundle put in from different tasks, but when the RPi does not acknowledge this command, simply enter ‘sudo apt-get set up git‘ and once more, wait a couple of seconds for the method to happen.

  • After that, it is time to obtain Tuya-Convert from GitHub:

git clone https://github.com/ct-Open-Supply/tuya-convert

  • Be sure you change listing:

cd yours-convert

tasmota-gosund-bulb
Set up of the Tuya Convert instrument.
  • And set up the stipulations (it is going to take a couple of seconds):

sudo ./install_prereq.sh

  • You will note the message that Tuya-Convert is able to begin the replace, so enter the next command to make use of the RPi as an entry level:

./start_flash.sh

What this command does is transmit the tasmota-xxxxx SSID utilizing the built-in WiFi adapter and you must maintain this connection lively, in any other case it would routinely shut down. At this level, it’s essential to join a shopper machine to the SSID.

tasmota-gosund-bulb-ssid
transmitting the tasmota-xxxxx Wifi.

Use a smartphone to connect with the tasmota community and ensure cell information is turned off and the telephone doesn’t routinely reconnect to a different lively WiFi community (select to neglect the earlier community, it would reconnect to it later). .

Replace Tasmota firmware

Whereas the smartphone is linked to the tasmot community, it is time to put the Gosund (or different Tuya) good bulb into pairing mode. Which means you must guarantee that the sunshine is blinking rapidly and never slowly; this may be achieved by turning the sunshine on and off about 4 instances after which ready a few seconds for the Gosund bulb to begin blinking quickly. Return to the Raspberry Pi and press Enter. This can routinely detect the good bulb and it seems that a backup of the unique firmware can be saved on the RPi.

Now, you can be requested to select from a number of choices and we’re going to select choice 2 to flash the “tasmota.bin”. To do that enter 0-2:2. And that is it, the bulb ought to now flash inexperienced and you must be capable to see {that a} community of tasmott bulbs (from the ex-Gosund bulb) is offered.
Observe: You do not actually should be near the good bulb (though it is not a nasty thought to be fairly shut) as a result of I used to be capable of carry out this process whereas the bulb was put in above, about 10 toes away from the RPi machine.

Tasmota good bulb setup

It appears the default IP deal with for the bulb was 192.168.4.1, so I rapidly went to the GUI the place I modified the AP1 SSId and password to match these of my wi-fi router’s 2.4GHz community.

installation-bulb-tasmot-gosund
WiFi configuration in Tasmota software program.

On this approach, the good bulb will obtain an IP deal with from the router; simply examine it within the listing of shopper gadgets. Then, accessing the GUI once more, I used to be capable of see the standing of the good bulb (together with the choice to Toggle between states). Beneath, you need to use the console, replace the firmware and configure the machine. And the Settings part gives you full management over the machine and I imply it. This is without doubt one of the deepest choice units I’ve seen on a tool (developer degree settings). This part (particularly the MQTT) may be helpful when pairing the machine with Dwelling Assistant.



How to flash a Gosund (or other Tuya) smart bulb with Tasmota for Home Assistant? – MBReviews