Tasmota tuya bulb

Tuya-Convert guide – OTA flashing of smart bulbs and plugs

I bought one Sonoff B1 R2 to test with… it was a ball-ache to programme it with custom firmware Tasmota but it was possible and it works well once flashed. The light was on special too and a fair bit cheaper than the Sonoff. This was too tempting. The device has the same basic specs and power rating as the Sonoff B1. The module the MCU is on, as it turns out, is made by a company called Tuya. In short Tuya makes ready-to-go ESP modules that are pre-flashed to work with their cloud infrastructure. The idea being that you point your users to a white label app branded with your logos, which configures the device via WiFi. There are no easily-accessible pins to flash this device… maybe someone has hacked the OTA protocol. It also means their interaction via MQTT can be homogenised into a common format, regardless of manufacturer. Bring me the Pi! Tailing the log files indicates the device is present but rejected connection attempts. Probably a race condition. Here we go. Do this quickly, you have 3 minutes from boot to do it otherwise the device reboots. Okay, so at this point we have an ESP running the base Tasmota firmware. The Tasmota firmware has different modules which allow it to manage different kinds of devices. So this is great, but now I want to get the device to talk to Home Assistant. To do that start by configuring the device name :. This is a quick deep dive into home automation with Home Assistant. I bought my house back in The garden came with an irrigation system, but no valves and no automation. I went looking for valves and a suitable controller… but they were terrible; they had horrible LCD displays that required cryptographic experience to interpret and they cost a ton. I never figured out how to operate it. This was and that meant there were no Raspberry Pis. Using some tricks I managed to get the Arduinos down to Hz and that was reliable enough. Initially your coding choices were Arduino or Lua but eventually MicroPython took away that world of hurt. Great for cron-based irrigation control, crap for turning on lights during an evening with friends. The pool pump never turns on at the wrong time. Then, per chance, I came across Home Assistant. I decided to give it a proper try and started configuring it to talk to my existing devices. Home Assistant is a collection of docker containers running on a machine in my case an Arm single board computer.

SmartLife/Tuya WiFi light switch with Tasmota and nymea


There are several Tuya dimmer and switch variants made by various manufacturers. The switches range from 1 to 8 gangs. The dimmers are usually 1 gang. Consult the specific device for the type of bulbs and capacity it supports as well as the bulbs themselves to verify they support dimming. The basic identification of a Tuya device is when the device information references the "Tuya Smart", "SmartLife", or "Smart Living" app. The easiest way to identify if your switch or dimmer uses MCU is by using a continuity tester multimeter, ohmmeter and checking continuity from the Rx and Tx pins on TYWE3S to any other chip. Then check the datasheet of that chip to see if it is an MCU. It can be left grounded for the entire process. There are few ways to do it: 1. Naah, too much work 2. Messy work, we want cleaner approach 3. We like that. If there are some contacts or test points in switches that connect to the MCU, you might be lucky to find contacts for RST that you can easily solder onto. Use a 6. Now you need to follow the commands explained in the flashing tutorial. Once the switch is carefully popped open you will need to remove the ribbon cables for flashing and ease of soldering. An easy soldering method is to take several Dupont style jumper wires, cut one end off, and apply a bit of solder to each stripped end. This will keep the wire flexible and prevent any circuit board pads from ripping off. Apply a bit of solder to each pad necessary to flash double check your pin-outs. Once the wire and pad have solder simply put the two together and apply a bit of heat and they will join together. Attach the GPIO0 wire to ground during initial boot to flash. Verify that you are using 3. Curtain motors come in a confusing array. But it talks using 8N1not USB. And done. The curtain motor also presents DpId 0x66 as a single event "Full Open" 00"Full Close" 01and "Stop" 02 command; but as of SeptemberI can't see how to get that working. The curtain motor also presents DpId 0x67 as a Boolean. I have only seen value 0x01 in all my prodding. Confirm by checking continuity with a multimeter. IO0 from the TYWE3s also needs to be grounded upon boot, otherwise it's normal tasmota flashing procedure. Bought from ebay. Skip to content. Connect to it and go to Enter the Wi-Fi credentials for your network and click save. Connect your PC back to your network. Now you need to find the IP of newly connected Tasmota device. Refer to this very good video from SuperHouseTV ignore flashing information about configuring Tasmota. You already know the pin connections to the MCU. Connect a test bulb or to the final place if you don't mind testing there Once this is saved and device is rebooted.

How to install ESPHome or Tasmota on a cheap smart wifi RGB bulb


