sincze wrote: ↑Thursday 28 February 2019 16:51Ok you have a more expensive plug that is for suredorenberg wrote: ↑Thursday 28 February 2019 12:41 The counting seems not to work over here. Keeps 0.000 kwh. So maybe I did something wrong.
all info is available in the plug. Just in another json block.....
0.02 is in kWh of today. 0.43 is total.
{
"result": {
"thisDay": "0.02",
"sum": "0.43",
"years": {
"2019": {
"02": "0.43"
}
}
},
"t": 1549792047291,
"success": true,
"status": "ok"
}![]()
I have it solved like this:
computed.JPG
[REQUEST] Plugin for Tuya
Moderator: leecollings
-
- Posts: 111
- Joined: Monday 22 June 2015 20:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10982
- Location: Veghel, The Netherlands
- Contact:
Re: [REQUEST] Plugin for Tuya
yes stupid me. It works with the setting computed. THe plug was 11.50 euros incl shipping so not that expensive hahaha
-
- Posts: 34
- Joined: Tuesday 23 February 2016 9:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.9700
- Location: NL
- Contact:
Re: [REQUEST] Plugin for Tuya
Yes I'm very happy like a little kid nearly.
Sinze (my neighbor) did a excellent job. This is what I was looking for.

I'm verry pleased with it.
This is the plug I used :
A 16A smart plug :
https://www.aliexpress.com/item/Mini-Sm ... 4c4dkWKHkb
The one Sinze tested is the following :
https://www.aliexpress.com/item/Smart-P ... 4c4dkWKHkb
Again I want to thank Sinze for making this in a very short time.



Sinze (my neighbor) did a excellent job. This is what I was looking for.

I'm verry pleased with it.
This is the plug I used :
A 16A smart plug :
https://www.aliexpress.com/item/Mini-Sm ... 4c4dkWKHkb
The one Sinze tested is the following :
https://www.aliexpress.com/item/Smart-P ... 4c4dkWKHkb
Again I want to thank Sinze for making this in a very short time.


-
- Posts: 111
- Joined: Monday 22 June 2015 20:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10982
- Location: Veghel, The Netherlands
- Contact:
Re: [REQUEST] Plugin for Tuya
Yes I share these thoughts completely. Going to order some more hahaha. Maybe better to order the ones you mentioned as these look better.
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: [REQUEST] Plugin for Tuya
The plugin was just updated.
Now it is possible to use the plugin "as-is".
No modification needed anymore in the constructor part.
It should work for all single sockets just fine.
I added the possibilitie to add the ID's for Amp. Watt. Volt in the hardware menu.
This is a huge advantage for additional plugs.
For each additional plug... Add a new hardware instance using the plugin and modify appropriate fields (IP, DevID, Local Key) as well.
Now it is possible to use the plugin "as-is".
No modification needed anymore in the constructor part.

