Hi Andrew
I’ve been having the same issues with my Tuya based WiFi underfloor heating thermostat/controllers since I integrated them in HA. What I’ve been able to troubleshoot so far is:
It’s not a Wi-Fi issue in my case. I have a NEMS/Nagios monitoring server and continuously monitor all IP based endpoints on my network and various open TCP/UDP ports on devices. The Tuya thermostats are reliably responding to ICMP/ping (I still need to check the open port status over time). I have other smart devices that go through bouts of long ping response times and this has been down to those devices doing other stuff (updates, sending out MQTT, sleeping etc). All my devices are set to DHCP reservations so they are not changing IP. As far as I can see, they are not being confused by 5G and dropping off the 2G band and they are not moving to other satellites in my mesh that could account for potential issues, although I’d expect to see this in long ping response times.
Likewise it’s not likely to be another router or Internet issue - I have various scripts on NEMS for checking both router and internet performance. I can see when things go slow relatively speaking and this does not coincide with when the Tuya thermostats show up as not responding in HA.
Although I’m using Local Tuya in HA, I’m not sure yet how often the devices interact with Tuya cloud API and if this plays a part in the issue.
What I have found is on the iPhone app, when I set a thermostat to manual and immediately back to auto, this has sometimes triggered the thermostat to show up in HA, only to revert back to not responding over time. This is not a consistent fix though.
What I have consistently seen is when the thermostats become unavailable, then powering them off at the isolator switch and back on (not using the button on the device as that doesn’t kill the power and just puts them to sleep), waiting for them to boot up, then refreshing HA dashboard brings them back as far as HA is concerned.
They were showing up fine over night, I then did a HA update this morning and once HA booted up, the Tuya were unavailable. Locally they were working fine but once I powered each off and back on and they came back in HA.
So this leads me to think the issue is the HA integration with Tuya, or Tuya cloud and some session timeout or refresh issue. I might try and raise with Tuya but I won’t hold my breath.
I have seen other HA integrations present unavailable status for their respective devices and these clear up over time when HA does a session refresh. These issues seem to be improving as updates are rolled out. So maybe it’s a case of waiting for Tuya or the HA integration developer to figure out where the reliability issue is and fix it.