rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.82k stars 544 forks source link

Entity not available #1249

Open nqrgaard opened 1 year ago

nqrgaard commented 1 year ago

Hi Suddenly my dashboard on Home Assistant says "entity not available" for all my devices from Tuya. Other devices, which is not a part of Tuya works fine, my Tuya device works fine from SmartLife app.

Can you help me to solve this?

Skærmbillede 2023-01-18 kl  08 36 41
Oglaf commented 1 year ago

It also happened to me a few times and I believe others reported this as well. Most times you can fix this by reloading localTuya, go to Settings > Devices & Services > 3 dots > Reload. Last time it happened I had to restore my backup.

nqrgaard commented 1 year ago

It also happened to me a few times and I believe others reported this as well. Most times you can fix this by reloading localTuya, go to Settings > Devices & Services > 3 dots > Reload. Last time it happened I had to restore my backup.

Thanks for your reply. I tried to reload, but that didn't help. I also tried to restore to a much earlier backup without luck. So I restored back to my current backup after the error accured, but still no fix.

Maybe there is a link between Home Assistant and Tuya that is broken, but I don't know where to start to check that?

JuhaKoivisto commented 1 year ago

Are those entities from Tuya or LocalTuya? Tuya entities will become unavailable if your Tuya developer account expires.

nqrgaard commented 1 year ago

Are those entities from Tuya or LocalTuya? Tuya entities will become unavailable if your Tuya developer account expires.

I think I used LocalTuya. How can I see if I set it up correctly?

JuhaKoivisto commented 1 year ago

Go to Settings / Devices & Services / Integrations and there you should see something like this: image

nqrgaard commented 1 year ago

Yes that I have, but I also have the other Tuya? 6E72A2AD-AED5-4B47-950F-43F9D34A0840 352DEC93-5D0F-4EDA-A487-64FD450151F4

JuhaKoivisto commented 1 year ago

Looks like you haven't configured any devices to LocalTuya and your Tuya developer account has expired. The same happened to me as I did not realize the account is valid for only 1 month. The solution is to create another developer account with another email, connect your Tuya cloud account to it to get to device information and configure those devices to LocalTuya, which can, unfortunately, be a rather cumbersome process (depending on your devices).

nqrgaard commented 1 year ago

I thought I already added all my devices to local Tuya, because they worked in the beginning (probably within the first month). Can you show me how to configure through LocalTuya? I thought I already added those through that. Or do you have a video link that describes it perfectly. I think there are many older versions, which does not look the same as the current UI on Tuya.

JuhaKoivisto commented 1 year ago

I'm definitely no expert in this and only done it once using these two videos: https://youtube.com/watch?v=vq2L9c5hDfQ&feature=shares, https://youtube.com/watch?v=2kfv0W80NYk&feature=shares.

Oglaf commented 1 year ago

@JuhaKoivisto I don't recommend creating a new developer account as it will only be valid for another month. You can request a 6 month extension through IoT website as described in their knowledge base. I requested last week with justification "Home assistant user" and it got approved within 4 hours.

@nqrgaard Linking your Tuya account to localTuya will facilitate the process of obtaining the local keys without the need to install python and running tinytuya to manually obtain it. Then you have to manually map the data points to HA like described in the videos, it requires a lot of trial and error. Tinytuya has a table which might help you. After that it will generate a new device and you have to manually replace your lovelace cards with tuya devices and test it.

JuhaKoivisto commented 1 year ago

I requested an extension and never got a reply.

Oglaf commented 1 year ago

I requested an extension and never got a reply.

They don't reply, you have to keep checking their website.

Oglaf commented 1 year ago

@nqrgaard Important information, localTuya is awesome but it's definitely not user friendly, it either works out of the box or it requires many hours of trial and error with learning how to map DPs and troubleshooting with tinyTuya or discovering hidden DPs (for cameras and smart feeder for example). Also keep in mind it doesn't support tuya 3.5 protocol so it might not work with recent devices and definitely turn off tuya app Auto Update feature for devices.

I would say you to try it, if it works good, otherwise think about sticking with Tuya or get ready to jump into the rabbit hole of many hours of google research.