It should work for all single sockets just fine.
I added the possibilitie to add the ID's for Amp. Watt. Volt in the hardware menu.
This is a huge advantage for additional plugs.
For each additional plug... Add a new hardware instance using the plugin and modify appropriate fields (IP, DevID, Local Key) as well.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 111
- Joined: Monday 22 June 2015 20:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10982
- Location: Veghel, The Netherlands
- Contact:
Re: [REQUEST] Plugin for Tuya
Just replaced my version with yours. Seems to work fine with the DPS selection
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: [REQUEST] Plugin for Tuya
Excellent. Now you can buy more plugs

Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 111
- Joined: Monday 22 June 2015 20:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10982
- Location: Veghel, The Netherlands
- Contact:
Re: [REQUEST] Plugin for Tuya
Just looking into the computed power usage. It seems not correct anymore. Plug is contantly at 8-9watt and after 2 hours only 0.002kwh on the counter. What can be the cause for this?
Edit. With higher usage it seems correct.....
Edit. With higher usage it seems correct.....
-
- Posts: 10
- Joined: Monday 04 March 2019 22:40
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Hi guys,
I got this error in Domoticz when I try to activate the plugin:
I have others Python plugins which works well and i could control my plug by lua event and dummy switch like this:
But that would be really more easier if I could make workable your plugin on my device (my Domoticz his install on Synology by package).
cryptodome and other element install by pip3 are located there: /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages
Thanks in adavance.
I got this error in Domoticz when I try to activate the plugin:
Code: Select all
Error: (sincze_tuya_smartplug_plugin) failed to load 'plugin.py', Python Path used was '/usr/local/domoticz/var/plugins/Domoticz-Tuya-SmartPlug-Plugin/:/volume1/@appstore/py3k/usr/local/lib/python35.zip:/volume1/@appstore/py3k/usr/local/lib/python3.5/:/volume1/@appstore/py3k/usr/local/lib/python3.5/plat-linux:/volume1/@appstore/py3k/usr/local/lib/python3.5/lib-dynload'
Code: Select all
if (devicechanged['Prise Gauche'] == "On") then
os.execute('/volume1/@appstore/py3k/usr/local/bin/python3.5 /volume1/@appstore/domoticz/var/plugins/Domoticz-Tuya-SmartPlug-Plugin/turnON.py 192.168.0.33 66376420XXXXXX2a7e7e 5e2aeXXXXXX01d4 2')
elseif ....
cryptodome and other element install by pip3 are located there: /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages
Thanks in adavance.
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: [REQUEST] Plugin for Tuya
A you are using not a python plugin for this plug. Nor did you use the original tixi plugin but the external script.ZaGaPonG wrote: ↑Monday 04 March 2019 22:49 Hi guys,
I got this error in Domoticz when I try to activate the plugin:I have others Python plugins which works well and i could control my plug by lua event and dummy switch like this:Code: Select all
Error: (sincze_tuya_smartplug_plugin) failed to load 'plugin.py', Python Path used was '/usr/local/domoticz/var/plugins/Domoticz-Tuya-SmartPlug-Plugin/:/volume1/@appstore/py3k/usr/local/lib/python35.zip:/volume1/@appstore/py3k/usr/local/lib/python3.5/:/volume1/@appstore/py3k/usr/local/lib/python3.5/plat-linux:/volume1/@appstore/py3k/usr/local/lib/python3.5/lib-dynload'
But that would be really more easier if I could make workable your plugin on my device (my Domoticz his install on Synology by package).Code: Select all
if (devicechanged['Prise Gauche'] == "On") then os.execute('/volume1/@appstore/py3k/usr/local/bin/python3.5 /volume1/@appstore/domoticz/var/plugins/Domoticz-Tuya-SmartPlug-Plugin/turnON.py 192.168.0.33 66376420XXXXXX2a7e7e 5e2aeXXXXXX01d4 2') elseif ....
cryptodome and other element install by pip3 are located there: /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages
Thanks in adavance.
That is missing the vital "import domoticz" part.
Can you check your other plugins are using the 'import domoticz" part in them? So we can figure out what goes wrong?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 10
- Joined: Monday 04 March 2019 22:40
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Hi,sincze wrote: ↑Tuesday 05 March 2019 14:38A you are using not a python plugin for this plug. Nor did you use the original tixi plugin but the external script.ZaGaPonG wrote: ↑Monday 04 March 2019 22:49 Hi guys,
I got this error in Domoticz when I try to activate the plugin:I have others Python plugins which works well and i could control my plug by lua event and dummy switch like this:Code: Select all
Error: (sincze_tuya_smartplug_plugin) failed to load 'plugin.py', Python Path used was '/usr/local/domoticz/var/plugins/Domoticz-Tuya-SmartPlug-Plugin/:/volume1/@appstore/py3k/usr/local/lib/python35.zip:/volume1/@appstore/py3k/usr/local/lib/python3.5/:/volume1/@appstore/py3k/usr/local/lib/python3.5/plat-linux:/volume1/@appstore/py3k/usr/local/lib/python3.5/lib-dynload'
But that would be really more easier if I could make workable your plugin on my device (my Domoticz his install on Synology by package).Code: Select all
if (devicechanged['Prise Gauche'] == "On") then os.execute('/volume1/@appstore/py3k/usr/local/bin/python3.5 /volume1/@appstore/domoticz/var/plugins/Domoticz-Tuya-SmartPlug-Plugin/turnON.py 192.168.0.33 66376420XXXXXX2a7e7e 5e2aeXXXXXX01d4 2') elseif ....
cryptodome and other element install by pip3 are located there: /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages
Thanks in adavance.
That is missing the vital "import domoticz" part.
Can you check your other plugins are using the 'import domoticz" part in them? So we can figure out what goes wrong?
Yes, i'm using NUT UPS (https://www.domoticz.com/wiki/Plugins/NUT_UPS.html) and just checking the plugin.py of this plugin, he use well "import Domoticz"
If that can help, full error below:
Code: Select all
2019-03-05 15:42:44.241 Error: (sincze_tuya_smartplug_plugin) failed to load 'plugin.py', Python Path used was '/usr/local/domoticz/var/plugins/Domoticz-Tuya-SmartPlug-Plugin/:/volume1/@appstore/py3k/usr/local/lib/python35.zip:/volume1/@appstore/py3k/usr/local/lib/python3.5/:/volume1/@appstore/py3k/usr/local/lib/python3.5/plat-linux:/volume1/@appstore/py3k/usr/local/lib/python3.5/lib-dynload'.
2019-03-05 15:42:44.242 Error: (Test) Module Import failed, exception: 'ImportError'
2019-03-05 15:42:44.242 Error: (Test) Module Import failed: ' Name: pyaes'
2019-03-05 15:42:44.242 Error: (Test) Error Line details not available.
I'm waiting your feedback before trying something because I have already made too much muddle

