KASA Devices keep going OFFLINE

If you have a ST hub, you could try using @BarryA 's Edge Driver for your Kasa devices. It eliminates the cloud and includes power and energy monitoring.