[REQUEST] Plugin for Tuya
Moderator: leecollings
-
- Posts: 5
- Joined: Thursday 03 January 2019 12:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
I have Neo Coolcam Plug with with energy measurement. In Tuya Smart on smartphone it's works very well, but in Domoticz I use this plugin, but it have only on/off switch. This plugin don't have energy measurement. It's possibile to add energy measurement on Domoticz?
-
- Posts: 67
- Joined: Saturday 19 November 2016 17:02
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Since I updated to last beta 4.10343, I started to see Domoticz crashing after some minutes after start. I traced down the problem to the Tuya plugin. As soon as I disabled it, domoticz didn't crash any more. See below the last lines in the domoticz.log file right before crashing, in case it helps figure out the problem.
Code: Select all
2019-01-11 16:22:30.438 Error: Domoticz(pid:9358, tid:9440('PluginMgr_IO')) received fatal signal 11 (Segmentation fault)
2019-01-11 16:22:30.438 Error: siginfo address=(nil), address=(nil)
2019-01-11 16:22:30.478 Error: Failed to start gdb, will use backtrace() for printing stack frame
2019-01-11 16:22:30.479 Error: #0 /usr/local/domoticz/bin/domoticz() [0x6874f0]
2019-01-11 16:22:30.479 Error: #1 /usr/local/domoticz/bin/domoticz : signal_handler(int, siginfo_t*, void*) + 0x295 [0x688255]
2019-01-11 16:22:30.479 Error: #2 /lib/libpthread.so.0 : + 0x101c0 [0x7f45ee6aa1c0]
-
- Posts: 52
- Joined: Monday 10 September 2018 23:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Can you try the plug plugin just for testing?jordipalet wrote: ↑Saturday 05 January 2019 11:28 Not sure what is the DPS and how to get it.
I want the dimmer to be able to dim as well ... that's why I can't use the smartplug one (it works, but doesn't allow dimming).
This is the change I did in the bulb code for the dimmer to work (without colors, as it is not RGB, just dimmer):
it was:
Domoticz.Device(Name="Tuya SmartBulb", Unit=1, Type=241, Subtype=2, Switchtype=7).Create()
Now is:
Domoticz.Device(Name="Tuya SmartBulb", Unit=1, Type=244, Subtype=62, Switchtype=7).Create()
Thanks!
-
- Posts: 52
- Joined: Monday 10 September 2018 23:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
I don't know. Can you post the get_dps.py output?maks87 wrote: ↑Tuesday 08 January 2019 14:34 I have Neo Coolcam Plug with with energy measurement. In Tuya Smart on smartphone it's works very well, but in Domoticz I use this plugin, but it have only on/off switch. This plugin don't have energy measurement. It's possibile to add energy measurement on Domoticz?
-
- Posts: 52
- Joined: Monday 10 September 2018 23:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Thanks, Unfortunately i have no time to manage all beta. In your case and according to the log, I am not sure it is plugin related because Segmentation fault should not be cause by python.manutremo wrote: ↑Friday 11 January 2019 18:11 Since I updated to last beta 4.10343, I started to see Domoticz crashing after some minutes after start. I traced down the problem to the Tuya plugin. As soon as I disabled it, domoticz didn't crash any more. See below the last lines in the domoticz.log file right before crashing, in case it helps figure out the problem.
Code: Select all
2019-01-11 16:22:30.438 Error: Domoticz(pid:9358, tid:9440('PluginMgr_IO')) received fatal signal 11 (Segmentation fault) 2019-01-11 16:22:30.438 Error: siginfo address=(nil), address=(nil) 2019-01-11 16:22:30.478 Error: Failed to start gdb, will use backtrace() for printing stack frame 2019-01-11 16:22:30.479 Error: #0 /usr/local/domoticz/bin/domoticz() [0x6874f0] 2019-01-11 16:22:30.479 Error: #1 /usr/local/domoticz/bin/domoticz : signal_handler(int, siginfo_t*, void*) + 0x295 [0x688255] 2019-01-11 16:22:30.479 Error: #2 /lib/libpthread.so.0 : + 0x101c0 [0x7f45ee6aa1c0]
-
- Posts: 12
- Joined: Sunday 09 December 2018 10:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
It works with the plug plugin, but then doesn't dim. I'm not sure how to modify that one to make it dim ...tixi7 wrote: ↑Saturday 12 January 2019 8:38Can you try the plug plugin just for testing?jordipalet wrote: ↑Saturday 05 January 2019 11:28 Not sure what is the DPS and how to get it.
I want the dimmer to be able to dim as well ... that's why I can't use the smartplug one (it works, but doesn't allow dimming).
This is the change I did in the bulb code for the dimmer to work (without colors, as it is not RGB, just dimmer):
it was:
Domoticz.Device(Name="Tuya SmartBulb", Unit=1, Type=241, Subtype=2, Switchtype=7).Create()
Now is:
Domoticz.Device(Name="Tuya SmartBulb", Unit=1, Type=244, Subtype=62, Switchtype=7).Create()
Thanks!
-
- 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
Ok So I managed to get the ID and get the script to work finally. I have learned some lessons today .
This is the result of the A1-Mall Powerplug
pi@raspberrypi:~/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin $ sudo python3 get_dps.py 192.168.1.126 00621010cc50e3c3d408
Plug State Information:
{'dps': {'2': 0, '4': 243, '6': 2392, '5': 42, '1': True}, 'devId': '00621010cc50e3c3d408'}
Plug DPS List:
1
So I think 6 is the Voltage and 4 is the current in mA and 5 is the wattage but that must be divide by 10
So it would great to get this in Domoticz like this :
This one is a Neo CoolCam Z-Wave Plug
-
- 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
If it doesn't support energy measurement it will not be possible I guess.maks87 wrote: ↑Tuesday 08 January 2019 14:34 I have Neo Coolcam Plug with with energy measurement. In Tuya Smart on smartphone it's works very well, but in Domoticz I use this plugin, but it have only on/off switch. This plugin don't have energy measurement. It's possibile to add energy measurement on Domoticz?
-
- Posts: 110
- 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
I am interested in this plugin. Does energy measurement work in Domoticz? For me this is not clear in this forum right now.
-
- 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
Energy measurement works in Domoticz. I use the NeoCoolcam ZWave plugs to get power readings. But the the Tuya plugs are cheaper so if we could get the power measurement from the plug to Domoticz that would be great.
-
- Posts: 52
- Joined: Monday 10 September 2018 23:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
For plugs that provide wattage information and if the information is just the entry 5 of the dps.
It should be possible to adapt the plugin to have it.
Not sure if and when i will have time to provide a beta version for that...
In case some developers want to contribute, i will be more than happy to have some help!
It should be possible to adapt the plugin to have it.
Not sure if and when i will have time to provide a beta version for that...
In case some developers want to contribute, i will be more than happy to have some help!
-
- Posts: 234
- Joined: Sunday 27 August 2017 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Spain
- Contact:
Re: [REQUEST] Plugin for Tuya
hello.
The plugin works fine for me with my 2 multiplugs powerstrip.
but sometimes and i dont know why the comand return to me this:
A problem occur please retry...
why occurs this? is posible any solution?
The plugin works fine for me with my 2 multiplugs powerstrip.
but sometimes and i dont know why the comand return to me this:
A problem occur please retry...
why occurs this? is posible any solution?
-
- 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
Do you have the device already in Domoticz (In the hardware list)?
I have found out to use the get_dsp.py script it must not be attached to Domoticz otherwise you will get this error.
I have found it this morning also. So when I go to hardware and change the IP address of the Plug the script works. If I set it to the correct IP address in Domoticz and I start the script I get this error. Looks like same behavior as when you use the Tuya app on your phone.
-
- Posts: 234
- Joined: Sunday 27 August 2017 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Spain
- Contact:
Re: [REQUEST] Plugin for Tuya
yes i have the strip in domoticz. but in this cases i want to use the turnON.py and turnOFF.py from start and stop in linux consolejslegers wrote: ↑Sunday 20 January 2019 13:52Do you have the device already in Domoticz (In the hardware list)?
I have found out to use the get_dsp.py script it must not be attached to Domoticz otherwise you will get this error.
I have found it this morning also. So when I go to hardware and change the IP address of the Plug the script works. If I set it to the correct IP address in Domoticz and I start the script I get this error. Looks like same behavior as when you use the Tuya app on your phone.
-
- Posts: 52
- Joined: Monday 10 September 2018 23:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
This is a "normal" behavior at least it is expected.
Only one connection is supported by tuya devices. Meaning that you cannot use the tuya app/domoticz plugin/helper script... at the same time.
Only one connection is supported by tuya devices. Meaning that you cannot use the tuya app/domoticz plugin/helper script... at the same time.
-
- Posts: 234
- Joined: Sunday 27 August 2017 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Spain
- Contact:
Re: [REQUEST] Plugin for Tuya
ouch
I will search info to flash the smart plug with espurna
thanks!
I will search info to flash the smart plug with espurna
thanks!
-
- Posts: 234
- Joined: Sunday 27 August 2017 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Spain
- Contact:
Re: [REQUEST] Plugin for Tuya
jeje.manutremo wrote: ↑Monday 21 January 2019 10:26 Should be doable using the information here:
https://github.com/xoseperez/espurna/wi ... ZLD-44EU-W
this is the info i found yesterday. jeje
thanks anyway!
-
- Posts: 2
- Joined: Friday 24 August 2018 23:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Hi,
I have this 3 gang watll switch,
https://goo.gl/SgVbVQ
How to add it to domoticz?
Plug State Information:
{'dps': {'5': 0, '2': False, '1': False, '3': False}, 'devId': 'xxxxxxxxxxxxxxxx'}
Plug DPS List:
2;1;3
I have this 3 gang watll switch,
https://goo.gl/SgVbVQ
How to add it to domoticz?
Plug State Information:
{'dps': {'5': 0, '2': False, '1': False, '3': False}, 'devId': 'xxxxxxxxxxxxxxxx'}
Plug DPS List:
2;1;3
-
- Posts: 52
- Joined: Monday 10 September 2018 23:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [REQUEST] Plugin for Tuya
Some good news to avoid the limitations of tuya firmware.
OTA update is possible for alternative firmware:
https://www.heise.de/ct/artikel/Tuya-Co ... 84830.html
OTA update is possible for alternative firmware:
https://www.heise.de/ct/artikel/Tuya-Co ... 84830.html
Who is online
Users browsing this forum: No registered users and 1 guest