Okay, thanks for the info, I will try to investigate!
Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Moderator: leecollings
- Xenomes
- Posts: 388
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
- Xenomes
- Posts: 388
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
I was a bug in Domoticz and is resoled in the current beta.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 5
- Joined: Sunday 26 April 2020 14:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Thank you very much for your investigation. Unfortunately I cannot check the beta as I have a pi zero w. I will wait for a release working on pi zero w.
Thank you again.
-
- Posts: 6
- Joined: Friday 23 February 2024 10:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Hello!
I have some WiFi Door Sensors that have already been successfully added to the Smart Life mobile app and Domoticz.
I tested and found that everything works fine, but only sometimes.
When I enter the house, the period of time from opening to closing the door is relatively short (5-10 seconds?). The door sensor sends open/close information to the Smart Life app very quickly, but the device status in my Domoticz is not updated. Moreover, my Domoticz usually doesn't record door-opening events at all (not just too late).
Is there any setting where I can fix it? Can I add the sensor not from the Tuya cloud but directly from LAN? Can I change the update interval in the plugin?
Best regards,
Patrick
I have some WiFi Door Sensors that have already been successfully added to the Smart Life mobile app and Domoticz.
I tested and found that everything works fine, but only sometimes.
When I enter the house, the period of time from opening to closing the door is relatively short (5-10 seconds?). The door sensor sends open/close information to the Smart Life app very quickly, but the device status in my Domoticz is not updated. Moreover, my Domoticz usually doesn't record door-opening events at all (not just too late).
Is there any setting where I can fix it? Can I add the sensor not from the Tuya cloud but directly from LAN? Can I change the update interval in the plugin?
Best regards,
Patrick
-
- Posts: 8
- Joined: Saturday 30 March 2024 10:23
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
I have similar problem to Patryk. My garage door contracon is updated in Domoticz after around 1 minute, while in Tuya app I see its status change in real time. I think, that Domoticz-TinyTUYA-Plugin refreshes the devices and their states every ~1 minute. Can someone (Xenomes? :>) confirm how the device update works? Is it possible to trigger a state update of one device (door contracton) when the state of another device is toggled (door open/close)
And additional question, as this is also something I cannot figure out. I have a monostable switch In Tuya. When I click it and the door is closer then it will start opening. If I click it again while opening/closing it will stop the action of opening/closing. If I click it again it will do the opposite of the first action (so if the door was previously being opened and it will start closing it).
What switch should I use for that in Domoticz? Normal on/off does not work as it will send the action to the door only when I close them. When the door's status is 'Closed' and I try to open them nothing happens. Only after that when I click again, then the close action will be executed and the door will be opened/closed depending on their state (which is not visible in Domoticz, because the status is updated after a long time - see the first paragraph)
And additional question, as this is also something I cannot figure out. I have a monostable switch In Tuya. When I click it and the door is closer then it will start opening. If I click it again while opening/closing it will stop the action of opening/closing. If I click it again it will do the opposite of the first action (so if the door was previously being opened and it will start closing it).
What switch should I use for that in Domoticz? Normal on/off does not work as it will send the action to the door only when I close them. When the door's status is 'Closed' and I try to open them nothing happens. Only after that when I click again, then the close action will be executed and the door will be opened/closed depending on their state (which is not visible in Domoticz, because the status is updated after a long time - see the first paragraph)
- Xenomes
- Posts: 388
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Hi, The plugin retrieves the status from the Tuya server once every minute. Therefore, if a device is opened and closed within that minute, Domoticz will not register any change. For the cloud version, there isn't much that needs altering. If you increase the frequency of requests to Tuya, it's possible that your account may exceed its request limit. I am building an offline version, but it is not yet fully ready.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 8
- Joined: Saturday 30 March 2024 10:23
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
OK, clear. Is there any way to request the sensor state after changing the device state? I have a garage door that I control and a garage door sensor that I do not control. But if I could request its state e.g. 5s after pressing the garage door, then it would show as open and all would be working well for me. I am trying to figure out a way to do that..
- Xenomes
- Posts: 388
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
You could try using the following for that device: https://github.com/Xenomes/Domoticz-Tin ... cal-Plugin.neveride wrote: ↑Tuesday 02 April 2024 23:16 OK, clear. Is there any way to request the sensor state after changing the device state? I have a garage door that I control and a garage door sensor that I do not control. But if I could request its state e.g. 5s after pressing the garage door, then it would show as open and all would be working well for me. I am trying to figure out a way to do that..
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 8
- Joined: Saturday 30 March 2024 10:23
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
I will try the local one after the weekend. Yesterday I was fighting with the cloud plugin. Since yesterday I get the following when I start the plugin:
I thought that maybe my plan has expired (strange, because I just set everything up a few days ago). When I fill the information on https://iot.tuya.com/cloud/products/apply-extension and press Submit I see an error:2024-04-06 08:59:22.742 Tuya: Pushing 'PollIntervalDirective' on to queue
2024-04-06 08:59:23.041 Tuya: No device data returned for Tuya! Check if subscription cloud plan has expired!
2024-04-06 08:59:23.041 Tuya: No device data returned for Tuya! Check if subscription cloud plan has expired!
2024-04-06 08:59:23.041 Tuya: No device data returned for Tuya! Check if subscription cloud plan has expired!
Did they change something and the plugin does not work currently or is it classical PEBKAC?All input parameters of the remote API are lost.
-
- Posts: 2
- Joined: Thursday 05 March 2020 20:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Xenomes, keep up the good work! Using TinyTUYA now for a while, and i'm very happy with it.Xenomes wrote: ↑Wednesday 03 April 2024 19:54You could try using the following for that device: https://github.com/Xenomes/Domoticz-Tin ... cal-Plugin.neveride wrote: ↑Tuesday 02 April 2024 23:16 OK, clear. Is there any way to request the sensor state after changing the device state? I have a garage door that I control and a garage door sensor that I do not control. But if I could request its state e.g. 5s after pressing the garage door, then it would show as open and all would be working well for me. I am trying to figure out a way to do that..
But also facing the issues with the poll-interval, so it is not seeing any button-press events.
Is the offline version already ready to use?
If not, when do you expect to have a 100% working release version?
- Xenomes
- Posts: 388
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
With the last update it should be better, i need to do a long time test.
I hope in a couple of weeks that my devices are running perfect, unknown devices that will be a issue, so 100% it will never be.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 2
- Joined: Thursday 05 March 2020 20:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Oke, sounds good. Yesterday i installed the local version. I was not able to run the local version and the cloud version together.
When i stopped the cloud version, the local version started and added some devices (after i moved the devices.json file to the correct folder).
Devices showed initial values but didn't update/refresh. And for example voltage value didn't show a comma. 232,2V was shown as 2322V.
So for now it was not a working alternative for me.
I'm going to follow the development since i'm very interested in a working version!
- Xenomes
- Posts: 388
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Thanks for testing!
I will update the readme to run in at the root of the plugin.B8rt wrote: ↑Friday 12 April 2024 8:39 Oke, sounds good. Yesterday i installed the local version. I was not able to run the local version and the cloud version together.
When i stopped the cloud version, the local version started and added some devices (after i moved the devices.json file to the correct folder).
I will look at the update/refresh data, could be a small typo. Comma is a scaling issue, it could be to wrong data returning to codding error.
Hope to have some time in the debug these issues.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 95
- Joined: Wednesday 30 October 2019 14:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Great Britain
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Probably way too late for you EdwinK as I've only just experienced this. I was getting the Error: tinytuya: handleThread: string indices must be integers
problem, found this forum topic and discovered, like you, that my subscription had expired. I also got the same problem when I tried to renew. However I found that if I clicked the back arrow (webpage, not browser) and then clicked the renew subscription option (for IOT Core) then this time it worked. After about five minutes the TUYA website said "approved" (and then "in service") and now, after restarting the plugin all my devices are back and the error in the log has disappeared.
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?
Desktop access from Ubuntu Linux
Desktop access from Ubuntu Linux
-
- Posts: 8
- Joined: Sunday 18 June 2017 9:52
- Target OS: Linux
- Domoticz version: 2024.4
- Location: Landgraaf, Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Hi,
Today I updated the TinyTuya-Plugin from version 1.6.1 to 1.8.5. Also updated Domoticz to version 2024.4 (build 15992).
Domoticz is running on Linux (Ubuntu 22.04.4 LTS).
At this moment more then 30 switches and sensors are used and everything is running fine, except for the readings of Temperature, Voltage (kWh).
These readings are a factor 10 to high.
Is there a way to fix this problem?
Thanks in advance,
Ramnol.
Today I updated the TinyTuya-Plugin from version 1.6.1 to 1.8.5. Also updated Domoticz to version 2024.4 (build 15992).
Domoticz is running on Linux (Ubuntu 22.04.4 LTS).
At this moment more then 30 switches and sensors are used and everything is running fine, except for the readings of Temperature, Voltage (kWh).
These readings are a factor 10 to high.
Is there a way to fix this problem?
Thanks in advance,
Ramnol.
- Xenomes
- Posts: 388
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Hi Ramnol,
Strange... the scaling is read from the json provide from the tinytuya, in version 1.6.1 the scaling was correct?
Could you please generate a JSON dump using the debug_discovery.py script from the tools directory? After generating it, could you email the dump to [email protected]?
Strange... the scaling is read from the json provide from the tinytuya, in version 1.6.1 the scaling was correct?
Could you please generate a JSON dump using the debug_discovery.py script from the tools directory? After generating it, could you email the dump to [email protected]?
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
- Xenomes
- Posts: 388
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Issue fixed in version 1.8.6Ramnol wrote: ↑Monday 13 May 2024 15:57 Hi,
Today I updated the TinyTuya-Plugin from version 1.6.1 to 1.8.5. Also updated Domoticz to version 2024.4 (build 15992).
Domoticz is running on Linux (Ubuntu 22.04.4 LTS).
At this moment more then 30 switches and sensors are used and everything is running fine, except for the readings of Temperature, Voltage (kWh).
These readings are a factor 10 to high.
Is there a way to fix this problem?
Thanks in advance,
Ramnol.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 8
- Joined: Sunday 18 June 2017 9:52
- Target OS: Linux
- Domoticz version: 2024.4
- Location: Landgraaf, Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Everything works fine now.
Thanks very much.
Thanks very much.
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Hello.
I've got wall sockets with energy monitoring with data updates only when tuya smart application is opened (looks like "updatedps" command is needed but it is supported only for local versions). But there is one dps parameter that is updated with timestamp - totally used power.
Could you thinks about adding such an option for future releases (recalculate power usage and get total power consumption from "add_ele" dps if this dps is supported by device? Thsnks.
I've got wall sockets with energy monitoring with data updates only when tuya smart application is opened (looks like "updatedps" command is needed but it is supported only for local versions). But there is one dps parameter that is updated with timestamp - totally used power.
- Spoiler: show
- Spoiler: show
Could you thinks about adding such an option for future releases (recalculate power usage and get total power consumption from "add_ele" dps if this dps is supported by device? Thsnks.
- Xenomes
- Posts: 388
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: Domoticz-TinyTUYA-Plugin (Cloud)
Hi DKTigra,DKTigra wrote: ↑Monday 27 May 2024 9:50 Hello.
I've got wall sockets with energy monitoring with data updates only when tuya smart application is opened (looks like "updatedps" command is needed but it is supported only for local versions). But there is one dps parameter that is updated with timestamp - totally used power.Looks like this dps is updated every 10 watts are consumed. My goal was to monitor when device is actually consumes power and total power consumption per day, so i've tried to make dirty modification of plugin.py
- Spoiler: show
After this modification it is possible to calc Daily/Monthly consumption (with 10W accuracy) and monitor if device is active now. Recalculating currentpower by add_ele isn't accurate because there is some time passes between add_ele parameter is updated by device and device is polled by Domoticz. I think it could be far more accurate by getting it from devicelog and adding correction for devicelog timestamp data, but i'm not so good in python.
- Spoiler: show
Could you thinks about adding such an option for future releases (recalculate power usage and get total power consumption from "add_ele" dps if this dps is supported by device? Thsnks.
Thanks for the modification. I can't test your modification (I don't have a Tuya power plug). I will add it to the code; if there are issues, let me know.
edit: Added to version 1.8.7
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
Who is online
Users browsing this forum: No registered users and 1 guest