Add Support for Smart Life Components

I don’t have any of the bulbs to help you test but I have a bunch of the switches.

I can’t really edit the implementation of the switches (I don’t own any of them) but I own a tuya based bulb. So bulbs should soon be working (my fork of the tuya-homeassistant repo: https://github.com/samuscherer/tuya-homeassistant/blob/master/tuya.py) - the switches are already implemented within the original repository but I can’t check if they work properly.

1 Like

Bulbs do work now.
Just follow the instructions in the readme file of my tuya-homeassistant repo (https://github.com/samuscherer/tuya-homeassistant/blob/master/tuya.py).
PLEASE KEEP IN MIND: My implementation of the bulb isn’t yet merged into the official pytuya repo and therefore not available via pip. You need to use my fork of pytuya (https://github.com/samuscherer/python-tuya) until it’s merged. I recommend waiting until this has happened. If you still want to use it, go ahead, but there may be some problems (although there shouldn’t be). I’ll post another update once this has happened.

Let me know if you have any questions.

3 Likes

I tried following the instructions to get the product id and local key but I was unsuccessful :frowning: Is there any other way?

isn’t all this still dealing with a cloud server api. Not really fitting with home assistant’s ethos or my wishes.

I have a dual gang wifi switch which uses smart life, but my preference is to flash tasmota or something similar and control it locally.

1 Like

Have you tried flashing the tasmota to one yet?

I’ve tried, but I think there is a problem with my wiring (trying to hold pogo pins and typing really requires 3 hands)

1 Like

@samuscherer can this monitor the watts

I usually just block the devices MAC addresses so that they can’t communicate with the cloud anymore.

My tuya plugs “SWA1” cannot monitor energy consumption, I don’t think they have the required hardware built-in to do that.

Edit: Apparently there are other tuya plugs that monitor energy consumption, I don’t know whether that is implemented in pytuya yet.

If you use this way of communicating with the tuya devices, you do not need an internet connection. Also, as far as I understand, a common theme is that these devices can only keep one TCP connection alive, meaning that when using this way of controlling the devices, you need to uninstall the “smart life” app.

My smart switch, can monitor the wattage (mw), amperage, see how much it’s used this week and the year, it shows also for the time it has on, how much KWh has been used since it came on. It would be nice to use that information for another automation.

Thank you, my mistake and excellent to know.

EDIT: when I saw “API” I thought that it meant an API to connect with some cloud server, I guess I should have read the code. I have now voted and will stop trying to flash Tasmota on to the switch. If there is any testing I can help with, please let me know. I have one two gang US switch with touch controls. This one https://www.aliexpress.com/store/product/QIACHIP-Wifi-Smart-Switch-2-buttons-Wireless-Smart-Home-APP-Touch-Control-Wall-Light-Switch-US/2888005_32845528129.html?spm=2114.12010612.0.0.21ce735aHiNesN

It uses smart life and has an open port 6668.

I don’t think it’s implemented. Can you tell me which plug is able to monitor the power consumption so that I can maybe take a look at implementing this?

I have a couple Gosund which has Energy Monitoring and Timer.

1 Like

Do you still have a problem? I managed to get my sorted using an android phone and an old version of the Jinvoo app, will try and assist if you need help?

Yeah I still have the problem. Where do I get an old version of the Jinvoo app? I do have an android phone (not rooted).

https://downloadapk.net/Jinvoo-Smart.html this is the one I used. The latest copy of the Packet capture is fine. Is it a single or multiple socket?

No root required.

It’s a single socket switch and I also have a light bulb that uses Smart Life