Installing Tasmota Over the Air via Yuya Convert using a Raspberry Pi.
One this has been setup you can just keep the SD card and insert into any Raspberry Pi with ethernet and WiFi.
Important Details
WiFi Name: vtrust-flash
WiFiPassword: flashmeifyoucan
Requirements
- Raspberry Pi with an Ethernet port ( Pi 1,2,3 or 4. not a 0 )
- 16GB Micro SSD
Supported ESP Chips
At time of writing Tuya Convert supports the following ESP chips
- ESP866
- TYWE1S
- TYWES3
- TYWE3L
- TYLC4
- TYWE5P
- ESP8285
- TYWE2S
- TYWE2L
- TYLC5
- TYWE3SE
Setup
- Download the latest Raspberry Pi OS Image and flash it to the SD card using Raspberry Pi Imager, DD or any imager you like.
* Raspberry Pi imager allow you to set the locale via advanced settings
Ensure WiFi is available
SSH into the computer
ssh pi@10.0.0.2
sudo raspi-config
> Localization Options
> WLAN Country
> Select the country in which the Pi is to be used.
sudo reboot
Optionally this step can be done at time of flashing the SD card by using the advanced setting in Raspberry Pi Imager
Install Tuya Convert Software
Install git if using the lite version of Raspberry Pi OS
sudo apt install git -y
git clone https://github.com/ct-Open-Source/tuya-convet
./tuya-convert/install_prereq.sh
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease Hit:2 http://archive.raspberrypi.org/debian buster InRelease Reading package lists… Done Reading package lists… Done Building dependency tree Reading state information… Done build-essential is already the newest version (12.6). curl is already the newest version (7.64.0-4+deb10u2). git is already the newest version (1:2.20.1-2+deb10u3). iw is already the newest version (5.0.1-1). iw set to manually installed. net-tools is already the newest version (1.60+git20180626.aebd88e-1). rfkill is already the newest version (2.33.1-0.1). rfkill set to manually installed. The following package was automatically installed and is no longer required: python-colorzero Use 'sudo apt autoremove' to remove it. The following additional packages will be installed: dh-python dns-root-data dnsmasq-base gir1.2-glib-2.0 libev4 libexpat1-dev libgirepository-1.0-1 libhavege1 libpython3-dev libpython3.7-dev libutempter0 libuv1 libwebsockets8 python-pip-whl python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography python3-dbus python3-distutils python3-entrypoints python3-gi python3-keyring python3-keyrings.alt python3-lib2to3 python3-secretstorage python3-xdg python3.7-dev Suggested packages: apparmor libssl-doc python-crypto-doc python-cryptography-doc python3-cryptography-vectors python-dbus-doc python3-dbus-dbg gnome-keyring libkf5wallet-bin gir1.2-gnomekeyring-1.0 python-secretstorage-doc python-setuptools-doc byobu | screenie | iselect The following NEW packages will be installed: dh-python dns-root-data dnsmasq dnsmasq-base gir1.2-glib-2.0 haveged hostapd libev4 libexpat1-dev libgirepository-1.0-1 libhavege1 libpython3-dev libpython3.7-dev libssl-dev libutempter0 libuv1 libwebsockets8 mosquitto python-pip-whl python3-asn1crypto python3-cffi-backend python3-crypto python3-cryptography python3-dbus python3-dev python3-distutils python3-entrypoints python3-gi python3-keyring python3-keyrings.alt python3-lib2to3 python3-pip python3-secretstorage python3-setuptools python3-wheel python3-xdg python3.7-dev screen 0 upgraded, 38 newly installed, 0 to remove and 0 not upgraded. Need to get 55.0 MB of archives. After this operation, 94.8 MB of additional disk space will be used. Get:1 http://archive.raspberrypi.org/debian buster/main armhf dnsmasq-base armhf 2.80-1+rpt1+deb10u1 [400 kB] Get:2 http://mirror.internode.on.net/pub/raspbian/raspbian buster/main armhf hostapd armhf 2:2.7+git20190128+0c1e29f-6+deb10u3 [632 kB] Get:3 http://mirror.datamossa.io/raspbian buster/main armhf libutempter0 armhf 1.1.6-3 [7,736 B] Get:5 http://archive.raspberrypi.org/debian buster/main armhf dnsmasq all 2.80-1+rpt1+deb10u1 [16.5 kB] Get:6 http://archive.raspberrypi.org/debian buster/main armhf libssl-dev armhf 1.1.1d-0+deb10u6+rpt1 [1,584 kB] Get:4 http://mirror.internode.on.net/pub/raspbian/raspbian buster/main armhf screen armhf 4.6.2-3+deb10u1 [547 kB] Get:7 http://mirror.datamossa.io/raspbian buster/main armhf python3-lib2to3 all 3.7.3-1 [76.7 kB] Get:8 http://mirror.datamossa.io/raspbian buster/main armhf python3-distutils all 3.7.3-1 [142 kB] Get:9 http://mirror.datamossa.io/raspbian buster/main armhf dh-python all 3.20190308 [99.3 kB] Get:10 http://archive.raspberrypi.org/debian buster/main armhf python-pip-whl all 18.1-5+rpt1 [1,591 kB] Get:11 http://mirror.datamossa.io/raspbian buster/main armhf dns-root-data all 2019031302 [5,396 B] Get:12 http://mirror.datamossa.io/raspbian buster/main armhf libgirepository-1.0-1 armhf 1.58.3-2 [78.8 kB] Get:14 http://archive.raspberrypi.org/debian buster/main armhf python3-pip all 18.1-5+rpt1 [171 kB] Get:13 http://mirror.datamossa.io/raspbian buster/main armhf gir1.2-glib-2.0 armhf 1.58.3-2 [143 kB] Get:15 http://mirror.datamossa.io/raspbian buster/main armhf libev4 armhf 1:4.25-1 [34.5 kB] Get:16 http://mirror.internode.on.net/pub/raspbian/raspbian buster/main armhf libexpat1-dev armhf 2.2.6-2+deb10u1 [127 kB] Get:17 http://mirror.internode.on.net/pub/raspbian/raspbian buster/main armhf libpython3.7-dev armhf 3.7.3-2+deb10u3 [47.2 MB] Get:18 http://mirror.datamossa.io/raspbian buster/main armhf libpython3-dev armhf 3.7.3-1 [20.1 kB] Get:19 http://mirror.datamossa.io/raspbian buster/main armhf libuv1 armhf 1.24.1-1 [96.7 kB] Get:20 http://mirror.datamossa.io/raspbian buster/main armhf libwebsockets8 armhf 2.0.3-3 [85.6 kB] Get:22 http://mirror.datamossa.io/raspbian buster/main armhf python3-asn1crypto all 0.24.0-1 [78.2 kB] Get:23 http://mirror.datamossa.io/raspbian buster/main armhf python3-cffi-backend armhf 1.12.2-1 [70.1 kB] Get:26 http://mirror.datamossa.io/raspbian buster/main armhf python3-dbus armhf 1.2.8-3 [95.9 kB] Get:28 http://raspbian.raspberrypi.org/raspbian buster/main armhf python3-dev armhf 3.7.3-1 [1,264 B] Get:29 http://mirror.datamossa.io/raspbian buster/main armhf python3-entrypoints all 0.3-1 [5,508 B] Get:30 http://mirror.datamossa.io/raspbian buster/main armhf python3-gi armhf 3.30.4-1 [161 kB] Get:31 http://mirror.datamossa.io/raspbian buster/main armhf python3-secretstorage all 2.3.1-2 [14.2 kB] Get:32 http://mirror.datamossa.io/raspbian buster/main armhf python3-keyring all 17.1.1-1 [43.1 kB] Get:33 http://mirror.datamossa.io/raspbian buster/main armhf python3-keyrings.alt all 3.1.1-1 [18.2 kB] Get:34 http://mirror.datamossa.io/raspbian buster/main armhf python3-setuptools all 40.8.0-1 [306 kB] Get:35 http://mirror.datamossa.io/raspbian buster/main armhf python3-wheel all 0.32.3-2 [19.4 kB] Get:36 http://mirror.datamossa.io/raspbian buster/main armhf python3-xdg all 0.25-5 [35.9 kB] Get:37 http://mirror.datamossa.io/raspbian buster/main armhf libhavege1 armhf 1.9.1-7 [23.0 kB] Get:38 http://mirror.datamossa.io/raspbian buster/main armhf haveged armhf 1.9.1-7 [33.0 kB] Get:21 http://mirror.internode.on.net/pub/raspbian/raspbian buster/main armhf mosquitto armhf 1.5.7-1+deb10u1 [143 kB] Get:24 http://mirror.internode.on.net/pub/raspbian/raspbian buster/main armhf python3-crypto armhf 2.6.1-9+b1 [251 kB] Get:25 http://mirror.internode.on.net/pub/raspbian/raspbian buster/main armhf python3-cryptography armhf 2.6.1-3+deb10u2 [184 kB] Get:27 http://mirror.internode.on.net/pub/raspbian/raspbian buster/main armhf python3.7-dev armhf 3.7.3-2+deb10u3 [513 kB] Fetched 55.0 MB in 29s (1,901 kB/s) Extracting templates from packages: 100% Selecting previously unselected package hostapd. (Reading database … 41298 files and directories currently installed.) Preparing to unpack …/00-hostapd_2%3a2.7+git20190128+0c1e29f-6+deb10u3_armhf.deb … Unpacking hostapd (2:2.7+git20190128+0c1e29f-6+deb10u3) … Selecting previously unselected package libutempter0:armhf. Preparing to unpack …/01-libutempter0_1.1.6-3_armhf.deb … Unpacking libutempter0:armhf (1.1.6-3) … Selecting previously unselected package screen. Preparing to unpack …/02-screen_4.6.2-3+deb10u1_armhf.deb … Unpacking screen (4.6.2-3+deb10u1) … Selecting previously unselected package python3-lib2to3. Preparing to unpack …/03-python3-lib2to3_3.7.3-1_all.deb … Unpacking python3-lib2to3 (3.7.3-1) … Selecting previously unselected package python3-distutils. Preparing to unpack …/04-python3-distutils_3.7.3-1_all.deb … Unpacking python3-distutils (3.7.3-1) … Selecting previously unselected package dh-python. Preparing to unpack …/05-dh-python_3.20190308_all.deb … Unpacking dh-python (3.20190308) … Selecting previously unselected package dns-root-data. Preparing to unpack …/06-dns-root-data_2019031302_all.deb … Unpacking dns-root-data (2019031302) … Selecting previously unselected package dnsmasq-base. Preparing to unpack …/07-dnsmasq-base_2.80-1+rpt1+deb10u1_armhf.deb … Unpacking dnsmasq-base (2.80-1+rpt1+deb10u1) … Selecting previously unselected package dnsmasq. Preparing to unpack …/08-dnsmasq_2.80-1+rpt1+deb10u1_all.deb … Unpacking dnsmasq (2.80-1+rpt1+deb10u1) … Selecting previously unselected package libgirepository-1.0-1:armhf. Preparing to unpack …/09-libgirepository-1.0-1_1.58.3-2_armhf.deb … Unpacking libgirepository-1.0-1:armhf (1.58.3-2) … Selecting previously unselected package gir1.2-glib-2.0:armhf. Preparing to unpack …/10-gir1.2-glib-2.0_1.58.3-2_armhf.deb … Unpacking gir1.2-glib-2.0:armhf (1.58.3-2) … Selecting previously unselected package libev4:armhf. Preparing to unpack …/11-libev4_1%3a4.25-1_armhf.deb … Unpacking libev4:armhf (1:4.25-1) … Selecting previously unselected package libexpat1-dev:armhf. Preparing to unpack …/12-libexpat1-dev_2.2.6-2+deb10u1_armhf.deb … Unpacking libexpat1-dev:armhf (2.2.6-2+deb10u1) … Selecting previously unselected package libpython3.7-dev:armhf. Preparing to unpack …/13-libpython3.7-dev_3.7.3-2+deb10u3_armhf.deb … Unpacking libpython3.7-dev:armhf (3.7.3-2+deb10u3) … Selecting previously unselected package libpython3-dev:armhf. Preparing to unpack …/14-libpython3-dev_3.7.3-1_armhf.deb … Unpacking libpython3-dev:armhf (3.7.3-1) … Selecting previously unselected package libssl-dev:armhf. Preparing to unpack …/15-libssl-dev_1.1.1d-0+deb10u6+rpt1_armhf.deb … Unpacking libssl-dev:armhf (1.1.1d-0+deb10u6+rpt1) … Selecting previously unselected package libuv1:armhf. Preparing to unpack …/16-libuv1_1.24.1-1_armhf.deb … Unpacking libuv1:armhf (1.24.1-1) … Selecting previously unselected package libwebsockets8:armhf. Preparing to unpack …/17-libwebsockets8_2.0.3-3_armhf.deb … Unpacking libwebsockets8:armhf (2.0.3-3) … Selecting previously unselected package mosquitto. Preparing to unpack …/18-mosquitto_1.5.7-1+deb10u1_armhf.deb … Unpacking mosquitto (1.5.7-1+deb10u1) … Selecting previously unselected package python-pip-whl. Preparing to unpack …/19-python-pip-whl_18.1-5+rpt1_all.deb … Unpacking python-pip-whl (18.1-5+rpt1) … Selecting previously unselected package python3-asn1crypto. Preparing to unpack …/20-python3-asn1crypto_0.24.0-1_all.deb … Unpacking python3-asn1crypto (0.24.0-1) … Selecting previously unselected package python3-cffi-backend. Preparing to unpack …/21-python3-cffi-backend_1.12.2-1_armhf.deb … Unpacking python3-cffi-backend (1.12.2-1) … Selecting previously unselected package python3-crypto. Preparing to unpack …/22-python3-crypto_2.6.1-9+b1_armhf.deb … Unpacking python3-crypto (2.6.1-9+b1) … Selecting previously unselected package python3-cryptography. Preparing to unpack …/23-python3-cryptography_2.6.1-3+deb10u2_armhf.deb … Unpacking python3-cryptography (2.6.1-3+deb10u2) … Selecting previously unselected package python3-dbus. Preparing to unpack …/24-python3-dbus_1.2.8-3_armhf.deb … Unpacking python3-dbus (1.2.8-3) … Selecting previously unselected package python3.7-dev. Preparing to unpack …/25-python3.7-dev_3.7.3-2+deb10u3_armhf.deb … Unpacking python3.7-dev (3.7.3-2+deb10u3) … Selecting previously unselected package python3-dev. Preparing to unpack …/26-python3-dev_3.7.3-1_armhf.deb … Unpacking python3-dev (3.7.3-1) … Selecting previously unselected package python3-entrypoints. Preparing to unpack …/27-python3-entrypoints_0.3-1_all.deb … Unpacking python3-entrypoints (0.3-1) … Selecting previously unselected package python3-gi. Preparing to unpack …/28-python3-gi_3.30.4-1_armhf.deb … Unpacking python3-gi (3.30.4-1) … Selecting previously unselected package python3-secretstorage. Preparing to unpack …/29-python3-secretstorage_2.3.1-2_all.deb … Unpacking python3-secretstorage (2.3.1-2) … Selecting previously unselected package python3-keyring. Preparing to unpack …/30-python3-keyring_17.1.1-1_all.deb … Unpacking python3-keyring (17.1.1-1) … Selecting previously unselected package python3-keyrings.alt. Preparing to unpack …/31-python3-keyrings.alt_3.1.1-1_all.deb … Unpacking python3-keyrings.alt (3.1.1-1) … Selecting previously unselected package python3-pip. Preparing to unpack …/32-python3-pip_18.1-5+rpt1_all.deb … Unpacking python3-pip (18.1-5+rpt1) … Selecting previously unselected package python3-setuptools. Preparing to unpack …/33-python3-setuptools_40.8.0-1_all.deb … Unpacking python3-setuptools (40.8.0-1) … Selecting previously unselected package python3-wheel. Preparing to unpack …/34-python3-wheel_0.32.3-2_all.deb … Unpacking python3-wheel (0.32.3-2) … Selecting previously unselected package python3-xdg. Preparing to unpack …/35-python3-xdg_0.25-5_all.deb … Unpacking python3-xdg (0.25-5) … Selecting previously unselected package libhavege1:armhf. Preparing to unpack …/36-libhavege1_1.9.1-7_armhf.deb … Unpacking libhavege1:armhf (1.9.1-7) … Selecting previously unselected package haveged. Preparing to unpack …/37-haveged_1.9.1-7_armhf.deb … Unpacking haveged (1.9.1-7) … Setting up python3-entrypoints (0.3-1) … Setting up python3-dbus (1.2.8-3) … Setting up libev4:armhf (1:4.25-1) … Setting up dnsmasq-base (2.80-1+rpt1+deb10u1) … Setting up python3-xdg (0.25-5) … Setting up python3-wheel (0.32.3-2) … Setting up dns-root-data (2019031302) … Setting up dnsmasq (2.80-1+rpt1+deb10u1) … Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service. Setting up libuv1:armhf (1.24.1-1) … Setting up hostapd (2:2.7+git20190128+0c1e29f-6+deb10u3) … Created symlink /etc/systemd/system/multi-user.target.wants/hostapd.service → /lib/systemd/system/hostapd.service. Job for hostapd.service failed because the control process exited with error code. See "systemctl status hostapd.service" and "journalctl -xe" for details. Created symlink /etc/systemd/system/hostapd.service → /dev/null. Setting up libexpat1-dev:armhf (2.2.6-2+deb10u1) … Setting up libssl-dev:armhf (1.1.1d-0+deb10u6+rpt1) … Setting up libhavege1:armhf (1.9.1-7) … Setting up libutempter0:armhf (1.1.6-3) … Setting up python3-crypto (2.6.1-9+b1) … Setting up libgirepository-1.0-1:armhf (1.58.3-2) … Setting up python-pip-whl (18.1-5+rpt1) … Setting up libwebsockets8:armhf (2.0.3-3) … Setting up python3-lib2to3 (3.7.3-1) … Setting up python3-asn1crypto (0.24.0-1) … Setting up python3-cffi-backend (1.12.2-1) … Setting up python3-distutils (3.7.3-1) … Setting up dh-python (3.20190308) … Setting up haveged (1.9.1-7) … Created symlink /etc/systemd/system/default.target.wants/haveged.service → /lib/systemd/system/haveged.service. Setting up python3-setuptools (40.8.0-1) … Setting up libpython3.7-dev:armhf (3.7.3-2+deb10u3) … Setting up screen (4.6.2-3+deb10u1) … Setting up python3.7-dev (3.7.3-2+deb10u3) … Setting up python3-cryptography (2.6.1-3+deb10u2) … Setting up gir1.2-glib-2.0:armhf (1.58.3-2) … Setting up python3-pip (18.1-5+rpt1) … Setting up mosquitto (1.5.7-1+deb10u1) … Created symlink /etc/systemd/system/multi-user.target.wants/mosquitto.service → /lib/systemd/system/mosquitto.service. Setting up python3-keyrings.alt (3.1.1-1) … Setting up libpython3-dev:armhf (3.7.3-1) … Setting up python3-secretstorage (2.3.1-2) … Setting up python3-dev (3.7.3-1) … Setting up python3-gi (3.30.4-1) … Setting up python3-keyring (17.1.1-1) … Processing triggers for libc-bin (2.28-10+rpi1) … Processing triggers for systemd (241-7~deb10u7+rpi1) … Processing triggers for man-db (2.8.5-2) … Processing triggers for dbus (1.12.20-0+deb10u1) … Processing triggers for install-info (6.5.0.dfsg.1-4+b1) … Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting git+https://github.com/drbild/sslpsk.git Cloning https://github.com/drbild/sslpsk.git to /tmp/pip-req-build-acnbtt22 Collecting paho-mqtt Downloading https://www.piwheels.org/simple/paho-mqtt/paho_mqtt-1.5.1-py3-none-any.whl (74kB) 100% |████████████████████████████████| 81kB 121kB/s Collecting tornado Downloading https://www.piwheels.org/simple/tornado/tornado-6.1-cp37-cp37m-linux_armv7l.whl (428kB) 100% |████████████████████████████████| 430kB 569kB/s Collecting pycryptodomex Downloading https://www.piwheels.org/simple/pycryptodomex/pycryptodomex-3.10.1-cp35-abi3-linux_armv7l.whl (1.8MB) 100% |████████████████████████████████| 1.8MB 174kB/s Building wheels for collected packages: sslpsk Running setup.py bdist_wheel for sslpsk … done Stored in directory: /tmp/pip-ephem-wheel-cache-zc1b4_6_/wheels/19/5d/ca/bb92c9b2e4aa13e12306893a6eadd16dbfcdfca942476ecfa1 Successfully built sslpsk Installing collected packages: paho-mqtt, tornado, pycryptodomex, sslpsk Successfully installed paho-mqtt-1.5.1 pycryptodomex-3.10.1 sslpsk-1.0.0 tornado-6.1 Ready to start upgrade
Start Tuya Convert Software
./tuya-convert/start_flash.sh
tuya-convert v9.9.9 TUYA-CONVERT https://github.com/ct-Open-Source/tuya-convert TUYA-CONVERT was developed by Michael Steigerwald from the IT security company VTRUST (https://www.vtrust.de/) in collaboration with the techjournalists Merlin Schumacher, Pina Merkert, Andrijan Moecker and Jan Mahn at c't Magazine. (https://www.ct.de/) ====================================================== PLEASE READ THIS CAREFULLY! TUYA-CONVERT creates a fake update server environment for ESP8266/85 based tuya devices. It enables you to backup your devices firmware and upload an alternative one (e.g. ESPEasy, Tasmota, Espurna) without the need to open the device and solder a serial connection (OTA, Over-the-air). Please make sure that you understand the consequences of flashing an alternative firmware, since you might lose functionality! Flashing an alternative firmware can cause unexpected device behavior and/or render the device unusable. Be aware that you do use this software at YOUR OWN RISK! Please acknowledge that VTRUST and c't Magazine (or Heise Medien GmbH & Co. KG) CAN NOT be held accountable for ANY DAMAGE or LOSS OF FUNCTIONALITY by typing yes + Enter
yes
yes
Checking for network interface wlan0… Found.
Checking UDP port 53… Occupied by dnsmasq with PID 2065.
Port 53 is needed to resolve DNS queries
Do you wish to terminate dnsmasq? [y/N]
y
Attempting to stop dnsmasq.service Checking UDP port 67… Available. Checking TCP port 80… Available. Checking TCP port 443… Available. Checking UDP port 6666… Available. Checking UDP port 6667… Available. Checking TCP port 1883… Occupied by mosquitto with PID 2448. Port 1883 is needed to run MQTT Do you wish to terminate mosquitto? [y/N]
y
Attempting to stop mosquitto.service Checking TCP port 8886… Available. Starting AP in a screen. Starting web server in a screen Starting Mosquitto in a screen Starting PSK frontend in a screen Starting Tuya Discovery in a screen ====================================================== IMPORTANT Connect any other device (a smartphone or something) to the WIFI vtrust-flash This step is IMPORTANT otherwise the smartconfig may not work! Put your IoT device in autoconfig/smartconfig/pairing mode (LED will blink fast). This is usually done by pressing and holding the primary button of the device Make sure nothing else is plugged into your IoT device while attempting to flash. Press ENTER to continue
ENTER
Related
- How to Flash a Compatible Iot device with Tasmota
- Raspberry Pi Imager Essentials
- Wireless Access Point Raspberry Pi Zero W
- Enable Two Factor Authentication on Raspberry Pi
- VNC Access to Raspberry Pi from Ubuntu
- Pi Camera Essentials
Links
- https://tasmota.github.io/docs/Tuya-Convert/