Local Tuya Devices keep shuffling between unavailable and available [solved: problem was with local HA setup]

I’ve 4 Tuya Devices which I’ve integrated via local Tuya custom integration.

The problem here is that all these devices keep becoming unavailable (mostly all of them together) at very regular intervals and then become available again on their own.

The situation is so bad that it looks like this.

I’ve tried all versions from 4.1 to 5.1 and master. But nothing helps.

All i have in logs is

Perhaps it’s wifi coverage issues, or too many devices for the router?

Nevermind, got it solved.

Facing similar issues. How did you resolve it?

It was apparently my setup fault.

I’m running HA off an old phone with termux. It was going to sleep so had to enable “Acquire Wakelock” option.