How to make a device for TV voice control

How to make a device for TV voice control  How to make a device for TV voice control How to make a device for voice control of the TV From this article, we will learn how you can make your own voice assistant to control your TV. The craftsman who made this device has a Samsung Smart TV at home, but without voice control. To expand the functionality, you can purchase a smart speaker, for example, the Amazon Echo Dot, but the master decided to try to make it on his own.
Tools and materials:
-Soldering iron;
-Heat shrink tube;
-Board ESP8266-01s + programmer; – NPN transistor 2N2222A; – 100 Ohm resistor; -2 10 kOhm resistors; – Switch; – IR LED; – Down converter; – Micro USB board; – TP4056 charging board; – Mini LiPo battery;
Step one: general questions
Here are some possible and useful commands:
Turn on/off the TV
Volume settings (up/down/mute)
Switch to another input (HDMI port, TV, set-top box, etc.)
Turn on Netflix/Amazon Prime/YouTube …
There are three options to power the device.
Via the USB port of the TV.
Via any adapter and buck converter (requires 5V).
Or from the built-in battery making the device mobile.
To run this project, we need a system that runs the free ioBroker software. It is a free MQTT broker that allows the ESP8266 to connect to it and exchange data. The ioBroker also has an Alexa adapter that we can use to wirelessly communicate our ESP with Alexa.
The wizard runs ioBroker on an old laptop, but for small devices, the Raspberry-Pi is enough. You can download ioBroker on its official website here:
I also need Tasmota firmware. It can be downloaded here:
Step Two: Programming the ESP8266
Before assembling the device, you need to program the ESP8266.
First, we connect the ESP to the programmer. Then launch the Flash-Tool on your computer. Then we connect the programmer via USB and press the FLASH button on the board. Release it after a few seconds. The COM port should now be shown in the Program-Tool. We select it and continue by selecting Tasmota-Firmware. Baud-Rate settings should be 115.000 and QIO mode selected.
When finished, press Flash and DONE should appear.
Now you need to remove the programmer from the PC and install it back after switching it to UART mode (switch on the board) .
How to make a device for voice control of the TV Step three: setting up the device
Configure ESP – WiFi.
Now that the ESP is programmed and connected to the computer in UART mode, go to the device's Wi-Fi settings and find the network that contains the word “tasmota” in the SSID (for example, “Tasmota-31278D”). Then you need to connect to the network. In the browser we type
Wi-Fi settings:
SSID of your Wi-Fi router
Password of your Wifi router
SSID of your (second ) router (optional)
Password of your (second) router (optional)
Hostname: the name that will be displayed on the network (at the “TV-Remote” wizard).
Confirm the settings by clicking “Save” (green button). ESP is now trying to connect to your home Wi-Fi network. If this process does not start, ESP reopens its own Tasmota-Wifi-Network.
How to make a device for TV voice control Setting ESP – module configuration.
When ESP has successfully connected to the home network, you need to find its IP address in the router menu.
Enter the address into your browser. The tasmota ESP page will be displayed. Now go to Settings – & gt; Configure Module and select “Generic (18)”.
In the “GPIO-2” line, select “IRsend (8)”.
Next Save.
How to make a device for TV voice control Configuring ESP – MQTT.
ESP needs to connect to ioBroker. You can configure MQTT parameters on the Settings -> Configure MQTT tab. Here you need to enter your Broker-IP, Broker-Port, MQTT-User (it can be found in the settings of the MQTT adapter on the ioBroker). In addition, the MQTT password, client name (how the device appears in the ioBroker) and title are required. The header is the name of the folder in the iobroker. If you want to use more MQTT devices, the wizard recommends giving full titles such as living room /% topic% or kitchen /% topic%. This is not necessary, but it will help in the future when you have a lot of connected devices.
After setting up, you need to save everything.
ESP is ready to use.
How to make a device for TV voice control Step four: setting up IoBroker
Now that the ESP is ready to use, we need configure MQTT-Broker and, optionally, Alexa-Adapter.
Go to your ioBroker web page (ip-address + port (8081), for example in this case).
Go to “Adapters”, find “MQTT Broker/Client” and “Alexa2”.
We need an MQTT adapter, Alexa is not required.
Select the parameters as shown in the photo. MQTT-User and password can be set at your discretion.
Save (lower left corner).
 How to make a device for TV voice control To check the ESP connection with the broker, you need to disconnect the ESP from the PC and re-enable it in working mode.
Wait a few seconds, check the “instances” status of the iobroker page and look at the “light” symbol of the MQTT adapter. If your ESP is listed there, it is successfully connected.
MQTT folders will automatically appear on the “Objects” page.
How to make a device for TV voice control Next go to the “Objects” tab in ioBroker.
Open the mqtt.0/YourTopic/cmnd folder.
Inside this cmnd (commands) folder, create a new data point. This can be done by clicking the + (plus) symbol at the top.
Name: IRsend
type: Datapoint
data type: string
How to make a device for TV voice control < a href = "" rel = "prettyPhoto"> How to make a device for TV voice control Step five: installation
The printed circuit board on which the device is assembled must have a round shape with a diameter of 50 mm.
We mount the components according to the attached diagram.
Master used small 2-pin connectors for IR LED, switch and Micro-USB-Power-Board. Don't forget to mark the + and – on the side of the connector. The orientation of the radio button does not matter.
How to make a device for TV voice control For device, the master 3D printed the case. The files can be downloaded below.
The wizard glued the board, IR LED, switch and USB port inside with hot glue. The device itself is behind his TV using double-sided tape.
How to make a device for TV voice control < a href = "" rel = "prettyPhoto"> How to make a device for TV voice control How to make a device for TV voice control < a href = "" rel = "prettyPhoto"> How to make a device for TV voice control To start the device, you need to press the button and hold it during switching on for a few seconds. When pressed, the switch disconnects the IR LED from the GPIO-2 so that the ESP can start.
Step Six: Automation
To make the device work, you need to load the adapter “Scripts” into the ioBroker. After you have installed it, a new field will appear on the left called “Scripts”. Open it and create a new Blockly-Script – this is a very simple programming method.
To control the TV, we need to know its IR codes. The codes can be found easily on the internet, find your model TV + IR codes. Codes can also be decoded using an IR receiver and Arduino .
In this case, the master has the TV on/off signal – “0xE0E040BF”. Now we need the IRsend variable that we created earlier. The above example program writes code to a variable. But before and after IRsend, you need to write “0” with some delay, for example, 1 second (see the photo at the end).
We need to use this header for IRsend: {“Protocol”: “NEC”, “Bits”: 32, “Data”: YourIRCode}
Any variable in the ioBroker can be a trigger to turn on the TV. If you want to do this with Alexa, just create a new procedure in the Alexa app on your smartphone and name it, for example, “Turn on the TV.” This variable can be found in the Alexa adapter folder under the “Objects” tab of your ioBroker. This variable should be selected as the trigger event at the top of the sample script (if condition).
If the user has a smart TV, you can also start, for example, Netflix, Amazon Prime, YouTube, etc.
Remember to set IRsend to 0 between commands with a little delay. Delays must be between 500 and 1000 ms.
How to make a device for TV voice control


Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Please disable your ad blocker

We know you are here for the stories. Not the ads. But we need the ads to keep the lights on. So please whitelist