RVTim
(Tim Olson)
February 2, 2024, 8:20pm
15
Thanks for the tip today on the new integration. I was able to add the smartlife integration via HACS. I had to set up smartlife on my phone first, since I had been using the Tuya app, and then have to remove my devices from Tuya and Add them to Smartlife, but once I did that the integration was straightforward and everything seems to work fine.
1 Like
rytecbe
(Ryan Hendriks)
February 2, 2024, 9:16pm
16
Hi Tim where did you had to remove your devices from Tuya? in your phone app or homeassistant app or in Tuya website?
bpuga
(Bernard Puga)
February 2, 2024, 9:25pm
17
Idem here, I spent hours trying to fix it, finally uninstall it and reinstall, enter the cloud, nothing … I got bored and I switched to the app smartlife… much simpler, I do not have to have an account in tuya cloud. See How to Install Smart Life Integration (Beta)-Tuya IoT Development Platform-Tuya Developer
2 Likes
lucut
(lucut)
February 2, 2024, 9:28pm
18
2 Likes
You didn’t need to move them. It’s works with either app:
I set this up using the Tuya Smart app for Android.
Well, the man himself confirmed that this integration is not ready for prime time:
opened 05:38PM - 13 Oct 22 UTC
integration: tuya
no-stale
### The problem
**Tuya integration stopped working**
Recently there are many c… omplains about Tuya integration not working, most of them are due to expired [Tuya IoT Platform](https://iot.tuya.com/) trail period for the account.
### In order to make your Tuya integration working again you need to extend your trail period, do extend the trail period do the following:
-----------------------------------------------------------------------------------------------------------------------------------------
EDIT: Please first try to only "Unlink your Tuya App Account and add it again after unlinking" (last step 5 here) and only if it doesn't work go through the whole process
![image](https://user-images.githubusercontent.com/1858925/195665330-35ad2cbe-f68e-4464-a3e7-03a4468340b4.png)
-----------------------------------------------------------------------------------------------------------------------------------------
1. Login to [Tuya IoT Platform](https://iot.tuya.com/)
2. Select `Cloud` and `Cloud Services`
![image](https://user-images.githubusercontent.com/1858925/195664677-a3b9c9b3-f244-4d66-9845-f20246768023.png)
3. Find your `IOT Core` and click on `View Details` on the right
![image](https://user-images.githubusercontent.com/1858925/195664747-d1295eb4-927e-4cba-a6cf-41cc783942b8.png)
4. Click `Extend Trial Period`
![image](https://user-images.githubusercontent.com/1858925/195664852-2eec67f5-8fc2-4236-b1fe-7e80b42086f8.png)
5. Fill in your details, **don't forget to make them aware you don't like it:** "Please work with Home Assistant to remove the need for these dumb developer accounts. Thanks" (feel free to rephrase as you wish)
![image](https://user-images.githubusercontent.com/1858925/195664903-6ea9825a-9738-45f4-92f4-f5456ea13cf2.png)
6. Now you need to wait until review is over
![image](https://user-images.githubusercontent.com/1858925/195665030-9cdd6c78-21bc-49cb-83ef-cf5da4176979.png)
### After approval, renewal is done / accepted:
1. Login again and select `Cloud and `Development`
![image](https://user-images.githubusercontent.com/1858925/195665127-53178be1-b560-47a3-a0bf-c2fda6c07f17.png)
2. Select your project
![image](https://user-images.githubusercontent.com/1858925/195665170-c861b6f7-9981-4f1a-9aea-355d7d8a416f.png)
3. Select `Devices`
![image](https://user-images.githubusercontent.com/1858925/195665233-b6445c93-d447-40a3-b690-48a6ff4c8591.png)
4. Select `Link Tuya App Account`
![image](https://user-images.githubusercontent.com/1858925/195665283-bf07af1b-f213-4dbc-b3fa-bcc68acccf03.png)
5. Unlink your Tuya App Account and add it again after unlinking
![image](https://user-images.githubusercontent.com/1858925/195665330-35ad2cbe-f68e-4464-a3e7-03a4468340b4.png)
### I have followed this process but it still doesn't work:
If your account was expired and it still doesn't work after, contact [Tuya IoT Platform](https://iot.tuya.com/) support to help resolving the problem. **If your account is not expired, please do not comment on this issue and create a new one**
Thanks @frenck for the detailed screenshots
Nabil632
(Nabil632)
February 3, 2024, 5:46am
20
Hey guys, I did the integration as it’s explained here… I can control the devices, but the automations I have are not working because the devices are still missing in the automations…
Do I have to go through each automation to adjust it again?!
This would take forever…
Or should I do something with the old tuya integration?
How this thing is going with you guys?
Thanks
J.Soko
(Joachim Sokolowski)
February 3, 2024, 8:21am
21
In my case everything works well,
but It changed the entity_id, so I had to chnage it in the automations
p.e. climate.vhbdfh changed to climate.vhbdfbh
home-assistant:dev
← home-assistant:tuya-sharing-sdk
opened 07:10PM - 30 Jan 24 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did this.
This piece of text is published with the release notes, so it helps if you
write it towards our users, not us.
Note: Remove this section if this PR is NOT a breaking change.
-->
Tuya has provided an easier and improved login method for Home Assistant users. Having a developer account with Tuya is no longer required; instead, you can scan a QR code with your Tuya Smart of Smart Life app to authenticate it with Home Assistant.
After the upgrade, Home Assistant will ask you to re-authenticate your Tuya Smart or Smart Life account using this new method.
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
This PR moves the Tuya integration onto the new sharing SDK, which removes the need for a developer account and can directly log users in by scanning a QR code using the Smart Life or the Tuya app.
![QR Code](https://github.com/home-assistant/core/assets/195327/840a653b-8e09-4b3a-a935-6d71d85c8bf1)
![QR Code Migration](https://github.com/home-assistant/core/assets/195327/391bfd31-2c16-413d-8d86-6e8b6269fb93)
This is powered by their new package: <https://github.com/tuya/tuya-device-sharing-sdk/>
This PR offers a migration path. On upgrade, a re-auth will be triggered that will request the user to log in using their Smart Life / Tuya Smart app. After re-auth, everything will continue to work as usual.
This PR is a combination of the work done in #103007 and #104767, updated to handle our latest features/standards.
Tested against both Tuya Smart and Smart Life accounts, with new integration setups and migrating ones, with a variety of devices (heater, AC, a bunch of bulbs, Christmas lights, doorbell camera, and siren).
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [x] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/31153
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [x] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [x] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [x] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
1 Like
MoritzS
February 3, 2024, 9:06am
22
Worked perfectly with this solution. Had to rename the entity from light.floor_none to light.floor, as it was before, but then everything worked again!
Thank you for this.
Nabil632
(Nabil632)
February 3, 2024, 10:05am
23
In the automations, there is no devices!
Although the smart life integration is succeeded
Phil406
(KAT)
February 3, 2024, 10:22am
24
Thanks
This did work for me as well. Only thin it will change the entities Id, but once st, we are in local and cloud so no need to think anymore about Tuya IOT services extentions etc… For me, here after I will only stay with Smart Life intégration.
Thanks for the suggestion @Flo_coe - Installing the smartlife integration via HACS fixed it for me. My Tuya integration only stopped working this morning
flex420
(Yo)
February 3, 2024, 11:23am
27
have you tried turning it off and on again? (reboot hassio)
Nabil632
(Nabil632)
February 3, 2024, 12:09pm
28
I’m running the home assistant on raspberry pi, I tried to restart the system many times… same problem…
Anything else I could try?
Thanks
Replace the devices in the automations.
Hindsight, but this is why everyone recommends using entities instead of devices. Each device has a unique ID (alphanumeric string) that’s used when you select the ‘device’ option. That will change when re-adding the device with a new integration like this. Using the entity instead will use the entity ID (name) instead which means you can just make sure the new entity has the same name as the old entity and it will automatically be reassigned in automations.
You can see this for yourself by adding a device and then adding the entity from the same device to an automation and checking out the YAML. In these screenshots, I used device for the first selection and entity for the second.
1 Like
Nabil632
(Nabil632)
February 3, 2024, 6:41pm
30
Actually I could extend the trial period of the tuya contract for 6 months… and I can control my devices through both integrations: the old tuya integration and the new smart life integration…
The automations I have are working well but they are using the old tuya integration.
Do you guys advise me to remove the old one and adjust all of my automations to use the new smart life integration?
kruzio1985
(Kruzio1985)
February 4, 2024, 3:50am
31
Now Home assistant is useless aplication i was using it alot of years and i have too use new version all my configs is broken alot off them is no longer work who is so ,
to create that new Bad version now this system on ha is nothink then broken somebody idea
CREart
February 4, 2024, 1:43pm
32
I liked this integration more than Tuya and LocalTuya, removed both and switching to Smart life. I have 5 smart plugs and 2 Air Conditioners, all plugs works seamlessly. Air Conditioners still only have the HVAC modes, but anyways, way simpler than Tuya.
Nice work .
Nabil632
(Nabil632)
February 4, 2024, 2:03pm
33
CREart:
I liked this integration more than Tuya and LocalTuya, removed both and switching to Smart life. I have 5 smart plugs and 2 Air Conditioners, all plugs works seamlessly. Air Conditioners still only have the HVAC modes, but anyways, way simpler than Tuya.
But this new integration is still beta right? Is it trustable? Or better to wait before this changing?
There’s no harm is trying it out but my experience has not been good. I have five Tuya bulbs being used for outside lighting with an automation that turns them all on at dusk, changes one set to red at 10 PM, and turns everything off at dawn. They’ve all been pretty inconsistent since settings up the HACS integration where they worked without fail using the HA integrations for months.