You can turn back, by enter the previous version number.
Code: Select all
sudo pip3 install requests==version
Are you using a docker Domoticz?
Moderator: leecollings
You can turn back, by enter the previous version number.
Code: Select all
sudo pip3 install requests==version
Are you using a docker Domoticz?
can you update the charset-normalizer
Code: Select all
sudo pip3 install charset-normalizer --upgrade
There are more users that use Domoticz in a docker environment, here some info
Code: Select all
2023-04-02 14:05:22.651 TinyTUYA: Device read failed: bfd6bda7f3a84e2064d97h
I've now cleaned things up and reinstalled the required packages using;Xenomes wrote: ↑Saturday 01 April 2023 21:34 can you update the charset-normalizerCode: Select all
sudo pip3 install charset-normalizer --upgrade
Code: Select all
sudo pip uninstall tinytuya requests charset-normalizer
sudo pip3 uninstall tinytuya requests charset-normalizer
sudo pip3 install tinytuya requests charset-normalizer --upgrade
Code: Select all
2023-04-02 14:41:41.804 Error: TinyTUYA: (tinytuya) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Domoticz-TinyTUYA-Plugin/:/usr/lib/python39.zip:/usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/usr/local/lib/python3.9/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.9/dist-packages'.
2023-04-02 14:41:41.824 Error: TinyTUYA: Traceback (most recent call last):
2023-04-02 14:41:41.824 Error: TinyTUYA: File "/home/pi/domoticz/plugins/Domoticz-TinyTUYA-Plugin/plugin.py", line 60, in <module>
2023-04-02 14:41:41.824 Error: TinyTUYA: import tinytuya
2023-04-02 14:41:41.824 Error: TinyTUYA: File "/usr/local/lib/python3.9/dist-packages/tinytuya/__init__.py", line 99, in <module>
2023-04-02 14:41:41.824 Error: TinyTUYA: from .Cloud import Cloud
2023-04-02 14:41:41.824 Error: TinyTUYA: File "/usr/local/lib/python3.9/dist-packages/tinytuya/Cloud.py", line 36, in <module>
2023-04-02 14:41:41.824 Error: TinyTUYA: import requests
2023-04-02 14:41:41.824 Error: TinyTUYA: File "/usr/local/lib/python3.9/dist-packages/requests/__init__.py", line 48, in <module>
2023-04-02 14:41:41.824 Error: TinyTUYA: from charset_normalizer import __version__ as charset_normalizer_version
2023-04-02 14:41:41.824 Error: TinyTUYA: File "/usr/local/lib/python3.9/dist-packages/charset_normalizer/__init__.py", line 24, in <module>
2023-04-02 14:41:41.824 Error: TinyTUYA: from .api import from_bytes, from_fp, from_path
2023-04-02 14:41:41.824 Error: TinyTUYA: File "/usr/local/lib/python3.9/dist-packages/charset_normalizer/api.py", line 5, in <module>
2023-04-02 14:41:41.824 Error: TinyTUYA: from .cd import (
2023-04-02 14:41:41.824 Error: TinyTUYA: File "/usr/local/lib/python3.9/dist-packages/charset_normalizer/cd.py", line 9, in <module>
2023-04-02 14:41:41.824 Error: TinyTUYA: from .md import is_suspiciously_successive_range
2023-04-02 14:41:41.824 Error: TinyTUYA: AttributeError: PyCapsule_Import "charset_normalizer.md__mypyc.init_charset_normalizer___md" is not valid
pip uses the default Python pip -V, Domoticz use python3 so with pip3 you force pip to use the correct one. There is also the with or without the sudo command, Domoticz runs as root so with. sudo ps aux | grep domoticz.piddgilbert2 wrote: ↑Saturday 01 April 2023 23:15 I'm confused now to be honest.
I've now confirmed with 'pip3 show' that my charset-normalizer version has updated to Version: 3.1.0.
However, pip show is saying version 3.0.1
Tinytuya also confusing:
pip3 show tinytuya, shows version 1.11.0, even after 'sudo pip3 install tinytuya --upgrade'
pip show tinytuya, shows version 1.12.2
Domoticz plus this tinytuya-plugin uses Python 3 / pip3 ? Yet, I cannot get it to upgrade to tinytuya 1.12.2
Does any of this cause the random problems at startup though?
My versions are on my test and live system:
The most error are about charset_normalizer.. very strange.dgilbert2 wrote: ↑Sunday 02 April 2023 16:00 However, with these versions Domoticz gives these errors with a 'hardware update':Code: Select all
2023-04-02 14:41:41.824 Error: TinyTUYA: from charset_normalizer import __version__ as charset_normalizer_version 2023-04-02 14:41:41.824 Error: TinyTUYA: File "/usr/local/lib/python3.9/dist-packages/charset_normalizer/__init__.py", line 24, in <module> 2023-04-02 14:41:41.824 Error: TinyTUYA: from .api import from_bytes, from_fp, from_path 2023-04-02 14:41:41.824 Error: TinyTUYA: File "/usr/local/lib/python3.9/dist-packages/charset_normalizer/api.py", line 5, in <module> 2023-04-02 14:41:41.824 Error: TinyTUYA: from .cd import ( 2023-04-02 14:41:41.824 Error: TinyTUYA: File "/usr/local/lib/python3.9/dist-packages/charset_normalizer/cd.py", line 9, in <module> 2023-04-02 14:41:41.824 Error: TinyTUYA: from .md import is_suspiciously_successive_range 2023-04-02 14:41:41.824 Error: TinyTUYA: AttributeError: PyCapsule_Import "charset_normalizer.md__mypyc.init_charset_normalizer___md" is not valid
on another system i have these versions.dgilbert2 wrote: ↑Sunday 02 April 2023 16:00 To get 'hardware update' to work I needed to downgrade requests to 2.28.1 which also downgrades charset-normalizer to 2.1.1.
So for me at least, I couldn't use sudo pip3 install tinytuya requests charset-normalizer --upgrade as it creates compatibility issues.
All this though has not made any improvement to the random start-up problems with the plugin.
Code: Select all
Error: TUYA: handleThread: Credentials are incorrect or tuya subscription has expired!
I have change the code if 5 times the return of Tuya is empty to log to check if the subscription is ended.
This is my first so 6 months no hassle!
Did some final tests and the best working solution is:dgilbert2 wrote: ↑Sunday 02 April 2023 16:00 To get 'hardware update' to work I needed to downgrade requests to 2.28.1 which also downgrades charset-normalizer to 2.1.1.
So for me at least, I couldn't use sudo pip3 install tinytuya requests charset-normalizer --upgrade as it creates compatibility issues.
All this though has not made any improvement to the random start-up problems with the plugin.
Code: Select all
sudo pip3 install tinytuya -U
sudo pip3 install requests==2.23.0 charset-normalizer==3.0.1
First, update to the latest version. Then, the plugin will attempt to retrieve data from Tuya six times. If unsuccessful, it will switch to update mode to prevent hanging in Domoticz. However, this may cause errors due to missing data. To retrieve the device data in Domoticz's memory, you will need to restart the plugin.heggink wrote: ↑Wednesday 12 April 2023 9:27 As of this morning, the plugin stopped working for me. tinytuya scan and wizard both work fine. The plugin itself gives an error:
TUYA: No device data returned for Tuya. Trying again!
TUYA hardware (120) thread seems to have ended unexpectedly
Causing the tuya plugin to hog the system (disabled it).
It stopped working after my raspberry pi crashed and rebooted itself.
As of now, I am not aware of any issues with my systems since they are running smoothly.
Users browsing this forum: No registered users and 0 guests