SA smart plugs that can be flashed with Tasmota

zubs07

Active Member
Joined
Jul 12, 2013
Messages
35
Out of interest what version of Tuya-convert were you using?

Also what version of Pi? Or other device if not a Pi?

I simply can’t believe that Loot would have different batches in their stock, so must be something that did the trick here.

I used version 2.4.4.
1601667849684.png

I'm using a Pi 4b 4gb
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
39,860
I used version 2.4.4.
View attachment 926029

I'm using a Pi 4b 4gb

Alright exact same version and Pi as I’m using so it must the the plugs themselves.

And the onboard WiFi I take it? Going by your screenshot of Wlan0.

Latest Raspberry Pi OS I would imagine?

Guess I’ll be popping them open and hard wiring it.
 

ebendl

Expert Member
Joined
Sep 27, 2004
Messages
4,309
I used version 2.4.4.
View attachment 926029

I'm using a Pi 4b 4gb

It looks like dnsmasq was running which was using UDP port 53 -- so you can probably stop dnsmasq with something like 'sudo killall -9 dnsmasq'

In other words, it wasn't the plug giving you problems, it was the Pi (or rather, Raspbian).
 

system32

Expert Member
Joined
Dec 29, 2009
Messages
4,537
It looks like dnsmasq was running which was using UDP port 53 -- so you can probably stop dnsmasq with something like 'sudo killall -9 dnsmasq'

In other words, it wasn't the plug giving you problems, it was the Pi (or rather, Raspbian).
start_flash.sh takes care of dnsmasq (and mosquitto)
The problem is the latest Ultra-Link UL-P01W firmware can't be replaced OTA by tuya-convert.
The lastest plugs have new firmware that does not work with tuya-convert OTA.
Checking the issues page on github:
https://github.com/ct-Open-Source/tuya-convert/issues
You will see quite a few similar problems (with other devices)
If anyone has ideas on how to update tuya-convert to work with newer devices that will help.

My suggestion is to contact the supplier of the Ultra-Link UL-P01W and see if they can downgrade the firmware or ship it with tasmota.
https://ultralink.co.za/

Having the open source Tasmota firmware is a sales plus for these devices, not sure why they block tuya-convert OTA,
 
Last edited:

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
39,860
I opened up one of the Ultralinks and I must say it's very well made considering how I struggled to get in but more so how it's put together.

Going to be some serious work to serial flash that.
 

gbyleveldt

Senior Member
Joined
Apr 30, 2009
Messages
641
Nah man, once you figured out the first one the rest go quick. Post some pics of the insides, maybe I can help
 

system32

Expert Member
Joined
Dec 29, 2009
Messages
4,537

Attachments

  • IMG_20201007_001119.jpg
    IMG_20201007_001119.jpg
    2.1 MB · Views: 41
  • IMG_20201007_001301.jpg
    IMG_20201007_001301.jpg
    967.9 KB · Views: 37
  • IMG_20201007_001528.jpg
    IMG_20201007_001528.jpg
    1.9 MB · Views: 37
  • IMG_20201007_003146.jpg
    IMG_20201007_003146.jpg
    343.8 KB · Views: 37
  • IMG_20201007_003217.jpg
    IMG_20201007_003217.jpg
    377.9 KB · Views: 36
  • IMG_20201007_003532.jpg
    IMG_20201007_003532.jpg
    836.2 KB · Views: 38
  • IMG_20201007_004357.jpg
    IMG_20201007_004357.jpg
    732.2 KB · Views: 40
  • IMG_20201007_004825.jpg
    IMG_20201007_004825.jpg
    957.8 KB · Views: 43

gbyleveldt

Senior Member
Joined
Apr 30, 2009
Messages
641
Ok, you are lucky in that everything is nicely marked. I’m just not sure of all the required pins being brought out to the header, although they are all available on the TYWE2S module. So you’ll have to trace if the required ones go to the header.

3V3
GND
RX
TX
IO0

if you have these going to the header you golden. Even if they don’t all break out, it’s really easy to solder seeing as everything is nicely labeled for you
 

Chevauxza

Well-Known Member
Joined
Jan 11, 2014
Messages
207
Alright exact same version and Pi as I’m using so it must the the plugs themselves.

