Comments (7)
it is still happening here 17 March 2022 fully patched
from tuya-iot-python-sdk.
Many people with such problem last few days, but no way to fix it ((
from tuya-iot-python-sdk.
Same issues here. All devices seems to lose connection, after restarting Tuya integrations it works again for some time (a few hours). It's absolutely not stable at this moment. Problem with 11.5 and with 2021.1.12. It looks that there are problems with the Tuya API/ Tuya Cloud and has nothing to do with the version of Home Assistant nor OS-version. I have same problems with my test-box (used old version and new version and different versions of OS).
from tuya-iot-python-sdk.
I'm also having the same issue all of a sudden. Added in some logging to the openmqtt method _get_mqtt_config()
to see what the error from the API is:
{'code': 1010, 'msg': 'token is expired', 'success': False, 't': 1639929045868}
So it would appear the auth token is expiring and not being correctly refreshed by the client.
from tuya-iot-python-sdk.
I'm also having the same issue all of a sudden. Added in some logging to the openmqtt method
_get_mqtt_config()
to see what the error from the API is:{'code': 1010, 'msg': 'token is expired', 'success': False, 't': 1639929045868}
So it would appear the auth token is expiring and not being correctly refreshed by the client.
I asked IOT.tuya support about this, they ask me "Where did you see the API you called,Could you please provide the address you saw" ;)))
from tuya-iot-python-sdk.
This was fixed in tuya-iot-python-sdk v0.6.6 which was included in Home Assistant 2021.12.6.
from tuya-iot-python-sdk.
Looks like the url to refresh mqtt config is wrong : https://developer.tuya.com/en/docs/cloud/c2c2630d7c?id=Kb68mozbi3foh
Or am I mistaken here?
The code seems to make requests to (openmq.py - l25-26)
TO_C_CUSTOM_MQTT_CONFIG_API = "/v1.0/iot-03/open-hub/access-config"
TO_C_SMART_HOME_MQTT_CONFIG_API = "/v1.0/open-hub/access/config"
These URLS are used at lines 62-81:
def _get_mqtt_config(self) -> Optional[TuyaMQConfig]:
response = self.api.post(
TO_C_CUSTOM_MQTT_CONFIG_API
if (self.api.auth_type == AuthType.CUSTOM)
else TO_C_SMART_HOME_MQTT_CONFIG_API,
{
"uid": self.api.token_info.uid,
"link_id": LINK_ID,
"link_type": "mqtt",
"topics": "device",
"msg_encrypted_version": "2.0"
if (self.api.auth_type == AuthType.CUSTOM)
else "1.0",
},
)
if response.get("success", False) is False:
return None
return TuyaMQConfig(response)
This code doesn't match the actual documentation
from tuya-iot-python-sdk.
Related Issues (20)
- Adding support for Get Extended Properties
- Again issues with updates HOT 2
- tuya_iot getting error "Failed to establish a new connection" HOT 4
- Robot Mower Support
- ImportError: cannot import name 'Literal' from 'typing' using python 3.7.9
- Error when I try to retrive data
- BHT-002 thermostats reports wrong temperature
- failure to initiate tuya integration on home assistant HOT 4
- Tuya Smart Door lock
- Something wrong with Tuya library used by HA HOT 2
- Wrong endpoint url used in get_device_status implementation
- Problem in connection. 'skill id invalid' Error.
- `sign invalid` problem for device logs query.
- Stream only on the SUB(SD) profile and not on the MAIN(HD).
- MAC check fails on device rename HOT 1
- Error code "1010" causing a "token invalid" HOT 1
- Returns the modified DPcode HOT 2
- OpenMQ conflict if used in two different HomeAssistant integrations HOT 1
- openapi.login() does not exist anymore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuya-iot-python-sdk.