Originally, in those devices, the Wi-Fi module takes care of network and software features. Meanwhile, the MCU controls the hardware based on commands received from the Wi-Fi module or built-in controls buttons, switches, remotes and similar and reports the status back to the Wi-Fi module. If any existing entry with same fnId or dpId is already present, it will be updated to the new value. All the device functions controlled by the MCU are identified by a dpId. Whenever a command is sent to the MCU, this dpId determines which component needs to be controlled and the applies when the status is received from MCU. This component is under active development which means the function list may expand in the future. Command TuyaSend is used to send commands to dpId's. It is required for dpId's that shouldn't be mapped to a fnId. With this command it is possible to control every function of the dpId that is controllable, providing you know its data type and data length. With them provided, the rest of the protocol command is calculated. Note that when sending color values, the MCU may interpret lower case and upper case hex codes differently. You may need to test with your specific MCU to ensure that the values sent properly render the color you desire. The dimmer FunctionId is On a dimmer dpId generally is 2 or 3. Try both. Once you have figured out the dimming functionId, we need to find the maximum dimming range. Once the dimming Id is set, the logs will continue. Now using the hardware buttons increase the dimmer to its maximum and observe the log. Once the dimmer is at max, note this number. Again using hardware buttons decrease dimmer to minimum and note the number for minimum. Now we need to tell Tasmota to use maximum and minimum values. This controlled by DimmerRange command. Once set, try dimmer in the Console and check if the brightness of bulb is same is the same as when the maximum was set using hardware buttons. For this its better to use a bulb with known wattage rating. In the RX Packet we are interested in the 3 digits before last 2 digits. For example: 98f in "55aafb5". By default, the TuyaMCU module expects a 1 gang switch. There is currenty no way to detect the number of relays present in an MCU based switch.

Pwn the Tuya lightbulbs


Maybe you could break that out in 1. I went to add a T. But there No Buttons in the dropdown selection. Great, I was waiting this kind of ota flash from a long. Your job is very helpful, thank you very much. Greetings from Italy Giancarlo. Thank you so much for this walk through! I purchased a pair of the Tessan dimmers, and successfully flashed them over the air using tuya-convert and your instructions. The new overall behavior of the dimmer switch did not make my wife happy. I found that his forked firmware of Tasmota contains the MJ Martin Jerry Dimmer module that works perfectly with the Tessan dimmers, bringing my dimmers to their original behavior. Winston, I also purchased the Tessan dimmers and am getting weird behavior using the settings. Can you explain how the forked bin is applied? My wife is also giving me the stink-eye :. This is a great article and has helped me get going. A labour intensive process. In these trial-and-error attempts I seem to have got the switch into a bad state. No magic formula for getting them back into working shape, sometimes you can hold down a button during power on. Do you know what change caused it to brick? I entered the wrong password of my SSID in the initial setup…. Now, device cannot connect to the wifi… Any suggestion to help me out of soldering pin in this ultra small plug? If you have another router you can create a network with the same SSID and no password open network and connect your plug to it, then you can log into your plug and change to the correct password. Make sure to do this somewhere other than inside your existing wifi network or you could screw some stuff up. Not sure what the issue is. I have also had some difficulty with getting the Tuya Convert to hold the wifi Signal. Has anyone had similar challenges? Your email address will not be published. Skip to content. February 18, admin 17d Comments. A wifi device that can connect to the SSID that will be generated by the raspberry pi and eventually the flashed tuya device. This cannot be an iOS device, android devices will work. Select the disk image you downloaded and your microSD card from the etcher interface. Press Flash and wait. Add a blank file called "ssh" to the root of the raspberry pi to enable the SSH service on raspbian. Plug the SD card into your raspberry pi, connect power and ethernet and boot it up. Enter the IP address of your raspberry pi in the box that says "Host Name". I recommend using an app like Fing to find the IP address of your raspberry pi. In the "Saved Sessions" input box, name your raspberry pi connection and then press "save". Select your new saved session. Press "Open". Setting up your Pi and updating the OS In the putty window login with user "pi" and password "raspberry" Expand the file system by typing "sudo raspi-config" then selecting "Advanced Options" and then "Expand Filesystem", select "Finish" and then select "Yes" when it asks to reboot.

Other Devices

I explained that Tuya-Convert is a much easier method assuming you can get a bulb that has not been updated. Well I finally managed to get my hands on a bulb that was on the correct firmware so finally I can show how to use the much easier Tuya-Convert method to flash your bulb! Tuya-Convert is a very easy method of flashing your esp based smart bulbs with custom firmware, so that you can remove the need for your IoT devices to speak to Chinese cloud servers and allows you to integrate with Home Assistant, OpenHAB or Domoticz. Finally you might want to check out the compatibility list on the Tuya-Convert GitHub page where the community has kindly posted their results with certain bulbs. Firstly we need to be booted into our Linux environment. Then open a terminal and issue the following commands:. This will install Git if not already included in your distro, then will download Tuya-Convert. The final step will update your distro and install the required package for Tuya-Convert to run. This can take a few minutes to complete depending on your hardware. Once both these steps are done, you can hit enter and wait. This can take a minute or two to complete. Your device should stop flashing and the light should be on constant. Your terminal window should look similar to this which will indicate a success:. Once done, you can then connect to the web page of your device to continue setup. Congratulations, you just successfully flashed your smart bulb or plug! You have a ton of options now for integrations and are free to flash any firmware you desire! A backup of the original firmware is automatically saved so keep this safe incase you ever want to go back for some reason. You will find it in the tuya-convert folder. The most common issue you will run into is that your device has a new firmware on it which prevents this procedure. You know if this is the case if when you start the flash procedure, your device exists pairing mode and stops flashing, but nothing happens in your terminal window. Unfortunately the guys behind the tuya-convert project have been unable so far to get around this, hopefully they can in the future. Please consider creating an issue on github in order to help the community know which ones to avoid!

Tuya + Custom Firmware = Perfection! (No Soldering Required)



Comments on “Tasmota tuya bulb

Leave a Reply

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>