That should do the trick. Normally then the device exist creation is skipped. I will do a test tonight.
Edit:
did you delete Plugin 13 TinyTuya ID = 43035720e098061d58bc unit = 1?
Moderator: leecollings
That should do the trick. Normally then the device exist creation is skipped. I will do a test tonight.
I deleted it from the device list and turned the plugin off and on, did even restart domoticz but still got the same error.
Is see the problem, forgot a piece of code that do the device exist creation skip procedure.
Pushed a update (no version change)
Updated and restarted domoticz and no errors
Ha, Great! But can you control the fan?
Code: Select all
0 Error: Smartlife Tiny Tuya : Call to function 'onHeartbeat' failed, exception details:
2023-03-03 18:20:23.061 Error: Smartlife Tiny Tuya : Traceback (most recent call last):
2023-03-03 18:20:23.061 Error: Smartlife Tiny Tuya : File "/home/pi/domoticz/plugins/Domoticz-TinyTUYA-Plugin/plugin.py", line 341, in onHeartbeat
2023-03-03 18:20:23.061 Error: Smartlife Tiny Tuya : _plugin.onHeartbeat()
2023-03-03 18:20:23.061 Error: Smartlife Tiny Tuya : File "/home/pi/domoticz/plugins/Domoticz-TinyTUYA-Plugin/plugin.py", line 302, in onHeartbeat
2023-03-03 18:20:23.061 Error: Smartlife Tiny Tuya : if time.time() - last_update < 60 and testData == False:
2023-03-03 18:20:23.061 Error: Smartlife Tiny Tuya : NameError: name 'last_update' is not defined
if someone can helpVersion: 2023.1 (build 15109)
Build Hash: b3211fe6d
Compile Date: 2023-03-01 16:44:49
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]
Code: Select all
handleThread: Failed to parse: https://openapi.tuyaeu.com/v1.0/token?grant_type=1
Where . Iottuya or domoticz ?Also try to press update on the hardware place
You already did it in Domoticz when deactivation reactivate the hardware.
This error is coming from TinyTuya, there is something you forgot re walk the steps to setup the iot account.frenchyyii wrote: ↑Friday 03 March 2023 20:19 But when desactivate reactivate the harware in domotics (with other project credentials) i have seen this message too:I checked also Cloud Authorization IP Allowlist and it is offCode: Select all
handleThread: Failed to parse: https://openapi.tuyaeu.com/v1.0/token?grant_type=1
Code: Select all
pip list
Package Version
------------------ ---------
arandr 0.1.10
astroid 2.5.1
asttokens 2.0.4
automationhat 0.2.0
beautifulsoup4 4.9.3
blinker 1.4
blinkt 0.1.2
buttonshim 0.0.2
Cap1xxx 0.1.3
certifi 2020.6.20
chardet 4.0.0
charset-normalizer 3.0.1
click 7.1.2
colorama 0.4.4
colorzero 1.1
cryptography 3.3.2
cupshelpers 1.0
dbus-python 1.2.16
distlib 0.3.6
distro 1.5.0
docutils 0.16
drumhat 0.1.0
enum-compat 0.0.2
envirophat 1.0.0
ExplorerHAT 0.4.2
filelock 3.9.0
Flask 1.1.2
fourletterphat 0.1.0
gpiozero 1.6.2
html5lib 1.1
idna 2.6
isort 5.6.4
itsdangerous 1.1.0
jedi 0.18.0
Jinja2 2.11.3
lazy-object-proxy 0.0.0
logilab-common 1.8.1
lxml 4.6.3
MarkupSafe 1.1.1
mccabe 0.6.1
microdotphat 0.2.1
mote 0.0.4
motephat 0.0.3
mypy 0.812
mypy-extensions 0.4.3
netifaces 0.10.6
numpy 1.19.5
oauthlib 3.1.0
pantilthat 0.0.7
parso 0.8.1
pexpect 4.8.0
pgzero 1.2
phatbeat 0.1.1
pianohat 0.1.0
picamera 1.13
picamera2 0.3.8
pidng 4.0.9
piexif 1.1.3
piglow 1.2.5
pigpio 1.78
Pillow 8.1.2
pip 23.0.1
platformdirs 3.0.0
psutil 5.8.0
pycairo 1.16.2
pycparser 2.18
pycryptodome 3.17
pycups 2.0.1
pygame 1.9.6
Pygments 2.7.1
PyGObject 3.38.0
pyinotify 0.9.6
PyJWT 1.7.1
pylint 2.7.2
PyOpenGL 3.1.5
pyOpenSSL 20.0.1
PyQt5 5.15.2
PyQt5-sip 12.8.1
pyserial 3.5b0
pysmbc 1.0.23
python-apt 2.2.1
python-prctl 1.7
PyYAML 5.3.1
rainbowhat 0.1.0
reportlab 3.5.59
requests 2.28.2
requests-oauthlib 1.0.0
responses 0.12.1
roman 2.0.0
RPi.GPIO 0.7.0
RTIMULib 7.2.1
scrollphat 0.0.7
scrollphathd 1.2.1
Send2Trash 1.6.0b1
sense-hat 2.4.0
setuptools 67.4.0
simplejpeg 1.6.4
simplejson 3.17.2
six 1.11.0
skywriter 0.0.7
sn3218 1.2.7
soupsieve 2.2.1
spidev 3.5
ssh-import-id 5.10
thonny 4.0.1
tinytuya 1.10.3
toml 0.10.1
touchphat 0.0.1
tuyaha 0.0.11
twython 3.8.2
typed-ast 1.4.2
typing-extensions 3.7.4.3
unicornhathd 0.0.4
urllib3 1.26.5
v4l2-python3 0.3.1
virtualenv 20.20.0
webencodings 0.5.1
Werkzeug 1.0.1
wheel 0.34.2
wrapt 1.12.1
This error is coming from TinyTuya, there is something you forgot re walk the steps to setup the iot account.
Code: Select all
debug_discovery: Failed to parse: https://openapi.tuyaeu.com/v1.0/token?grant_type=1 line 24
Code: Select all
python3 -m tinytuya wizard
Code: Select all
{
"apiKey": "xxxxxx",
"apiSecret": "xxxxxx",
"apiRegion": "eu",
"apiDeviceID": xxxxx002462ab3d7a00"
}
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/requests/models.py", line 434, in prepare_url
scheme, auth, host, port, path, query, fragment = parse_url(url)
File "/usr/lib/python3/dist-packages/urllib3/util/url.py", line 394, in parse_url
return six.raise_from(LocationParseError(source_url), None)
File "<string>", line 3, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: https://openapi.tuyaeu.com/v1.0/token?grant_type=1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.9/dist-packages/tinytuya/__main__.py", line 76, in <module>
wizard.wizard(color=color, retries=retries, forcescan=force)
File "/usr/local/lib/python3.9/dist-packages/tinytuya/wizard.py", line 137, in wizard
cloud = tinytuya.Cloud( **config )
File "/usr/local/lib/python3.9/dist-packages/tinytuya/Cloud.py", line 109, in __init__
self._gettoken()
File "/usr/local/lib/python3.9/dist-packages/tinytuya/Cloud.py", line 246, in _gettoken
response_dict = self._tuyaplatform('token?grant_type=1')
File "/usr/local/lib/python3.9/dist-packages/tinytuya/Cloud.py", line 205, in _tuyaplatform
response = requests.get(url, headers=headers)
File "/usr/local/lib/python3.9/dist-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/usr/local/lib/python3.9/dist-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.9/dist-packages/requests/models.py", line 436, in prepare_url
raise InvalidURL(*e.args)
requests.exceptions.InvalidURL: Failed to parse: https://openapi.tuyaeu.com/v1.0/token?grant_type=1
Code: Select all
pip3 install -U urllib3
Code: Select all
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.9/dist-packages/tinytuya/__main__.py", line 76, in <module>
wizard.wizard(color=color, retries=retries, forcescan=force)
File "/usr/local/lib/python3.9/dist-packages/tinytuya/wizard.py", line 128, in wizard
with open(CONFIGFILE, "w") as outfile:
PermissionError: [Errno 13] Permission denied: 'tinytuya.json'
Users browsing this forum: Google [Bot] and 1 guest