#HASS Agent keeps shutting down

1 messages · Page 1 of 1 (latest)

cursive cave
#

I'm using HASS with MPC-HC to be able to trigger my lights when a movie starts and stops. I have everything working great, except that HASS will not stay running for some reason. It shuts down about an hour after I start it and my HTPC runs 24/7 with no sleep. I have MadVR running 24/7 and it has never shut down on its own. I'm on Windows 10 and have tried just about every version of HASS, including the latest version. Does anyone know what would cause HASS to keep shutting down on its own?

full dome
cursive cave
full dome
# cursive cave

ah right so hass agent is falling over. but the HA server itself is running fine?

cursive cave
full dome
#

are you massivly attached to using MPC-HC? or would you be happy to use something else?

cursive cave
#

I use MadVR with my projector, and MPC-HC is the player that works best with MadVR.

#

BTW, this problem just started the past few weeks. It wasn't shutting down on its own for the first few months I had it set up.

#

My end goal is to have the lights turn off when I press Play, and turn on with Pause or Stop.

full dome
#

gotcha, hass agent isnt the most updated and supporting thing. i do use it myself without issue but its not always been that way.i was just wondering if using a media player thats easier to integrate directly with HA might be better

#

i have no idea what MadVR is or how it works though

#

is there anything in the hass agent logs? you can enable "extended logging" in the settings too

#

thats probably where to start, i would suggest the hass agent repo issues but given its unmained these days thats probably not a winner either.

#

is the hass agent app itself closing or is it the service dieing?

#

just shooting ideas really

#

HASS Agent keeps shutting down

cursive cave
#

I can post the log if it's okay. It's pretty long

full dome
#

is there anythning relivent in it?

#

look for warnings/errors or whatever. anything to imply why it dies

cursive cave
#

2025-04-25 14:59:57.832 -04:00 [INF] [MQTT] Initial registration completed
2025-04-25 15:16:42.288 -04:00 [FTL] [HASS_API] Error while fetching HA config: Cannot access a disposed object.
Object name: 'System.Net.Http.HttpClient'.
2025-04-25 15:16:45.557 -04:00 [INF] [HASS_API] Server recovered from failed state
2025-04-25 15:24:51.775 -04:00 [INF] [SYSTEM] Application shutting down
2025-04-25 15:24:51.800 -04:00 [INF] [MQTT] Disconnected
2025-04-25 15:24:51.834 -04:00 [INF] [SYSTEM] Application shutdown complete

cursive cave
full dome
#

but when you relaunch it, it then works again for a while?

#

is everything on wired connection? could be wireless packet loss shananigans

#

you could wrap hass agent in a script that restarts it on close i guess. its not pretty but for most pratical purposes might work?

cursive cave
#

Yes, when I relaunch it, it works for a little bit but then eventually shuts down. Everything is wired.

full dome
#

System.Net.Http.HttpClient is a .net framework thing right?

#

the github repo says you should have v4.8 installed can can be gotten here not all .net is totally cross compatable so maybe installing that version may help compatability

cursive cave
#

I get this message when I try to install 4.8

#

Look at all the AppCrash there are.

full dome
#

looks like something in your windows setup just doesn't like hass agent. its bound to happen sometimes with an unmaintained and unsupported application

cursive cave
#

I can't imagine what changed. I have Windows updates turned off, and the first few months I used HASS, it worked fine and never crashed.

cursive cave
#

Just for shits and giggles, I'm going to try HASS on my other PC in my house.