Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entities become "unavailable" after 5 minutes #452

Open
ihaettypo opened this issue Sep 24, 2022 · 37 comments
Open

Entities become "unavailable" after 5 minutes #452

ihaettypo opened this issue Sep 24, 2022 · 37 comments

Comments

@ihaettypo
Copy link

ihaettypo commented Sep 24, 2022

My Home Assistant version: 2022.9.6

This is almost the exactly same problem as metioned here: #145.

For me, they become unavailable right after browser visibility sensor being "hidden" for exact 5 min. I use the Fully-Kiosk browser and has disabled system sleep. And yes I have disabled the "Automatically close connection" in HA. And yes I've checked the router, the device is still connected to wifi.

The motion detection for Fully-Kiosk browser does work. The screen will wake up, just that the HA page would then say "disconnected xxxx" and will reconnect.

@andregoncalvespires
Copy link

I have the same problem, and to get it working again I need to close the app and open it again.

@T3chArmy
Copy link

T3chArmy commented Oct 9, 2022

Having the same issue on 2022.10.1.

@T3chArmy
Copy link

T3chArmy commented Oct 10, 2022

From #145 add this code below in Inject JavaScript under Advanced Web Settings:

Second attempt:

var audio = new Audio('https://raw.githubusercontent.com/anars/blank-audio/master/45-seconds-of-silence.mp3');
audio.loop = true;
audio.play();

image

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!

@jrbecart
Copy link

The problem with this is that anything playing in the media player will stop.

@KentuckyMC
Copy link

Got the same issue here. After 5 minutes everything becomes unavailable and my popups aren't generating anymore. Before in Browser Mod 1, the popups where generated even when the screen was off for longer time. Benefit here, was that if I walked by the tablet after say 30 minutes. The popup still shows (for example last ringer / trashcan pickups). I've set the Fully Kiosk Stay awake as well, no luck.

@stefanschaedeli
Copy link

Confirming the same issue

@ppurice
Copy link

ppurice commented Oct 27, 2022

Have a same problem !

@funzie19
Copy link

Same issue. Also using Fully Kiosk.

@shbatm
Copy link

shbatm commented Nov 13, 2022

FWIW: Changing this setting and restarting the browser seems to have fixed my issue (not FK, using HADesktop):
image

@KentuckyMC
Copy link

Got that one turned off already. no luck.
image

@stale
Copy link

stale bot commented Jan 15, 2023

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.

@stale stale bot added the stale label Jan 15, 2023
@funzie19
Copy link

Has anybody been successful with Fully Kiosk and this?

@stale stale bot removed the stale label Jan 15, 2023
@KentuckyMC
Copy link

Nope, still same issue. Before I could trigger a popup even when the screen of the tablet was off. So when I wasn't home, I could send a popup for example when I received a postmail. So when I came in, and walked by, the tablet showed me the popup. Not sure why this isn't working anymore.

@markmghali
Copy link

same issue with my Asus TF700 showing unavailable. I have to restart Home Assistant Companion App for it to work again.

@KentuckyMC
Copy link

I thought I had the solution yesterday. But unfortunately not working. I set the always on when powered in the developer tools on my Android device. It seems that the timeout worked for more minutes. After some triggering of the screen on/off, suddenly after 5 minutes the browser mod became unavailable again.

The weird part is, that my Fully Kiosk itself (with the official integration in HA) isn't losing any connection. That one always stayed on and there I trigger my screen on/off (not in Browser mod). Browser mod isn't really putting the screen off, but just black background, when I use that, it works as expected and the browser mod stays active. But I want to really put my screen off instead of black. It's weird, because of browser mod 1 worked fine with this method.

@stale
Copy link

stale bot commented Apr 7, 2023

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.

@stale stale bot added the stale label Apr 7, 2023
@miguelangel-nubla
Copy link

Still happening, not stale.

@stale stale bot removed the stale label Apr 7, 2023
@Bibouche
Copy link

