home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.23k stars 620 forks source link

Immense data usage on LineageOS 18.1 #4515

Open vsatmydynipnet opened 1 month ago

vsatmydynipnet commented 1 month ago

We run 1 Samsung A5 2027 under LineageOS 18.1 without Gapps and one Fairphone 3 under LOS21. All have Home Assistant App from Android. All devices have a data limit set to 6.5 GB with auto deactivation to not run into extra charges if something happens.

Home Assistant runs as VM on Proxmox.

The A5 created immens traffic (6.5GB) on one of the A5 and disabled further mobile usage. This happens already a few days ago, then i added 1GB more and after a few days normal data usage, it happened again today.

I deleted the App from the phone t make sure this user can use the other apps and there was no time for further investigation. It looks like - but not verified - the a combination of Home Assistant Server Update and/or VPN Access, or to much switching between WLAN and LTE/VPN (if the phone is in a border area between WLAN and LTE we had alot of switching some times) causes the problem.

I will go deeper in this, but its good to set limit with auto deactivation for now.

dshokouhi commented 1 month ago

most likely a duplicate of https://github.com/home-assistant/android/issues/979

dshokouhi commented 1 month ago

do you have live view cameras on your dashboard? if so make sure to leave the app without them in view or you will get high data usage.

vsatmydynipnet commented 1 month ago

No cams here. All other devices works with a few MB. Only a few temperature, wlan and motion detects ( alarm if the cat comes home :-) ) this device worked without any problems for a longer time. No LOS update, bur Home Assistant is updated automatically from Fdroid.

dshokouhi commented 1 month ago

what about cards that may stream data from something else like weather radar etc...? any of those can also cause the same issue.

vsatmydynipnet commented 1 month ago

auto close connection is enabled on the profile of my wife too

dshokouhi commented 1 month ago

auto close connection is enabled on the profile of my wife too

That doesn't make a difference with the known issue mentioned.

vsatmydynipnet commented 1 month ago

she has only a few weather (same as mine) and i have only a few MB

vsatmydynipnet commented 1 month ago

tried to upload screenshot, but does not let me.

my device has currently less then 10 MB for it. so i assume nothing there. it happened, as far as i can say, on a HA server update. there was 2 and 2 times this happens. but it has not happened on other updates so its hard to say

dshokouhi commented 1 month ago

if its animated weather like a radar that is streaming from another site it will cause this issue, anything streaming from another source will cause the issue. What kidn of weather cards are they? Most likely this is not caused by the app update but something on the dashboard.

vsatmydynipnet commented 1 month ago

Weather is from Diensteinformationen Forecast von Met.no Most of Display is Zigbee2Mqtt Ikea and Aquara sensors. Batteries and other stuff is on/off but no stream.

I will go deeper into it after being back home again.

vsatmydynipnet commented 1 month ago

I run OS Version: Home Assistant OS 12.4 Home Assistant Core: 2024.7.2

but i do not find any access logs when logging in via ssh. So its hard to say where the app tried to connect to. To make sure we have no cost escalation on this mobile i deinstalled HA App currently, so no real way to test till the new traffic package is active on Aug 1st.

matttbe commented 1 month ago

Hello,

Last night, I noticed that HA companion app was behaving strangely: receiving and sending data at ~200kbps without interruption. Here is some of the traffic I had during the night:

IPProto UID App Proto Status BytesSent BytesRcvd PktsSent PktsRcvd FirstSeen LastSeen
6 10184 Home Assistant HTTPS Closed 142098809 135808444 613522 1222317 2024-07-26T01:04:00.294+02:00 2024-07-26T03:00:02.399+02:00
6 10184 Home Assistant HTTPS Closed 97175861 92596221 417818 833501 2024-07-26T04:00:55.111+02:00 2024-07-26T05:09:45.425+02:00
6 10184 Home Assistant HTTPS Closed 86111756 82104707 369716 739230 2024-07-26T03:00:06.783+02:00 2024-07-26T04:00:44.998+02:00
6 10184 Home Assistant HTTPS Closed 66851151 63682375 287657 573168 2024-07-26T05:09:55.532+02:00 2024-07-26T05:57:25.859+02:00
6 10184 Home Assistant HTTPS Closed 55848305 53347978 242329 479733 2024-07-26T00:23:48.704+02:00 2024-07-26T01:03:45.224+02:00
6 10184 Home Assistant HTTPS Closed 22059263 21067972 95806 189473 2024-07-26T00:08:44.266+02:00 2024-07-26T00:23:45.233+02:00

Quite a bit, in both directions.

I do have liveviews somewhere in my dashboard, and I also noticed I'm affected by the issue #979, but here it is different: lower traffic, not 10Mbps, in both directions that restart after having been disconnected. It looks a bit like sensors that were sent in a loop, but I'm not sure how to easily confirm that: I don't see anything in the server logs (not so much there in fact). This morning, I no longer have the issue, I don't know what else to provide.

I'm using the version 2024.7.3-full of the app, on CalyxOS Android 14 (microg), with HA version 2024.7.3. I had an update of the app recently (from 2024.6.x I think), I don't know if it is the cause or not, but I didn't notice having this issue before.

BTW thank you for developing and maintaining this great app!