Thanks for your support guy
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: [REQUEST] Plugin for Tuya
ZaGaPonG wrote: ↑Tuesday 05 March 2019 15:57 As I don't know what is "pyaes" I have made a "pip show pyaes" and it seems stored in: "usr/lib/python2.7/site-packages" and used by pytuya, that's could be the problem no?
I'm waiting your feedback before trying something because I have already made too much muddle![]()
Thanks for your support guy

Looks like you found the missing part why the plugin is not working for you with Python 3.x
I assume that is why the plug_on / off is working as it is probably using the 2.7 version.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 10
- Joined: Monday 04 March 2019 22:40
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Haha, thanks.sincze wrote: ↑Tuesday 05 March 2019 16:26ZaGaPonG wrote: ↑Tuesday 05 March 2019 15:57 As I don't know what is "pyaes" I have made a "pip show pyaes" and it seems stored in: "usr/lib/python2.7/site-packages" and used by pytuya, that's could be the problem no?
I'm waiting your feedback before trying something because I have already made too much muddle![]()
Thanks for your support guyNice work.
Looks like you found the missing part why the plugin is not working for you with Python 3.x
I assume that is why the plug_on / off is working as it is probably using the 2.7 version.
But have you a tips for me... I'm lost

I have installed pyaes from pip3 and uninstall it with pip.
So pyaes is present into python3.5/site-packages and not in python2.7/site-packages --> Nice
But the problem seems being the same. Did you know how to specify using python3.5 "library"?
I have tried to add a "sys.path.insert" into "__init__.py" from pytuya but my Domoticz crash totally, too much muddle

-
- Posts: 1
- Joined: Thursday 20 April 2017 18:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Hi everybody,
do you know if the rolling shutter switch tuya/smartlife could be supported in Domoticz?
https://www.aliexpress.com/item/Tuya-Sm ... Title=true
do you know if the rolling shutter switch tuya/smartlife could be supported in Domoticz?
https://www.aliexpress.com/item/Tuya-Sm ... Title=true
-
- Posts: 33
- Joined: Saturday 13 April 2019 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Hello,
I'm just beginning with domoticz, which I've installed 4.97 in a raspi, and I have set up a Xiaomi Control Hub, and its devices, and I've been struggling with a Tuya Smat Plug for a few days now. But, unsuccessfully
I've solved some missing libraries, I've got the ID's with Packet Capture, but now I can't go further.
In the register, with Degug=1, I just see
If I run the sudo python3 get_dps.py IP DID I get
Thank you
I'm just beginning with domoticz, which I've installed 4.97 in a raspi, and I have set up a Xiaomi Control Hub, and its devices, and I've been struggling with a Tuya Smat Plug for a few days now. But, unsuccessfully