Bibouche commented May 3, 2023

Same problem also here

@Matz88
Copy link

Matz88 commented Jul 12, 2023

Same here, all entities are getting unavailable after a while despite setting the connection to persistent. On the other side, popus still work fine

@KentuckyMC
Copy link

Same here, all entities are getting unavailable after a while despite setting the connection to persistent. On the other side, popus still work fine

Also popups when your screen is off and the entities are unavailable? I can't put a popup on the screen then.

@Matz88
Copy link

Matz88 commented Jul 12, 2023

no pupos at screen off, they appear then when I manually switch on the screen
But if teh screen is kept on, then the popus are not an issue

@KentuckyMC
Copy link

Saw lately some updates on other posts. Hopefully this one will get some love as well. I believe it´s an easy one to reproduce. Get a combination working with Fully Kiosk Browser. Set the screen off with the toggle in Fully Kiosk Browser and wait for 5 minutes. All entities become unavailable till you toggle it back on. Same behaviour on just setting the tablet itself (Lenovo Tab M10 here) on/off.

@stale
Copy link

stale bot commented Sep 16, 2023

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.

@stale stale bot added the stale label Sep 16, 2023
@KentuckyMC
Copy link

Got the workaround up with the on/off from the tablet.

So before I trigger the popup (when all entities are unavailable). I first use the fully kiosk browser switch to toggle on the screen. Then delay 2 seconds, put the popup up, and 2 seconds after dim the screen again.

@iamnikv
Copy link

iamnikv commented Sep 27, 2023

Got the workaround up with the on/off from the tablet.

So before I trigger the popup (when all entities are unavailable). I first use the fully kiosk browser switch to toggle on the screen. Then delay 2 seconds, put the popup up, and 2 seconds after dim the screen again.

I have the same issue. After some time the BrowserMod devices become unavailable. I used to use the kiosk browser device to toggle the screen, but it is not as fast as BrowserMod. If only BrowserMod worked..

@stale stale bot removed the stale label Sep 27, 2023
@KentuckyMC
Copy link

The weird thing is just that this worked all fine with the V1 from browser mod. So really don't know what is changed on this functionality.

@PablaV
Copy link

PablaV commented Nov 8, 2023

I was struggling with a similar issue where Browser Mod would become unavailable randomly on my Fire 10 wall tablets. What I found worked is not using the HA app but actually using a browser to access HA. Browser Mod still goes offline when the screen turns off but comes back up once it's woken up, waking the screen can be handled by Fully Kiosk.

@Scoff123
Copy link

I'm struggling to identify what is causing this on my Windows 10 Surface Pro 5 device, using Edge browser in full screen mode. It takes longer than 5 minutes to appear offline - it can go for several hours or so, before appearing offline. Set all the power saving settings to off in windows, no sleep, no screensaver, leaving the browser fully visible and the tablet on overnight, yet the browser mod entities all show as unavailable the next day. Using HASS.Agent in windows to send the surface stats like battery level to HA, and those stats remain available throughout, being sent via MQTT.

Does anyone know if the solution mentioned above: #452 (comment) is still an option? Where would this be added?

@PablaV
Copy link

PablaV commented Nov 21, 2023

Have you tried another browser?

@Scoff123
Copy link

I've tried both chrome and Firefox, however there are separate issues with both of those browsers in terms of my dashboard display - probably my older MS surface graphics drivers. Edge is the one browser that displays everything properly on my surface which is why I've stuck with it.

@PablaV
Copy link

PablaV commented Nov 21, 2023

Are you using Fully Kiosk? I had to tweak some settings to get things working consistently. If not then it may just be the fact your browser isn't supported or out of date

@Scoff123
Copy link

I can't use Fully Kiosk as it isn't available for Windows. I'm using the Windows Hass.Agent to get the battery level and various other sensors, and running Edge in Kiosk mode fullscreen. I might try some automations like playing audio every so often on the tablet to try to keep it 'alive' or refresh the browser every so often via a keypress automation for F5.

