I know there has been a lot of discussions surrounding this but none of them have helped. I feel like I am missing something basic. I can add the Tuya integration no problem and see all my devices and I have verified from the setup guide that I have selected all the appropriate API services and authorized them. I can control the devices without an issue but they will not EVER update the status. I can trigger automations that toggle the wifi switch successfully once but I can wait an hour and the status will not ever update. I have been controlling these devices for years with Tuya custom which still works fine. They are all wifi Tuya outlets from various Amazon vendors, unhacked.
I know all about Tuya local but I just don’t have the time to go through all of that, I have probably 18 or 20 of these outlets and I also want to be able to buy and plug in a new one without any hassle, which I’ve been able to do with Tuya custom.
I have updated HA to the absolute latest version, checked the Tuya API stuff more times than is probably sane to do, and tested repeatedly over a few weeks and I have not ever seen the status update once no matter how long I leave it and I have never seen an error message in the log either.
If I could just get the status updates to work I would be able to move over to a new RPi that I want to transition to using the new Tuya stuff. Can anyone help me?
I have this same issue and it is a bug with the new tuya platform.
A workaround is if you create an automation using time pattern as the trigger, for mine I’ve set this to 30 mins.
Then for the action you select Call service and select the Home Assistant Core Integration: Reload config entry and for the target, you can just select one of your tuya devices, it doesn’t matter which one.
This will then manually reload the tuya integration which will then report the states again. I set mine to 30 mins as I find it stops reporting the states fairly regularly.
The one drawback is for the 2 seconds or so when it is reloading the integration, the state will show as unavailable in home assistant. If you have automations that depend on a device being on or off for a time period, this will mess with that if you use the device trigger type. Instead you can use the state trigger type and use the ‘From’ variable for example if device From ‘off’ for 30 mins.
Hi Toby, thank you. I have read about that issue but mine has literally never updated the status once without reloading, it’s not that it stops, it just doesn’t work at all, even delayed. Thank you for your answer though, I wish that were the issue.
Ahh yeah, that’s annoying, I’m not sure what it could be then. It’s weird as I’m using it on pi too and it just works for me. I use both tuya and also tuya local which is through node-red. I know the local one communicates using ports 6667 and 6668 but from what I understand the official integration should just work as it communicates with the API over the cloud.
You mentioned you used to use Tuya custom. Just double checking, you’ve removed this from the custom_components file?
After it’s been removed I think the old integration has to be removed, the pi restarted and then the integration will need to be readded.
I used to use a tuya custom and when I moved onto the official API I think I had to take these steps.
I’m sure you’ve already done that but it’s the only thing I can think of at the moment.
I am actually setting this up on a newly etched sd card on another Pi - I started the move because the old Pi where I’m running Tuya custom is starting to have issues. I just re-imaged the new Pi again because originally I had copied over a few things including the custom components folder. But now I’m running stock HA through docker on a fresh Raspian install. The old Pi, when it is working, still works like a champ with Tuya custom and the phone app works fine, as does Google home.
I did find something in the Tuya api stuff that I didn’t see before that talked about enabling messaging - was not mentioned in the docs but I know their new stuff uses MQTT so I thought maybe? But it didn’t make a difference. I also tried changing data centers and that didn’t help either.
I appreciate the input, if you can think of anything else I absolutely am willing to try it. Thank you.