And the onboard WiFi I take it? Going by your screenshot of Wlan0.

Latest Raspberry Pi OS I would imagine?

Guess I’ll be popping them open and hard wiring it.

You can also use a normal laptop with Kali Linux booted from a live usb (i.e. not installed on the laptop). I used this method to convert my OTA compatible plugs.
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
39,860
You can also use a normal laptop with Kali Linux booted from a live usb (i.e. not installed on the laptop). I used this method to convert my OTA compatible plugs.

Yeah I tried my Ubuntu machine as well just in case and same result so I’m pretty sure it’s not the software but the plugs.

I’ve opened on but will need to de-solder on the weekend and see if there is a chance in hell to flash those very small contacts.
 

system32

Expert Member
Joined
Dec 29, 2009
Messages
4,537
Ok, you are lucky in that everything is nicely marked. I’m just not sure of all the required pins being brought out to the header, although they are all available on the TYWE2S module. So you’ll have to trace if the required ones go to the header.

3V3
GND
RX
TX
IO0

if you have these going to the header you golden. Even if they don’t all break out, it’s really easy to solder seeing as everything is nicely labeled for you
Ultra Link UL-P01W
The header is used for the LED and button.
I could only trace 3V3 GND and TX to the header.
The RX is on the main board and IO0 on the TWYE2S
I tried soldering an RX and using a contact for the IO0.
Tried to use an RPI4 UART - but the 3.3v not adequate.
Waiting for a USB2serial adapter.

Also looking to use something like
Tuya LOCAL with energy monitoring and without tuya-convert
https://community.home-assistant.io...-monitoring-and-without-tuya-convert/173564/2
https://www.youtube.com/watch?v=tmhRTQ87REE

I managed to get the devId and localKey - no need to root your phone - use NOX
Install NOX Android Emulator (Some use LDPlayer - seems to be an old fork of NOX, could probably use BlueStacks)
Download SmartLife 3.4.1 (or earlier) from apkmirror or other APK repo
https://www.apkmirror.com/uploads/page/2/?q=smart-life-smart-living
Newer versions store the keys elsewhere.
Install to NOX (just drag downlaoaded APK onto to the NOX window)
Login to SmartLife 3.4.1 on NOX, this will save the keys locally.
Enable root on NOX gui so you can file browse to where the keys are stored:
The keys are in NOX:/data/data/com.tuya.smartlife/shared_prefs/preferences_global_key_<some chars and numbers>.xml

Once you have the IP, devId, localKey you should be able to configure node red or home assistant to use the plug.

I'm looking to use configure a mq server with DNS spoofed mq.gw.tuyaus.com on port 1883 - see Leo's notes:
https://leo.leung.xyz/wiki/Tuya_WiFi_Smart_Plug

I've also send an email to local supplier to see if they can downgrade the factory firmware to allow for OTA tuya-convert.
Perhaps a few myBB members can also send email/phone the local supplier - the contact details are on:
https://ultralink.co.za
https://www.facebook.com/interfoto.co.za/
https://interfoto.co.za/
 
Last edited:

system32

Expert Member
Joined
Dec 29, 2009
Messages
4,537
Ultra Link UL-P01W
The header is used for the LED and button.
I could only trace 3V3 GND and TX to the header.
The RX is on the main board and IO0 on the TWYE2S
I tried soldering an RX and using a contact for the IO0.
Tried to use an RPI4 UART - but the 3.3v not adequate.
Waiting for a USB2serial adapter.

Also looking to use something like
Tuya LOCAL with energy monitoring and without tuya-convert
https://community.home-assistant.io...-monitoring-and-without-tuya-convert/173564/2
https://www.youtube.com/watch?v=tmhRTQ87REE

I managed to get the devId and localKey - no need to root your phone - use NOX
Install NOX Android Emulator (Some use LDPlayer - seems to be an old fork of NOX, could probably use BlueStacks)
Download SmartLife 3.4.1 (or earlier) from apkmirror or other APK repo
https://www.apkmirror.com/uploads/page/2/?q=smart-life-smart-living
Newer versions store the keys elsewhere.
Install to NOX (just drag downlaoaded APK onto to the NOX window)
Login to SmartLife 3.4.1 on NOX, this will save the keys locally.
Enable root on NOX gui so you can file browse to where the keys are stored:
The keys are in NOX:/data/data/com.tuya.smartlife/shared_prefs/preferences_global_key_<some chars and numbers>.xml

