LAB02-Research / HASS.Agent

Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
https://hassagent.lab02-research.org
MIT License
1.56k stars 68 forks source link

Bug: Media player service won't start #351

Open Bajkot opened 1 year ago

Bajkot commented 1 year ago

Hi there!

Can't start mediaplayer. Enabling such option in hass.agent. After program restart, it seems that mediaplayer option is disabled. Logs included. Any suggestions? [2023-09-10] HASS.Agent_20230910.log

Krispkiwi commented 1 year ago

One thing I noticed is the name of your device in hass agent and the name of the media player have to match. I had my device named as desktop whereas the media player was saying windowsdesktop. It's only after changing my device name to windowsdesktop did it start picking up media.

amadeo-alex commented 1 year ago

Hello,

Please use the "Bug" template when reporting issues, this includes information like OS and other things.

In the logs you've provided following can be seen:

2023-09-10 22:47:26.231 +03:00 [ERR] [MEDIA] Unable to initialize, your OS doesn't seem to be supported or isn't fully updated:
The type initializer for 'WinRT.ActivationFactory`1' threw an exception.

This is checked here: https://github.com/LAB02-Research/HASS.Agent/blob/08310c474780107f63053cf02ce52f80e49408cb/src/HASS.Agent/Media/MediaManager.cs#L50C12-L63C14

More information will be required to approach this issue.

Bajkot commented 1 year ago

It doesn't create mqtt media_player topic even. What can cause that? Maybe some rights should be granted to hass.agent?