Open yzlnew opened 2 years ago
Can you let us know more about your usage? Do you have tiles? Are you using complications? Did you leave the sensors enabled?
The app also has no idea if your HA instance is down until it tries to connect, it also needs to keep trying to see if the instance is back up otherwise how will it connect again. Curious to see if others have similar battery consumption. Could you share a picture of the drain?
here is my drain, where the app does not show up. I have sensors enabled as well as tiles and complications.
The app also has no idea if your HA instance is down until it tries to connect, it also needs to keep trying to see if the instance is back up otherwise how will it connect again. Curious to see if others have similar battery consumption. Could you share a picture of the drain?
Update screenshots in op. I'm using tiles, no complications. Battery sensors are all enabled. It seems normal after I restart my HA instance back home, would report battery usage next charging cycle.
It seems normal after I restart my HA instance back home,
so this happens when your server is in a hung state and needs to be restarted? I am not sure how much the app can do to solve that issue if its having connection issues to the server and the server needs to be restarted. The app needs to try to make a connection to send updates otherwise it cannot.
so this happens when your server is in a hung state and needs to be restarted? I am not sure how much the app can do to solve that issue if its having connection issues to the server and the server needs to be restarted. The app needs to try to make a connection to send updates otherwise it cannot.
Unless you're actively using the app an online vs offline server shouldn't make that much of a difference, right (especially on Wear OS)? It's still making the same requests, just getting a different response. Nothing to keep alive/connected on a watch when the app is closed.
Unless you're actively using the app an online vs offline server shouldn't make that much of a difference, right (especially on Wear OS)?
thats what I was thinking but if the server is in a bad state maybe the calls are taking too long to complete keeping things alive longer?
I can confirm it's caused by a down instance, because everything is fine after my instance is back online.
What do you mean by down instance? Are you shutting down HA or is it inaccessible?
What do you mean by down instance? Are you shutting down HA or is it inaccessible?
My HA hang up on certain circumstances and can't be accessed (can't find out the root cause for now).
If you are able to get the logcat errors we can see if there is anything we can do. I'm not sure what if anything the app can do in these cases. Are you sure the phone app doesn't have similar issue when this occurs? What kind of setup do you have for the server?
For the past 36 hours my own HA instance has been down. I am not experiencing any worse drain than when it's up. There must be some other error being encountered here.
I can also confirm high battery drain by Home Assistant app when HA server is down. My HA server won't boot up after power outage on it's own and watch app battery usage skyrocketed. OnePlus 7 Pro with Samsung Galaxy Watch 4. Phone app doesn't seem to be affected that much? Tho my phone battery died earlier than normal today, yet HA app is like 0.5% on phone's battery stats so this may be coincidence. Or is it?
@Jonoox can you please confirm that you are on teh latest version 2022.11.0 ?
@Jonoox can you please confirm that you are on teh latest version 2022.11.0 ?
I confirm, it's Wear OS [v.2022.11.0]. On the phone it's beta-2914-23e65c49-full if it matters. I had default sensors enabled(battery sensor I think), I had these two available tiles on right screen but they were empty as I haven't really started to use and set the app properly.
This morning my HA server was down for a few hours but my pixel watch had very minimal drain, same as normal when im sleeping :) When you guys see this high drain can you try to get us the on device logs using either android studio or adb logcat? Unfortunately there is no easy way to get the logs. I would like to see what type of communication is going on when there is high drain.
asides from using tiles do you also use the entity state complication on the watch face?
Ah, yeah by "two available tiles" I meant both tile complication and entity state complication. Both empty with no entities added. I turned back the battery sensors to keep everything as it was today. Tomorrow will keep an eye on battery and will try to get logcat if something happens. My HA will be not running until tomorrow evening so maybe I'll catch something. That's log from few hours back, not sure if it's still draining because of too short timespan. Can't see anything wrong with it but maybe you'll get something. If not, I'll report back later.
Ah, yeah by "two available tiles" I meant both tile complication and entity state complication.
We actually have 2 tiles and 1 complication.
Both empty with no entities added.
I would definitely remove them if they are not being used
The logs look like you are filtering by homeassistant
and they are incomplete as a result. For example this points to an error but we don't really know what.
Linia 26980: 12-05 20:31:07.762 30960 32760 E WebSocketRepository: at io.homeassistant.companion.android.common.data.HomeAssistantApis$configureOkHttpClient$$inlined$-addNetworkInterceptor$1.intercept(OkHttpClient.kt:1080)
Pastebin wouldn't accept big file so there you go https://drive.google.com/file/d/1Fc8bnc6WVWEJTdTRB26XRACaIbjqvNBZ/view?usp=share_link
ok I can see the following error.
12-05 20:14:45.032 30960 318 E WebSocketRepository: Websocket: onFailure
12-05 20:14:45.032 30960 318 E WebSocketRepository: java.io.IOException: unexpected end of stream on http://192.168.1.111:8123/...
Interesting error, personally I would expect to see request timed out or something else but not an end of stream. Almost suggests like its able to talk but not really 🤔
It can't really talk to any HA server because now I'm not even on my home network and there's no device here on 192.168.1.111 that could respond somehow.
Here's log from the night. https://drive.google.com/file/d/1SeHhdoq5206Iqi7iHZYRXRR9rU8zge5W/view?usp=drivesdk No complications used this time at all, only battery sensors turned on. Home Assistant app battery usage went to 10.5% and battery was also used more than before so there should be something in this log.
I do not see any errors or attempt to communicate out. At this point we may need a developer who experiences this issue to take a closer look. I would also recommend fixing the issue with HA going down as it seems to put the server in a bad state which may also be the cause of the issue.
To add to this - since I've set up better HA server with cloudflare routing so my watch can access HA everytime and everywhere I haven't seen battery drain problem at all. I have all tiles enabled and even watchface complication that seems to be updating everytime I wake up the watch, the HA app stays below 1% of battery usage.
Im seeing a massive drain of battery from HA on my Fossil Gen 5. Watch last at max maybe 4 - 5 hours with HA consuming 38% of the battery. For me no issues with my instance not being reachable either
Im seeing a massive drain of battery from HA on my Fossil Gen 5. Watch last at max maybe 4 - 5 hours with HA consuming 38% of the battery. For me no issues with my instance not being reachable either
It would be helpful to know things like if you use tiles or complications and what sensors you enabled.
I also have problems of battery drain with HA on my Galaxy watch 5 pro, specially when I'm not @home.
I also have problems of battery drain with HA on my Galaxy watch 5 pro, specially when I'm not @home.
Is your instance remotely accessible?
Is your instance remotely accessible?
No, I only use it on the local network atm. Can it be set up to test connections only if I'm connected to my home network and sleep otherwise?
Cam confirm this issue still exists. My HA instance is not accessible remotely. As soon as I leave my home, the battery drain goes down very fast (in Homeoffice battery holds normal). I'm sure that HA is the issue. I don't have many apps installed and uninstalling home assistant solved it.
Just out of curiosity what do you expect to get out of the Wear OS app if your server is not remotely accessible? The app actually prefers to use the external URL as the app does not have any URL switching being done. Personally I went on a cruise and did not experience any crazy drain as mentioned here when my server could not be reached. Are you guys using tiles and complications that may request teh app to update its state when teh scree turns on?
Nope. Just the app installed. I can post my versions when I'm home. I'm working in making my instance accessible, but ATM it is not the case
Nope. Just the app installed. I can post my versions when I'm home. I'm working in making my instance accessible, but ATM it is not the case
so all you did was install the app and login? did you enable any sensors or anything?
yes, in the phone app i disabled most of the sensors. i don't know if i can manage sensors on the watch separately, if yes, i didn't change anything
Could the app check if it has more than 1 connection to the instance at the time and close not needed ones or timeout them automatically?
Home Assistant Android version: beta-2732-cabd41e6-full Android version: 12L Phone model: OnePlus 8Pro with Samsung Galaxy Watch 4 Classic Home Assistant version: 2022.9.5 Last working Home Assistant release (if known):
Description of problem: WearOS app rank top1 in battery usage even though my ha instance is offline. Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
Screenshot of problem: Provided later.
Additional information: