HomeHabit is not refreshing when Daydream is active


#1

I am using DayDream on my device as a screensaver and HomeHabit is permanently running as homescreen. A few months ago this was working fine, however now I can see that when I exit DayDream the data is old and it takes a few seconds until it is refreshed again. Also when I want to switch a light, the first time I try it it gets stuck in “Turning on” state (even though the light is being switched on), when I tap on it again it goes to “Off” (light is also being turned off) and tapping on it again it switches to “On” (and light goes on). My device is keeping wifi connectivity alive all the time, so this shouldn’t be any issue. Maybe there should be an option to keep HomeHabit alive either all the time, just when charging or never/just when in foreground.


#2

@Flole This behavior is expected since Android runs Daydream as a separate application, so this is no different from you switching to another app. HomeHabit does not keep connection while in background since there is usually no reason to do that for a dashboard app.
Adding optional connection in background is possible, but is easy to drain resources, so it is a delicate feature. Let me see what can be done.


#3

The best idea would probably be to have an option to select when HomeHabit should keep the connection alive in background: Always, Just when running on external Power, Never,

Also you could check if daydream is currently running and if it is, don’t drop the connection. Plenty of options available, this is very irritating as the first button press always gets stuck in “Turning on…” or “Turning off…”.


#4

That is definitely considered since there are other cases when having persistent connection is preferable.

Checking for current foreground app requires extra permissions, which is less than ideal and I’m trying to avoid that. It makes more sense when running HomeHabit as home app of course. So yeah, something to think about as well.


#5

Hi @igor,

is there anything new to this? I haven’t found an Option to do this yet and want to make sure this issue is not forgotten.


#6

@Flole nothing new yet. Persistent connection in background when charging is planned as an option, but it is not in development yet.