[DEPRECATED]TuyaHubitat - (jinvoo, smart life, tuya smart - switches only)

This is awesome news. I had not realized the plugs could be flashed ota. I thought we had to tear them open to get at contacts.

Curious does anyone know if the powerstrips can be flashed and work the same?

@cwwilson08 I have one that i will be testing today. just got the 1st lightbulb tuya based walmart merkery bulb flashed. Need to figure out which sonoff firmware to use now then I will Flash my powerstrip.

1 Like

Interesting article about tiya devices.

Yeah I only know because I was given them by a Chinese company...
The API seems like it needs significant work to connect to devices even if you have them connected locally.
So it seems secure.
Who knows what they're doing with usage history and any other network snooping they might be doing internally though.

Ok so the Tuya Bulb is running Tasmota but I cant get it to turn off or change color from the web interface. It looks as if it uses the, as of now, FastLED driver and SM16716 or SM16726 protocol. There has been some people working on this but I don't see a firmware that will work as of yet. Anyone?

@JulesT So I finally got the bulb working with white only and I can turn the bulb of/on and Dim.

I'm using https://github.com/arendst/Sonoff-Tasmota/releases/download/v6.4.1/sonoff.bin for the firmware
I'm changing the module type to Magic home (34) in the Module parameters.

Then using the Device hander Release: Sonoff Tasmota RGB Light Driver (MagicHome, H801)

I'd like to see if its possible to get the rgb part working and I can change all of these bulbs over!

OK Damon. That's properly interesting.

Did you manage to flash the bulb OTA, or is it a strip-down to get at contacts job (in which case... I'll have to go raid some stuff off my mate at work next week some time for the gubbins necessary).

Secondly... can you get light colour control from the web interface from the bulb if it's running tasmota. I'm not an expert on it... but my guess is that if the web interface can't do colour, then it's a firmware limitation.... but if it CAN, then it's a device driver limitation. I suspect we can do something about the latter.

-- Jules

@JulesT i was able to do it OTA. I have notes i can send you if you have a raspberry pi with raspian stretch loaded. If not there is still ways to do it just not as easy. Its definatly firmware or a setting to control the right IO for RGB. Were probably going to have to reach out and get someone familiar with the tasmota firmware dev interested but now that this can be done ota im sure there will be more interest.

@damon.dinsmore - Yes please on the notes - I'm sure all the info is out on the interwebs somewhere, but I'm definitely not above somebody else spoon-feeding it to me :wink:

An R-pi with raspian is no particular problem - I've got two of them sat on my desk right now (more a reflection of the state of my desk, if I'm honest - I don't think I've powered either of them up in months). Equally, if the device itself doesn't absolutely require it's own wireless adapter, and can just use the local network it's currently attached to, then linux virtuals are all over the place.

If I understand the rest of your note correctly, then our challenge is then to get either the right settings in the firmware config, or to see if it can be fixed/extended. I think that's something we can play with, at the very least.

My lamp adapter is apparently arriving monday, so I should be able to get a bulb where I can at least see it, which should help immensely.

OK. All good fun. And if we do it right... there won't be a whole bunch of code that I'll have to subsequently look after, which I always consider a win.

-- Jules

Aha! And my adapters have turned up 2 days early. Marvellous :wink:

Now to find where I left that spare bulb. In the Loft somewhere, I'm guessing.

-- Jules

@JulesT Awesome! Ok so you will need the wifi on the pi to do OTA. Here are my notes

This is tested on Raspbian (Stretch)

Inital 1 time Setup
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install hostapd
sudo apt-get install dnsmasq
sudo sed -i '3idenyinterfaces wlan0' /etc/dhcpcd.conf
head -3 /etc/dhcpcd.conf
ps -fu root | grep wpa_supplicant
sudo systemctl restart dhcpcd
ps -fu root | grep wpa_supplicant
git clone GitHub - SynAckFin/TuyOTA: Flashing Tuya devices with Tasmota firmware.

cd TuyOTA

*** Device must be setup in Smartlife or similar for OTA to work ***
*** Shut Down any app talking to the TUYA devices ***

{Find The Ip of the Device you want to do OTA Firmware upload and Replace 192.168.1.xxx}
{The -s is the wifi network CASE SENSITIVE and -p is the password}

pi@raspberrypi:~/TuyOTA $ sudo ./tuyota.pl -ip 192.168.1.xxx -s yourwifi -p xxxxxxxxxxxxx

may have to ping 192.168.4.1 from pi to get past final stage listener in a second Terminal window

Login to the Device using the web interface and upload the Firmware you really want to use.

Let me know if it works for you. I was able to get a Merkery bulb to Flash but the Lombex would not...
What bulb do you have?

@cwwilson08 I tried to OTA flash the power strip and mine did not work. I have the ChiHope branded one. You may have better luck. I was thinking that a driver would need to be created for that device as the current one is based off the tuyAPI

Lol yeah I made this driver. Would be willing to put time in to create one for this new firmware if we can get it flashed.

@cwwilson08 that's right. Well, I will see if I cannot get it to flash OTA then I will see if I can non-destructively open this one up and flash it. What branded one do you have?

I believe it is amtek - will confirm when i get home

@cwwilson08 Ok so the bottom comes off easily and no need to remove the board out of the case but it will require soldering wires to the tyw3s board see link for pin out

https://docs.tuya.com/en/hardware/WiFi-module/wifi-e3s-module-plug.html

This should work with the Tasmota software but will need the basic module set and all the options correctly selected. I'm sure you already know what needs to be done. Let me know if you need more info. I am waiting for parts comming in early this week to be able to attempt this myself.

1 Like

If you can provide some pictures of what it should look like when successfully done I might attempt this. I usually do not go quite this far with electronics but am always up for a challenge.

Lol I save lives for a living. Tinkering with my hubitat is what I do to annoy my wife....

Actually just found this.

This really seems more in @ericm's ballpark. So tagging him maybe he has worked with these?

@cwwilson08 LOL! Actually, the link shows exactly what needs to be done in the 2nd and 3rd pictures. Have you ever soldered wires onto a pcb before? And btw that link is exactly what we needed for this setup. I can't believe I didn't find that.

1 Like

Yes I have. I am however far from proficient. Looking at the pics I think I can accomplish the task though.

@cwwilson08 Awesome. When you have that let me know and ill do what i can to walk you thru the rest. Do you have FTDI usb uart