Once you have the IP, devId, localKey you should be able to configure node red or home assistant to use the plug.

I'm looking to use configure a mq server with DNS spoofed mq.gw.tuyaus.com on port 1883 - see Leo's notes:
https://leo.leung.xyz/wiki/Tuya_WiFi_Smart_Plug

I've also send an email to local supplier to see if they can downgrade the factory firmware to allow for OTA tuya-convert.
Perhaps a few myBB members can also send email/phone the local supplier - the contact details are on:
https://ultralink.co.za
https://www.facebook.com/interfoto.co.za/
https://interfoto.co.za/
With the IP, devId, localKey, I ended up writing a small python app using https://github.com/TradeFace/tuyaface to pull the Power(W), Current(A), Voltage(V) from the plug and push the data to mqtt to emulate tasmota native.
Tuyaface seems to be well written and modern, does a heatbeat and any new data is async sent to the client.
My python app keeps track of Today(kWh),Yesterday(kWh) and Total(kWh) and includes that in the mqtt payload.
Not ideal, but good enuf until tasmota-convert OTA starts working again.

EDIT:
https://github.com/mysystem32/smartplug2mqtt
 
Last edited:

Saba'a

Executive Member
Joined
May 21, 2009
Messages
6,320
Hi

Last night the aircon suddenly stopped operating.

I removed the ultralink UL - P01W smart plug. Plugged aircon in directly and aircon worked.

The smartplug was on and not overheated.

Plugged it into a socket this morning and works fine.

Could it be power of aircon too much? Its a 12 000BTU Midea.
5a22387a1d6a05b25e8824c646653aca.jpg
 
Last edited:

ebendl

Expert Member
Joined
Sep 27, 2004
Messages
4,309
Hi

Last night the aircon suddenly stopped operating.

I removed the ultralink UL - P01W smart plug. Plugged aircon in directly and aircon worked.

The smartplug was on and not overheated.

Plugged it into a socket this morning and works fine.

Could it be power of aircon too much? Its a 12 000BTU Midea.
5a22387a1d6a05b25e8824c646653aca.jpg

The plugs are rated for 16A, meaning the same as an SA wall socket. Therefore if the aircon is designed to work from a wall-socket then this should work too...

How much W is the aircon?
 

Saba'a

Executive Member
Joined
May 21, 2009
Messages
6,320
The plugs are rated for 16A, meaning the same as an SA wall socket. Therefore if the aircon is designed to work from a wall-socket then this should work too...

How much W is the aircon?
Its been working flawlessly for a month. So last night's hiccup was an oddity.

Might be some other abberation.
1fef48bfa853eeba646f18628563c26a.jpg
 

ipodmusicman

Senior Member
Joined
Aug 11, 2003
Messages
747
Hi folks, I got a BNETA smart plug about a week or so ago ... and I'm struggling to Tuya-convert it. I managed this about 3 months ago or so very successfully, but it seems I am hitting a brick wall. I cannot recall, but resetting the device requires me to hold the button in right? The LED does flash, but only flashes for about 2-3 seconds or so and goes solid. I am getting the feeling that I might need to crack this plug open and go in the old fashioned way to solder wires, etc which _really_ didn't want to do. Anybody else bought a BNETA recently and getting the same issue?
 

system32

Expert Member
Joined
Dec 29, 2009
Messages
4,537
Hi

Last night the aircon suddenly stopped operating.

I removed the ultralink UL - P01W smart plug. Plugged aircon in directly and aircon worked.

The smartplug was on and not overheated.

Plugged it into a socket this morning and works fine.

Could it be power of aircon too much? Its a 12 000BTU Midea.
5a22387a1d6a05b25e8824c646653aca.jpg
Is your plug running Tasmota?
Which Version of Tasmota?

The UL-P10W plug is rated to 3540W - I've used it with a 3,200W Geyser and no problems.
I'm running Tasmota 8.5.1

AFAIK, some factory Tuya firmware devices will stop working after 7 days if firewall blocked from contacting the C&C servers - all the more reason to install Tasmota
 
Top