Closed hanzoh closed 3 years ago
What Android OS? 10? 9? 8? Does Fully have an option to disable falling asleep?
I am using browser_mod 1.1.6 with HA 0.116.2 and have a Galaxy Tab A as a wall-mounted dashboard, running LineageOS 17.1 (Android 10) with latest Fully Kiosk Browser and WebView.
Android 10, and Fully's 'Avoid sleep when display turned off' is enabled.
Maybe tied with #140
I checked the issue you have referenced, and did a downgrade to the stock Android 8.1 image. Unfortunately, the problem is the same.
I have checked my Unifi controller and it reports continuous WiFi connection of the tablet. When the entities are "Unavailable", I can still ping the tablet's IP. So can I assume that the tablet is not sleeping then?
No, it's sleeping, might still be connected to WiFi, but not Home Assistant.
I have the same issue, it seems the webview becomes inactive
Same issue for me as well. First I thought it had to do with the automatically close connection after 5 minutes but it doesn't help to turn that off, still the same issue.
I believe I have kind of nailed this one down - or at least found an imperfect workaround.
From what I can tell, FKB loses connection exactly five minutes after the screen has turned off, whether from a timeout or through browser_mod. The workaround I have found is to turn the screen on and off again every four and a half minutes. Obviously, this is not a perfect solution, as it will make your screen flash, so it will be opt-in via
browser_mod:
devices:
12345678-90abcdef:
force_stay_awake: true
Debugging timeout related things is really really really annoying, so I'll let my setup run over night (yet) again, and may release the fix tomorrow (CET) it it seems to work.
Don't know if this means anything, but I have automation to restart Fully Kiosk at 4 every night. I now notice that the tablet hasn't got unvendible until 5 min after the motion was triggered the first time. And that happens after every time I restart Fully Kiosk browser
1.2.1 has been released with the workaround.
After restarting but before motion trigger; does it react to commands like turning on the screen?
After restarting but before motion trigger; does it react to commands like turning on the screen?
Yes it is
This work around got my FKB to freeze while reloading when motion triggers the screen to light up
Just to be sure, did you guys disable the hass option to disconnect?
Just to be sure, did you guys disable the hass option to disconnect?
Yes, doesn’t help
@thomasloven I think I stumbled on a better work around, I found a library for creating wakelocks: https://github.com/richtr/NoSleep.js
This library does something different, but it inspired me.... I added this to FKB advanced web settings:
This essentially plays a silent mp3 audio file, this is just a test using some random mp3 file i found using google... Probably a smaller one could be used and looped...
It looks pretty good:
Could this be a good solution moving forward?
Second attempt:
var audio = new Audio('https://raw.githubusercontent.com/anars/blank-audio/master/45-seconds-of-silence.mp3');
audio.loop = true;
audio.play();
Going on 30 minutes and it is still reachable!
Note: second attempt was just to test if looping works as well, this allows us to have no time limit AND use a smaller mp3 file. I suspect that length of the mp3 file is a tradeoff between CPU usage and file size, but it is probably negligible as long as we're not looping 0.1 second mp3 files...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bump
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Looping an audio file will prevent the device from turning the screen off.
Try the new option to control the screensaver instead of the screen mentioned here: https://github.com/thomasloven/hass-browser_mod#my-fully-kiosk-browser-device-goes-unavailable-after-the-screen-has-been-turned-off-for-five-minutes
Hello. Bumping this since there are no new updates. I've tried both official workarounds (force_stay_awake and screensaver) none works. I have screen off disabled but screensaver is lighting up after 15 seconds of inactivity. If screensaver is left uninterrupted for 5 minutes, entities will become unavailable. I haven't tried using silent mp3 play loop and would like to avoid it if not necessary.
force_stay_awake doesn't seem to be working for me either
Anyone have found a good solution to this?
I use the fully kiosk api
I use the fully kiosk api
Can you explain more?
I use a tablet that runs fully kiosk browser. So the control I need for the tablet I get via the api of that browser instead of this addon.
I use a tablet that runs fully kiosk browser. So the control I need for the tablet I get via the api of that browser instead of this addon.
I use Fully Kiosk Browser as well, on my tablets, but I don't know how to achieve things with Fully, which are done with browser mod...
I use this to cancel toast notifications and to auto-reload lovelace if I do changes to the dashboard:
- service: browser_mod.lovelace_reload
- service: browser_mod.toast
data:
message: Lovelace Reloaded
duration: 1
Then, I use this to open the camera from my doorbell, when someone is ringing at the door, without opening other tab/page from HA:
- service: browser_mod.more_info
data:
entity_id: camera.camera_door_frigate
deviceID: ed1393d4-02cbd091
large: true
There is any way to do this only with fully?
And about fully browser, sometimes I need to restart the tablet because it won't refresh the dashboard... and if I do it manually, it won't load the page anymore...
Check the api docs on their website. Navigating and even rebooting tablet is possible.
Seems that Fully can't do what I use from Browser Mod :-(
Check the API docs on their website. Navigating and even rebooting the tablet is possible.
are you able to elaborate on this at all as myself and others may not be aware of what needs doing...thanks in advance
Second attempt:
var audio = new Audio('https://raw.githubusercontent.com/anars/blank-audio/master/45-seconds-of-silence.mp3'); audio.loop = true; audio.play();
Going on 30 minutes and it is still reachable!
Note: second attempt was just to test if looping works as well, this allows us to have no time limit AND use a smaller mp3 file. I suspect that length of the mp3 file is a tradeoff between CPU usage and file size, but it is probably negligible as long as we're not looping 0.1 second mp3 files...
After spending all day trying to find a solution for this, this code mentioned above works perfectly to solve the issue!
One important note that I was fighting with all afternoon that I didn't realize I had on, make sure "Consider Device in Use while Audio Playing" is not turned on in Other Settings. It's working great now!
Second attempt:
var audio = new Audio('https://raw.githubusercontent.com/anars/blank-audio/master/45-seconds-of-silence.mp3'); audio.loop = true; audio.play();
Going on 30 minutes and it is still reachable! Note: second attempt was just to test if looping works as well, this allows us to have no time limit AND use a smaller mp3 file. I suspect that length of the mp3 file is a tradeoff between CPU usage and file size, but it is probably negligible as long as we're not looping 0.1 second mp3 files...
After spending all day trying to find a solution for this, this code mentioned above works perfectly to solve the issue!
One important note that I was fighting with all afternoon that I didn't realize I had on, make sure "Consider Device in Use while Audio Playing" is not turned on in Other Settings. It's working great now!
Where does this code go?
I'm having the same issue with disconnects after 5 mins. Chromebox 3 running HA android companion app.
I believe you need to put this in your www
folder, then add a custom resource (frontend -> custom resources) using /local/[filepath].js
.
So there is no solution for this I understand, unless putting this code above in the "Advanced Web settings" ?
Something I do not understand is that when the screen if OFF, running an automation like the one below which is turning the screen ON then launching browser_mod.popup is NOT popping up the screen .... It does only if the tablet screen is already ON when the automation is launched ?!?
`- id: 4cf62087-4164-4685-be6d-2ede8401d5fa alias: Dahua VTO trigger:
Any updates on this without the cycling of audio?
I am using browser_mod 1.1.6 with HA 0.116.2 and have a Galaxy Tab A as a wall-mounted dashboard, running LineageOS 17.1 (Android 10) with latest Fully Kiosk Browser and WebView.
I have setup browser_mod like this:
As long as the tablet is showing HA, the entities are available (binary_sensor and light are "on"). After the 10s timeout defined in Fully Kiosk Browser to turn off the screen, the light is switching to off. In Android, I have disabled all screensavers and power saving settings, I have kept the screen timeout at 1min, as there is no option to disable it completely. When I move in front of the tablet, Fully Kiosk Browser's motion detection turns the screen back on and the light entity goes back to "on".
But when I haven't moved in front of the tablet for about 4min30s in front of the screen, all entities become unavailable.
I have already disabled this setting in the HA user settings:
Is there anything else I can configure to keep them available? Otherwise, I cannot interact with it in automations when the tablet's screen is off. My plan was to activate the screen when someone rings the doorbell and then show the front camera's more-info screen.