I've solved some missing libraries, I've got the ID's with Packet Capture, but now I can't go further.
In the register, with Degug=1, I just see
- Spoiler: show
If I run the sudo python3 get_dps.py IP DID I get
- Spoiler: show
Thank you
Plugin for a SMA Sunny Boy 1.5 https://github.com/merlot-dev/Domoticz-SMA-SunnyBoy
-
- Posts: 33
- Joined: Saturday 13 April 2019 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
If you're still having the problem with pyaes, I just linked the directory in the python directory into the plugin directory with ln -sZaGaPonG wrote: ↑Tuesday 05 March 2019 17:38Haha, thanks.sincze wrote: ↑Tuesday 05 March 2019 16:26ZaGaPonG wrote: ↑Tuesday 05 March 2019 15:57 As I don't know what is "pyaes" I have made a "pip show pyaes" and it seems stored in: "usr/lib/python2.7/site-packages" and used by pytuya, that's could be the problem no?
I'm waiting your feedback before trying something because I have already made too much muddle![]()
Thanks for your support guyNice work.
Looks like you found the missing part why the plugin is not working for you with Python 3.x
I assume that is why the plug_on / off is working as it is probably using the 2.7 version.
But have you a tips for me... I'm lost![]()
I have installed pyaes from pip3 and uninstall it with pip.
So pyaes is present into python3.5/site-packages and not in python2.7/site-packages --> Nice
But the problem seems being the same. Did you know how to specify using python3.5 "library"?
I have tried to add a "sys.path.insert" into "__init__.py" from pytuya but my Domoticz crash totally, too much muddle![]()
Just in case it works for you
Plugin for a SMA Sunny Boy 1.5 https://github.com/merlot-dev/Domoticz-SMA-SunnyBoy
-
- Posts: 33
- Joined: Saturday 13 April 2019 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Where can I find your version? I have a single plug.
I'm using the "oficial" one, but without success so far

Thank you for your job
Plugin for a SMA Sunny Boy 1.5 https://github.com/merlot-dev/Domoticz-SMA-SunnyBoy
-
- Posts: 33
- Joined: Saturday 13 April 2019 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Hi again,
I've found the tixi_sincze version just reading some more messages than I'd already read.
But no success either
I've found the tixi_sincze version just reading some more messages than I'd already read.

But no success either
- Spoiler: show
- Spoiler: show

Plugin for a SMA Sunny Boy 1.5 https://github.com/merlot-dev/Domoticz-SMA-SunnyBoy
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: [REQUEST] Plugin for Tuya
Interesting, We have several happy users of the created tixie_sincze plugin.https://github.com/sincze/Domoticz-Tuya ... lug-Pluginmerlot wrote: ↑Sunday 14 April 2019 22:08 Hi again,
I've found the tixi_sincze version just reading some more messages than I'd already read.![]()
But no success eitherAnd some time I've seen
- Spoiler: show
It seems that I have to keep using its own app, Smart Life, without integration to other devices through scenes
- Spoiler: show
![]()
What plug are you using? (link)?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 33
- Joined: Saturday 13 April 2019 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
I'm using the one in the URL you've just posted.
Do I have to use the beta version of Domoticz or just the last stable one?
Regarding the plug, is this one, in Spanish
https://images.app.goo.gl/U4ULMRcAbHA4NmRM6
Enviado desde mi Redmi Note 4 mediante Tapatalk
Do I have to use the beta version of Domoticz or just the last stable one?
Regarding the plug, is this one, in Spanish
https://images.app.goo.gl/U4ULMRcAbHA4NmRM6
Enviado desde mi Redmi Note 4 mediante Tapatalk
Plugin for a SMA Sunny Boy 1.5 https://github.com/merlot-dev/Domoticz-SMA-SunnyBoy
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: [REQUEST] Plugin for Tuya
The sincze variant plugin works on latest stable and beta of that time of release.merlot wrote: ↑Monday 15 April 2019 14:31 I'm using the one in the URL you've just posted.
Do I have to use the beta version of Domoticz or just the last stable one?
Regarding the plug, is this one, in Spanish
https://images.app.goo.gl/U4ULMRcAbHA4NmRM6
Enviado desde mi Redmi Note 4 mediante Tapatalk
However the separate scripts should provide you with nice readable dps keys.
It seems it does not do such a thing for you for some reason.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Who is online
Users browsing this forum: No registered users and 1 guest