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.
@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.
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…”.
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.
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.
@Flole nothing new yet. Persistent connection in background when charging is planned as an option, but it is not in development yet.
Unfortunately when recovering from Daydream HomeHabit is still in some very weird state, the controls aren’t working when used the first time and I need to press them again (turning on a light the first time doesn’t work even though HomeHabit shows it as on, I need to turn it off and back on, then it actually goes on). Would be great if we could at least get that solved.