A home automation setup would not be complete without some smart lighting and in this video
we are going to take a look at one inexpensive option for this.
The bulb has its own APP which allows you to control it from anywhere in the world,
so we will first configure it with that app and we will then learn how to integrate it
with home assistant so that we can integrate it with the rest of our home automation setup.
When it comes to smart lighting, the first thing that will pop into your mind is perhaps
the Philips hue range. While these are excellent products, they are not very cost effective
for the average consumer. You then need a bridge to connect all the devices which adds
some complexity and more cost.
Tuya smart is a leading company that has designed several products for home automation and they
have also created a secure platform which is used by several different companies for
their own products. They modules that have designed are used in various different products
and the end result is a range of smart devices that we can easily use. All are controlled
by a single APP and have a host of smart capabilities so that you can easily get up and running
with home automation.
I purchased these bulbs for about 9 pounds each though you can also get them for about
8 dollars on Aliexpress be sure to look for the Tuya logo when purchasing a unit. They
can also be easily integrated with voice assistants. Another brand is Teckin that has a lot of
products to offer some of which are much better looking. They are both very similar and can
be used with the smart life app which again is very similar to the tuya app.
The bulb itself looks like a regular LED bulb. This one is the 9W version with an output
of 800 lumens which is not bad either. Keep in mind that many other efficient LED bulbs
cost about the same and also produce the same light output. This particular bulb has the
E27 holder but most of my bulb holders at home use the B22 style like this. I could
go about changing all the holder but a much easier way is to use an adaptor like this
one which simply screws in place to convert the E27 style to B22. These adaptors are easily
available on various websites. For this video, I am going to use this E27 lamp holder and
the bulb will simply screw in place. Byy default the bulb will give you cool day light when
switched ON. There’s no way for us to control the colour or brightness so let’s get started
with the setup.
The first thing we need to do is download the app. I will be using the Tuya app though
you can also use the smart life APP. I’ve tested both and the layout along with the
process is the same. You would need to create an account or sign in as all the devices that
you add will be linked to your account. Once you’ve signed up, you will reach this page
where you can add a device. You can view the long range of products that this app is compatible
with from home appliances, kitchen appliances and so on. We will be adding the light bulb
to select the lighting section and then select the Lighting WiFi option. Most of the products
only support 2.4GHz networks so make sure you are connected to a 2.4GHz network and
then enter the password here which will be used to configure the bulb.
In order to link the bulb with the APP, we need to put it into the pairing mode where
the bulb will blink continuously. If your device is not already in the blinking mode
then you can view the guide to help you switch it to the pairing mode. Power cycling it 3
times as per this guide did not work for me and the manual does not contain any instructions
as well. And if this is the same for you then try power cycling it between 5-10 times. For
me, doing it 5 times worked. You can then confirm that it is in the pairing mode to
continue with the setup. This step will take a few seconds and once done; it will show
you a screen like this. Edit the device name to something more suitable and complete the
setup. You will then be taken to this screen where you can control the bulb, change its
brightness, colour temperature and so on.
You can also move to the next tab to change its colour like so. The next tab contains
presets that you can use to easily switch between modes. You can also edit them as needed.
Finally, you can also create a schedule for basic automations. If you go back then you
will be able to view the device list and you can add several other devices and control
them with the same app. It also serves as a shortcut for you to easily control the bulb.
As of now, I have been controlling the bulb over WiFi, but since the bulb is connected
to the Tuya cloud we can control it from any other network as well. This is very similar
to what Blynk does and we have looked at that in a previous video. If I switch to my mobile
network then you will see that I can still view the bulb status and control it remotely
which is handy. If you power cycle the bulb then it will retain the last colour and settings
which is also pretty handy.
If you want to use this with a voice assistant then you will have to add the Tuya Smart skill
to it and you will then be able to control it. I do not have a voice assistant at the
moment so I cannot test this but I will be making one so we will test it out then. Do
subscribe to stay updated for that.
In order to use it with home assistant, we would need to use the Tuya integration. We
need to add these lines to our configuration file so start by copying them. Head over to
home assistant and install the configurator Add-on if you haven’t. This is also called
File editor. Once done, you can open it up, select the configuration file and then paste
the lines that we copied. Enter the username and password which will be the same ones that
you used to sign into the APP. For the country code, you will need to add the international
calling code. But go back to the integrations page, then select the option down here and
find the code for your country which is 44 for me. Add it to the configuration, save
the file and then we need to reboot the system. So head over to hass.io, system and reboot.
Give it a couple of minutes to boot and then head over to the dashboard where we will add
the bulb. Start configuring the UI, add an entity and then select the light option. If
you scroll down here then you will be able to view the lights in the system so select
the name you had given the bulb and that is about it. Save this, then exit the configuration
view to view the dashboard. You can switch the bulb ON/OFF which will retain its previous
settings and you you can use the options to change the brightness and colour temperature.
You can still use the APP for more advanced features, changing the colour and so on.
Once you can successfully control the bulb from the dashboard, you can use its entity
ID to control the bulb. We have already learned how to do this before so I will not be covering
it in this video. We will do it again for the final home automation setup.
Here’s what’s happening, the bulb is connected to the tuya server over the internet and it
needs this connection to work. Ideally, you would want to avoid this and integrate it
more closely to home assistant so that you don’t have to rely on an external server.
There is something called Tuya-convert which allows you to update the firmware on some
of these devices to allow you to use it with ESPHome, Tasmota or any other platform. There
are two ways to do this – one is wirelessly and the other is by opening the bulb and connecting
a serial port to it. I tried the wireless method but it doesn’t seem to work for the
bulbs that I have. Apparently Tuya have been releasing firmware updates which no longer
allow you to update the firmware wirelessly.
I then opened up a bulb to check what’s inside and its not exactly user friendly.
You have the LEDs on one PCB while the WiFi module sits underneath and is very difficult
to get to. It did remove the cover and sure enough it is the newer ESP8285 chipset which
is compatible with ESPHome. If you are not familiar, then the ESP8285 is an ESP8266 chipset
with 1MB of built in Flash memory, which means you no longer have to add an external memory
chip.
If you look at the Tuya convert wiki then you will find a list of devices that have
been tested along with the region where they are available. The Teckin SP50 is one such
bulb and though I could not find the exact model, I ordered these which I will try out.
If I can upgrade the firmware then I will make a video on it or else, you can refer
this guide which will help you with the process which is very straightforward.
In summary, I think using devices like these make it extremely easy for you to get started
with home automation. You do not need to setup home assistant, use nodeRED and so on but
obviously you don’t have as much flexibility. Before we automate everything, I would like
to create a node for each room that can monitor the temperature, detect motion and control
the light. That is what I will be working on in future videos so do subscribe to stay
updated. Thank you for watching and I will see you in the next one!