Android App - Sensors Stop Updating on Idle Phone

I have an old Pixel 1 that I use to take advantage of the Unlimited Original Quality Photo uploads using Google Photos. I use an app called DriveSync to upload photos from my Pixel 6 to Google Drive. The Pixel 1 then uses the same app to download those photos, delete them from Google Drive, and upload them to Google Photos using the “Unlimited Photo Uploads” Feature that is still available for the OG Pixels.

I don’t want to have the Pixel 1 charging all the time so I use a TP-Link Smart Plug and an HA Automation to keep the phone between 30-70% using the sensors from the HA Android App. I have an OTG splitter/adapter so I can charge the phone but also have a USB → Ethernet adapter connected to the phone so I don’t have to worry about WIFI connectivity while sleeping etc. The issue I’m having is that within a couple hours of leaving the Pixel 1 idle, HA stops receiving sensor updates (ie. battery percentage). I have the HA app set to update the battery percentage sensor every 1-minute when charging and every 15-mins when discharging. I can continually ping the phone via the USB NIC and get s response anytime but the HA app itself seems to not be sending updates unless I actually open it. As far as I can tell, it has all of the necessary permissions to run.

Thoughts?

Sounds like either the app is crashing or you didnt grant background access

So definitely one of the issues was background access, which I have fixed. The lack of sensor updates still appears to be happening when the smart plug turns off. Checking my router logs, when the power is lost, the USB NIC disconnects for about 5 seconds (lights also go out on the NIC) but then reconnects within a few seconds. At this point, the sensors in the HA App stop sending data until I open the app again at which point it says “Reconnecting” at the bottom and all sensors will update.

Basically it seems that if the network connection is lost, the app loses connectivity to HA until I reopen it.

you probably have some other error occurring then it sounds like the companion app is not crashing so something else is causing the issue. Try to check the companion app logs to see what is causing it.