tuya-home-assistant
tuya-home-assistant copied to clipboard
Tuya login error: code 500 please contact the admin
I was having some trouble with migrating from Tuya v1 to Tuya v2 and had both installed in my Home Assistant. The V1 was loading quicker than the V2. Now i removed V1 and after re install and new config V2 is trowing the error "Tuya login error response: {'code': 500, 'msg': 'system error,please contact the admin', 'success': False, 't': 1634386363393}"
Home Assistant Version Home Assistant 2021.10.5
2021-10-16 14:24:30 DEBUG (MainThread) [custom_components.tuya_v2] Tuya async setup conf None 2021-10-16 14:24:30 DEBUG (MainThread) [custom_components.tuya_v2] tuya.__init__.async_setup_entry-->{'o0o0o0': '0ec3f726b3c3fd24964ad2c9f9700a83fc5f9ce42c137675d5529bb9e5d80233c3ac84211ff4ca2323e24bb79e70d2860d6c69597498ca9adc1c0a0bdbc5cb9c987493a90cf4dea4ae630c9462c5e222d55ff04f888649ceeceb1616c6a0ba3607d31b666c88d8b5a9a38d4272c324e6514acf84999e071b8138daa9e1d3710edc5f6589b6d0153eb2b3c5dc4c92331d33ce07b3c5af86881721c9a7ab51a16725740140d0ad9e2dc2c59855926a2361acda76ecdfa005c952c98022e94c6c5b63e682b6d0bb7c2422b61f36edcb4ea63696256d64f65b8d6c705296d2721c93cd9b3793196aae0036614642c54cece3c747313cc21b0a96b354eb8a3b94a3416f17856878f74bf4eec9f80d2b8fabf37fe692fb5e984b054767fff067f3682f', '00oo00': 'AQNRWyUFFlQbEBRAQAhYQl1bAgpXEwJfUkMeGUVCCQo=', 'oo00oo': '96ecec3c862cec5141e34f76434cc2b3cacb031de5f29368e02cae550cf29dc3'} 2021-10-16 14:24:30 INFO (MainThread) [custom_components.tuya_v2] tuya.__init__.exist_xor_cache-->True 2021-10-16 14:24:30 DEBUG (SyncWorker_2) [tuya iot] Request: method = POST, url = https://openapi.tuyaeu.com/v1.0/iot-01/associated-users/actions/authorized-login, params = None, body = {'username': '[email protected]', 'password': '***', 'country_code': 'DE', 'schema': 'Smart Life'}, t = 1634387070809 2021-10-16 14:24:31 DEBUG (SyncWorker_2) [tuya iot] Response: { "code": 500, "msg": "system error,please contact the admin", "success": false, "t": 1634387070989 } 2021-10-16 14:24:31 ERROR (MainThread) [custom_components.tuya_v2] Tuya login error response: {'code': 500, 'msg': 'system error,please contact the admin', 'success': False, 't': 1634387070989}
Which admin should i contact ? :)
Im having the same issue
I am having the exact same issue as well...
same here after update from 1.5 to 1.6....revert did not helped
yup. the same....
the same... Cette erreur provient d'une intégration personnalisée
Logger: custom_components.tuya_v2 Source: custom_components/tuya_v2/init.py:153 Integration: Tuya v2 (documentation) First occurred: 16 octobre 2021 à 21:57:32 (3 occurrences) Last logged: 22:09:08
Tuya login error response: {'code': 500, 'msg': 'system error,please contact the admin', 'success': False, 't': 1634421452088} Tuya login error response: {'code': 500, 'msg': 'system error,please contact the admin', 'success': False, 't': 1634422050014} Tuya login error response: {'code': 500, 'msg': 'system error,please contact the admin', 'success': False, 't': 1634422148212}
schema
of the transmitted data is Smart Life
.
This must be smartlife
originally.
In other words, there is a lack of processing to convert user input from Smart Life
to smartlife
.
Same here
exact same issues
Attending fix, you can modify the /config/custom_components/tuya_v2/const.py L40 with : TUYA_APP_TYPES = {"TuyaSmart": "tuyaSmart", "smartlife": "smartlife"} After restart HA and cache empty, it work...
@mureaul it's working now. thanks
Made the fix suggested by @mureaul and although it doesnt show the error anymore, no devices are popping up for me. Thoughts? I can see my devices listed on the IoT cloud website so that doesnt seem to be the issue.
My hass setup is on a raspberry pi with home assistant OS installed. The tuya developer page seems to imply that they want Home Assistant Core instead. For those that this worked for, whats your setup? Thanks!
I got the same as @cooltech786 .
My log file says
2021-10-17 14:37:07 DEBUG (Thread-106) [tuya iot] connecting ssl://m1.tuyaeu.com:8883 2021-10-17 14:37:07 DEBUG (SyncWorker_7) [tuya iot] Response: { "code": 28841105, "msg": "No permissions. This project is not authorized to call this API.", "success": false, "t": 1634474227513 }
Has something changed with region codes? :x
Attending fix, you can modify the /config/custom_components/tuya_v2/const.py L40 with : TUYA_APP_TYPES = {"TuyaSmart": "tuyaSmart", "smartlife": "smartlife"} After restart HA and cache empty, it work...
i fixed it by just adding all options from the previous version TUYA_APP_TYPES.
my code looks like
TUYA_APP_TYPES = {"TuyaSmart": "tuyaSmart", "smartlife": "Smart Life", "SmartLife": "smartlife"}
restart HA and devices showed up on the dashboard
I still have an error: Tuya login error response: {'code': 500, 'msg': 'system error,please contact the admin', 'success': False, 't': 1634557287935} I corrected line 40. No change...
I think there's something wrong with the new 1.6.0 integration, I pulled the latest update from the master branch and it works (not getting the 500 http error), but the device is not updating it's state even though in the logs it received the mqtt message. The state changed if you restart HA.
So in the end, I downgraded the integration to version 1.5.0 and changed line 40 in const.py
to:
TUYA_APP_TYPES = {"TuyaSmart": "tuyaSmart", "SmartLife": "smartlife"}
Just like the const.py
file in the master branch. And it works!
Showing this error as well. Corrected the TUYA_APP_TYPES dic, but still getting:
Tuya login error response: {'code': 500, 'msg': 'system error, please contact the admin', 'success': False, 't': 1634690431549}
I saw a commit that looked hopeful, but not sure it'll quash this bug entirely...
This is so weird. I'm having the same problems. 1.6.0 isn't working with that fix provided, 1.5.0 incl. fix showed up an configuration issue, so I reverted to 1.4.2.
When I decided to automate my house, I was just looking for convenience and comfort. Unfortunately these TUYA devices give more headaches than convenience. Devices are a fruit salad (various manufacturers), identical devices but from different manufacturers, such as opening/closing sensors work differently. There are Tuya devices that connect to the Tuya hub, there are others that do not. A lay person would never be able to integrate Tuya devices with HomeAssistant. The person has to visit the website (iot.tuya.com) create a project, relate the project to a device and so on. You pay for the device and maybe tomorrow if you want it to work you will have to pay to use it via API, it's not clear if in the future there will be a charge. I am seriously disappointed, I am seriously considering switching everything to another solution/manufacturer. I know the team of developers are working to officially bring Tuya devices to HomeAssistant, however they cannot release a version that breaks the functionality. I don't know what to do to reverse things, and I don't see an answer from the development team regarding the solution.
@Turbovix I completely agree with you, but this here is the development and beta testing version. I know from my own instance of home assistant, that not all devices are being recognised within the home assistant Tuya Integration which is for production purposes - the reason why I still use the instabie branches here.
But as you already said, it's much to difficult to setup developer accounts for noob. With this approach, Tuya & Home Assistant in combination will always stay a hassle. It will never become a convenient solution to everybody.
I have same error massage. Try many times. Finally, I install V1.4.2, restart add Integrations, Tuya V2. after completed all Tuya devices, update V1.4.2 to V1.6.0 then restart Now, my Tuya V2 can use without error
- Delete all Tuya integrations that you have and Restart HA
- Install 1.4.2 via HACS
- Update Line 40 of const.py with TUYA_APP_TYPES = {"TuyaSmart": "tuyaSmart", "SmartLife": "smartlife"}
- Restart HA
- Add tuya v2 on integrations
- Restart HA
- Update on HACS 1.4.2 to 1.6
- Restart HA
Enjoy.
Hi everyone
I agree with @otomay solution with small differences
- Delete all Tuya integrations that you have and Restart HA
- Install 1.4.2 via HACS
- Update Line 40 of const.py with:
TUYA_APP_TYPE = {"TuyaSmart": "tuyaSmart", "SmartLife": "smartlife"}
There wasn't the "S" at the end of "TYPE" in version 1.4.2
- Update Line 93 of config_flow.py with:
api.endpoint = "https://openapi.tuyaeu.com"
Maybe different regarding to your location, I'm in France and without this integration give me an authentification error
- Restart HA
- Add tuya v2 on integrations
- Restart HA
- Update on HACS 1.4.2 to 1.6
- Restart HA
Works for me