milo526 / homebridge-tuya-web

Hoobs and Homebridge plugin for Tuya devices using Home Assistant Tuya Web Api
MIT License
219 stars 95 forks source link

ERROR: [TuyaWebPlatform] Tried overwriting device config for: "ebd411083fe003ede7dsjy" which is not a valid device-id or device-name. #447

Closed wolfgangrumpf closed 2 years ago

wolfgangrumpf commented 2 years ago

Describe the bug

Tuya device does not show up and the valid device ID is not recognized

Steps To Reproduce

Install plugin; configure with device ID from smart_life app; configure with username/password/smart_life Look for device to show up Device does not show up, instead see: [TuyaWebPlatform] Tried overwriting device config for: "ebd411083fe003ede7dsjy" which is not a valid device-id or device-name.

Plugin Version

1.1.2

Homebridge Config

{ "name": "TuyaWebPlatform", "options": { "username": REDACTED, "password": REDACTED "countryCode": "1", "platform": "smart_life" }, "defaults": [ { "id": "ebd411083fe003ede7dsjy", "device_type": "light", "min_brightness": "0", "max_brightness": "255", "light_characteristics": [ "Brightness", "Color", "Color Temperature" ] } ], "scenes": true, "platform": "TuyaWebPlatform" }

Device Config

Getting credentials Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn conn = connection.create_connection( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/util/connection.py", line 73, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn conn.connect() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connection.py", line 353, in connect conn = self._new_conn() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connection.py", line 181, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f83730b13a0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='px1.tuyaen.com', port=443): Max retries exceeded with url: /homeassistant/auth.do (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f83730b13a0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "TuyaTest.py", line 20, in auth_response = requests.post( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/api.py", line 119, in post return request('post', url, data=data, json=json, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='px1.tuyaen.com', port=443): Max retries exceeded with url: /homeassistant/auth.do (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f83730b13a0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')) Additional Context

milo526 commented 2 years ago

Please post the result of the steps under "How to check whether the api this library uses can control your device"., please make sure that there is actual data to be returned instead of this error. I just re-ran the script multiple times without any problems. Make sure you are running it using python 3.

My installation of the plugin works just fine while overwriting devices by ID so I will need the API output to double check the ID you supplied.

markyytos commented 2 years ago

I have same problem with a Fan+Light

{ "name": "TuyaWebPlatform", "options": { "username": "***", "password": "*", "countryCode": "34", "platform": "tuya" }, "defaults": [ { "id": "****", "device_type": "fan", "fan_characteristics": [ "Speed" ] } ], "scenes": false, "_bridge": { "username": ":::::", "port": 45597 }, "platform": "TuyaWebPlatform" }

onichan88 commented 2 years ago

Here another with the same problem.

badrabbit commented 2 years ago

I'm having the exact same issue with a ceiling fan which does show up in the Tuya Smart app but cannot be added to homebridge via this plugin.

milo526 commented 2 years ago

Sadly not all devices are supported by the api that this plugin uses (as is also documented in the read me). Please post the output of the api as requested earlier and you'll probably see that your device is not listed. In which case I cannot do anything to support your device. If it is listed, please show me the api output and I will try to find why the device doesn't show.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.