@pimpshiiiit
Copy link

Any updates?

@cedricdelecole
Copy link

cedricdelecole commented Feb 12, 2024

Hello There, I am posting here because I THINK I am having the same issue. I have a wall tablet with Fully Kiosk, and tablet's screen wakes up for 30 seconds after the front camera has detected a movement - that is ok.

I am using browser mod in the automation below so that when someone rings the door, the screen of the tablet goes OB, it plays a music, browser_mod pops up (or should ...) etc .... but for some reason, times to times the music is played but the browser_mod doesn't popup.
I have ma de severa tests, but I can not figure out 100% what the issue is ... is it only popping up when the screen is already ON ? +Is browser_mod not working when the screen is OFF ?
In ant case that is very annoying and I am not sure I can log what happens ?

`- id: 4cf62087-4164-4685-be6d-2ede8401d5fa
alias: Dahua VTO
trigger:

  • platform: event
    event_type: dahua_vto
    event_data:
    Code: BackKeyLight
    action:
  • choose:
    • conditions:
      • condition: template
        value_template: '{{ trigger.event.data.Data.State | int in [1, 2] }}'
        sequence:
      • service: persistent_notification.create
        data:
        title: '{{ ''Doorbell Ring'' if trigger.event.data.Data.State | int in [1,
        2] else ''Doorbell No Ring'' }}'
        message: '{{ trigger.event.data }}'
      • service: number.set_value
        data:
        value: '300'
        target:
        entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
      • type: turn_on
        device_id: 5ddf9cc8e6e73f9ee6a61282d8c96a62
        entity_id: 0b25a53f111b9dbc4efdf84501269ecf
        domain: switch
      • service: browser_mod.popup
        data:
        title: Caméra Extérieure
        dismissable: false
        content:
        camera_view: live
        type: picture-glance
        entities: []
        camera_image: camera.192_168_1_110
        timeout: 120000
        size: fullscreen
        browser_id:
        • Lenovo-tablette
          right_button: Raccrocher
          right_button_action:
          service: media_player.media_stop
          data:
          entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
          left_button: Laisser vidéo 5m
          left_button_action:
          service: browser_mod.sequence
          data:
          sequence:
          • service: browser_mod.popup
            data:
            title: Caméra Extérieure
            dismissable: true
            content:
            camera_view: live
            type: picture-glance
            entities: []
            camera_image: camera.192_168_1_110
            timeout: 300000
            size: fullscreen
            browser_id:
            • Lenovo-tablette
          • service: media_player.media_stop
            data:
            entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
      • service: media_player.play_media
        target:
        entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
        data:
        media_content_type: music
        media_content_id: http://xxxx:8213/local/Lili25.mp3
      • delay:
        hours: 0
        minutes: 5
        seconds: 0
        milliseconds: 0
      • service: number.set_value
        data:
        value: '30'
        target:
        entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
        mode: restart`

If someone can please confirm he has the same issue ?

@cedricdelecole
Copy link

What I do not get is that from my automation, I am switching the screen ON before launching the browser_mod.popup, but STILL it doesn't popup ?!? Why ?!?

If I wake up the tablet screen using the from camera "Enable Visual Motion Detection" in FKB, then the screen is ON and If I launch the automation, the browser_mod pop's up ....

I really do not understand

@Scoff123
Copy link

Scoff123 commented Mar 8, 2024

Strangely, my tablet has been working fine with browser_mod for a couple of months since my post further up. It just started staying 'available' through HA reboots, updates etc. Then probably a couple of HA Core updates ago, it started going 'unavailable' again frequently. I've tried deleting and registering the device in browser_mod a few times, but I can't get it to stay available for more than a day before it becomes unavailable again.

@pmharris77
Copy link

2 years on and still not fixed? I'm having this exact issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests