music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.4k stars 51 forks source link

Doesn't work Music Assistant addon on Raspberry Pi 4 rpi4-64 Argon One #1144

Closed andrewigali closed 1 year ago

andrewigali commented 1 year ago

What version of Music Assistant has the issue?

2.0.0b5

The problem

I tried but doesn't work. :(

Raspberry Pi 4 rpi4-64 Argon One Home Assistant 2023.1.7 Supervisor 2023.03.1 Operating System 9.5 Frontend 20230110.0 - latest

When i installed the Music Assistant Add-on, clicked the Start button, but not changed on Runing and green color point, it is still red color. I can't use Music Assistant.

How to reproduce

  1. Deleted old (HACS) Music Assistant on Settings/ Devices & Services/ Integrations.
  2. Deleted source on HACS.
  3. Restarted Home Assistant.
  4. Added this link: https://github.com/music-assistant/home-assistant-addon
  5. Refreshed site.
  6. Searched and installed Music Assistant Beta (2.0.0b5) on Add-ons .
  7. Clicked the Start button, but not changed on Runing and green color point, it is still red color.
  8. Checked the Music Assistant Log.

Relevant log output

2023-03-14 21:50:16 INFO music_assistant -- Starting Music Assistant Server (a473959f8ad94c0e82xxxxxxxxxxaad8) on port: 8095 - autodetected IP-address: 192.xxx.x.xxx 2023-03-14 21:50:17 INFO music_assistant.streams -- Started stream controller (using ffmpeg version 4.3.5 with libsoxr support) 2023-03-14 21:50:49 INFO music_assistant -- Loaded metadata provider MusicBrainz Metadata provider 2023-03-14 21:50:49 INFO music_assistant -- Loaded plugin provider Frontend 2023-03-14 21:50:49 INFO music_assistant -- Loaded metadata provider TheAudioDB Metadata provider 2023-03-14 21:50:49 INFO music_assistant -- Loaded player provider Chromecast 2023-03-14 21:50:49 INFO music_assistant -- Loaded music provider URL 2023-03-14 21:50:49 INFO music_assistant -- Loaded player provider UPnP/DLNA Player provider 2023-03-14 21:50:49 INFO music_assistant -- Loaded player provider SONOS 2023-03-14 21:50:49 INFO music_assistant.metadata -- Start scan for missing artist metadata 2023-03-14 21:50:49 INFO music_assistant.metadata -- Finished scan for missing artist metadata 2023-03-14 21:50:49 INFO music_assistant.providers.slimproto -- Starting SLIMProto server on port 3483 2023-03-14 21:50:49 INFO music_assistant -- Loaded player provider Slimproto 2023-03-14 21:50:49 INFO music_assistant -- Loaded plugin provider JSON-RPC API 2023-03-14 21:50:49 INFO music_assistant -- Loaded metadata provider fanart.tv Metadata provider 2023-03-14 21:50:49 INFO music_assistant -- Loaded player provider Airplay 2023-03-14 21:50:50 INFO music_assistant.players -- Player registered: exxxxxxa-f6f3-a42e-c27a-1xxxxxxxxxx8/Kitchen speaker 2023-03-14 21:50:50 INFO music_assistant.players -- Player registered: 3xxxxxxd-3184-47eb-a1a6-3xxxxxxxxxx8/All speakers 2023-03-14 21:50:59 INFO music_assistant.players -- Player registered: 5xxxxxxc-dbba-6069-2b1b-2xxxxxxxxxxa/Bathroom speaker 2023-03-14 21:51:36 INFO music_assistant.players -- Player registered: 4xxxxxx6-8ace-0913-4623-cxxxxxxxxxxd/Bedroom speaker

Additional information

No response

What version of Home Assistant Core are your running

2023.1.7

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Raspberry Pi

OzGav commented 1 year ago

The log seems to indicate it starts so it is unusual. Can you post some of the screen captures you did before so we can see what you see? I notice you aren’t running the latest version of HA. Would you be happy to upgrade to see if that fixes anything? If you want to stay on your version of HA then you could go back to MA V1

andrewigali commented 1 year ago

The log seems to indicate it starts so it is unusual. Can you post some of the screen captures you did before so we can see what you see? I notice you aren’t running the latest version of HA. Would you be happy to upgrade to see if that fixes anything? If you want to stay on your version of HA then you could go back to MA V1

When I wrote earlier, I tested HAOS 2023.3.3, Supervisor 2023.03.1, Music Assistant was 2.0.0b4. Then these messages were: IMG_20230314_075003 Screenshot_2023-03-14-10-54-25-884_io homeassistant companion android Screenshot_2023-03-14-10-54-37-971_io homeassistant companion android IMG_20230314_110613

I later read that the HACS version Music Assistant no longer works for HAOS 2023.3.3 and later versions, so I restored a previous save, HAOS 2023.1.7. Before the update, the Music Assistant worked fine, since I updated it to HAOS 2023.3.3, it has not worked since then, and it is useless to update it to HAOS 2023.1.7.

I currently have HAOS 2023.1.7 Music Assistant 2.0.0b5 up, according to the log it's fine, in fact it's like the Addon hasn't even been started. 2023-03-14_22h43_12 2023-03-14_22h43_22

I am completely at a loss.

marcelveldt commented 1 year ago

It appears to be crashing. Do you have a minimum of 2gb of memory ?

marcelveldt commented 1 year ago

Also look if the rest of your system is not consuming all memory, this looks an awful lot like OOM (out of memory) issues

andrewigali commented 1 year ago

It appears to be crashing. Do you have a minimum of 2gb of memory ?

Total memory: 4Gb

2023-03-14_23h23_51 2023-03-14_23h24_10

marcelveldt commented 1 year ago

ok thanks, strange! it appears to be crashing right after it had connection issues to 2 cast players, maybe that is related but i doubt it.

Is there anything in the supervisor log right after it crashed ? HA settings --> System --. Logs --> select Supervisor in the top right

andrewigali commented 1 year ago

Previously, the HACS version Music Assistant worked well under HAOS 2023.1.7. Since I updated to HAOS 2023.3.3, it hasn't worked since then. Even though I went back to HAOS 2023.1.7, it didn't work anymore. Since I opened this issue, the HACS version is not up.

I just deleted the Music Assistant Addon, reinstalled it and saw something strange. Did it show as if it was active, like it was running/or there was an update? Not really. Please look at the pictures.

Screenshot_2023-03-14-23-49-28-466_io homeassistant companion android Screenshot_2023-03-14-23-49-48-261_io homeassistant companion android Screenshot_2023-03-14-23-50-07-057_io homeassistant companion android Screenshot_2023-03-14-23-55-19-099_io homeassistant companion android

I checked HA settings --> System --. Logs --> select Supervisor but no error referring to Music Assistant. I waited for about 15 minutes.

OzGav commented 1 year ago

It looks like it is has installed correctly. You are also installing the latest which is good. But do you still have the issue that when you click on start it initially looks good but then just stops?

andrewigali commented 1 year ago

After installation, when I press the Start button, it charges for 1-2 seconds, but still does not switch to Running. If I then press the Start button, the 1-2 seconds loading time is no longer there. Never switched to Running. There are also no new audio devices among the entities.

andrewigali commented 1 year ago

Updated Music Assistant 2.0.0b6 but same problem. Please check the video .

OzGav commented 1 year ago

Thanks. I don’t have much more at the moment but try turning on the watchdog and see what happens when you try and start it then. I also have found that after I have started sometimes I need to refresh my browser for the correct indications to be shown.

andrewigali commented 1 year ago

I am very sad that there is no way I will be able to upgrade to the new version. Therefore, I would rather return to the old HACS version, I installed it again from HACS, but when I add it in the Settings/ Devices & Services menu, I get an error. Error Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble.

Screenshot_2023-03-15-17-18-36-808_io homeassistant companion android

There is no way to solve it? Is there any way to make it work somehow? I am still using HAOS 2023.1.7 . My previous backup (HAOS 2023.1.7) includes the HACS version of Music Assistant, but it no longer works with that either. It doesn't work since updating from HAOS 2023.1.7 to HAOS 2023.3.3, and I'm reloading HAOS 2023.1.7 to no avail. :(

OzGav commented 1 year ago

Yes sorry this isn’t working for you at the moment. Did turning on the watchdog make any difference?

Your situation is unusual as there are hundreds of people using V2 without this problem. Is there anything different about your setup?

Are you installing HAOS as per the first instructions here https://www.home-assistant.io/installation/raspberrypi/ (That is not container, not supervised, just the regular HA operating system on an SD card in a regular Raspberry Pi (I see you refer to Argon One but I think that is just the case isn’t it?)

Have you a normal network setup? That is, a single subnet where you access your HA instance with HTTP not HTTPS.

If you have another SD card try installing a fresh version of HA and just add the MA add on and see if that works.

andrewigali commented 1 year ago

I use an M.2 SSD and unfortunately there is only one, no extras. As far as I know, I'm using Raspberry HAOS. I access HA from two addresses, https://xxx.xxx.x.xxx:8123 (my fixed HA IP) and https://myduckdns.org:8123

Do you think Music Assistant v2 should work with the latest HA now?

Can you make an instructional/ tutorial video on how to properly remove the HACS version, how to install the new version, start it, and if it starts properly, what is the addon's icon, where, what entities appear, what options will there be when creating call service automation?

I think it would be a great help to many of us.

OzGav commented 1 year ago

Let me ask the devs whether that internal https is a problem. People have had issues with V1 in the past….

OzGav commented 1 year ago

Ok at the moment the thinking is that https is not the issue but we will continue to investigate.

The video is a good idea but unfortunately I am away from home at the moment. Let me step through your comments though.

If you don’t see MA listed in the HACS integrations then you have successfully removed it. People who had issues had problems removing the integration from HA SETTINGS.

In theory restoring a backup should allow you to install MA V1 but at least one other person has reported the same problem as you. We are stuck unfortunately as this is a HA issue which we can’t solve other than by moving forward and getting V2 up and running for all.

Installing the new version I think you are doing correctly. You just need to add the new repository to the add on store and then install the version with BETA in its name.

Currently there is NO integration for HA that works with V2. That is coming in a week or two. That means no icon, no entities and no automations. What you install is the MA server which currently works standalone and will play your music.

Can you go to SETTINGS >> ABOUT and post the four lines of info from the top.

andrewigali commented 1 year ago

Ok at the moment the thinking is that https is not the issue but we will continue to investigate.

The video is a good idea but unfortunately I am away from home at the moment. Let me step through your comments though.

If you don’t see MA listed in the HACS integrations then you have successfully removed it. People who had issues had problems removing the integration from HA SETTINGS.

In theory restoring a backup should allow you to install MA V1 but at least one other person has reported the same problem as you. We are stuck unfortunately as this is a HA issue which we can’t solve other than by moving forward and getting V2 up and running for all.

Installing the new version I think you are doing correctly. You just need to add the new repository to the add on store and then install the version with BETA in its name.

Currently there is NO integration for HA that works with V2. That is coming in a week or two. That means no icon, no entities and no automations. What you install is the MA server which currently works standalone and will play your music.

Can you go to SETTINGS >> ABOUT and post the four lines of info from the top.

I'm currently using this because I'm hoping to still be able to use MA v1 somehow, until MA v2 is stabilized I wouldn't necessarily update the system. Unfortunately, the HACS version MA v1 does not work at the moment, even if I restore it from the backup. :( Could it be that the root of the source/repo is blocked and that's why I can't use it?

Screenshot_2023-03-16-15-57-36-517_io homeassistant companion android Screenshot_2023-03-16-15-57-57-966_io homeassistant companion android Screenshot_2023-03-16-16-02-15-992_io homeassistant companion android Screenshot_2023-03-16-16-04-11-389_io homeassistant companion android Screenshot_2023-03-16-16-05-23-459_io homeassistant companion android

marcelveldt commented 1 year ago

You have restored your HA instance to 2023.1.x and not 2023.2.x. Solution here is either go to one version up to HA 2023.2 or check the versions of Music Assistant within HACS, somewhere tucked away it lets you choose a version and you can select the 2023.1 version of MA there

andrewigali commented 1 year ago

You have restored your HA instance to 2023.1.x and not 2023.2.x. Solution here is either go to one version up to HA 2023.2 or check the versions of Music Assistant within HACS, somewhere tucked away it lets you choose a version and you can select the 2023.1 version of MA there

Yes, HA 2023.1.7, because I have the last backup. I never had HA 2023.2.x because I skipped them. On HA 2023.1.7, the last installable version of HACS MA is 2022.12.1 After that, there is already MA 2023.2.x, but it also indicates that I cannot install it (due to the HA version).

OzGav commented 1 year ago

You can upgrade HA to a specific version as follows https://community.home-assistant.io/t/how-to-install-hassio-specific-version-includes-downgrade/54954/22

so you can try HA 2023.2.x Available versions are https://www.home-assistant.io/blog/2023/02/01/release-20232/

andrewigali commented 1 year ago

You can upgrade HA to a specific version as follows https://community.home-assistant.io/t/how-to-install-hassio-specific-version-includes-downgrade/54954/22

so you can try HA 2023.2.x Available versions are https://www.home-assistant.io/blog/2023/02/01/release-20232/

Thanks, but the Raspberry 4 Argon One M.2 only has the HA system. Can you share a video on how can I manually update for example to HA 2023.2.x version (so not the latest version)? I have never done this before, so far when I updated, I always updated to the latest version offered by HA.

andrewigali commented 1 year ago

Something else is causing my problem. Unfortunately, by accident, but I also experience the same error with another extension. I stopped a previously installed and running extension, and when I want to start it again, according to the log, it starts, but for some reason it doesn't, and the extension icon is still gray and there is a Start button. Unfortunately, I don't know what the source of the error could be, I can't figure out how to fix it. I don't want to start with a completely clean HA system, because I already have a lot of work in it, on the dashboard, and I have a lot of automation. I think that if I perform a clean installation and then restore the previous full backup (snapshot) then the error will still be present. It's like my HA system crashed. :(

infotechjrf commented 1 year ago

@andrewigali ; You should consider performing a clean installation in order to get everything running smoothly with ease.

On my end, I was running my HA from a Proxmox Guest VM and reverted my whole HA setup to 2023.2 (using a Weekly Screenshot Backup) in order to uninstall Music Assistant V1 and then upgraded HA to 2023.3 then installed Music Assistant V2 using the "Add-on" method.

HA backups are the way to go!

andrewigali commented 1 year ago

Oh my God!

I found the mistake! I almost did a clean installation, but I thought I would not only turn off the power, but also shut down the machine within the HA system. Then, as a last test, I turned on the Raspberry Pi4 again, and miraculously, the system was restored. At the moment, HAOS 2023.1.7 HACS version Music Assistant v1 is disabled, MA extension v2 is installed and it started without any problems. I added my Spotify account in the WebUI interface. For several days, lots of HA reboots, backup reloads were all unnecessary. The system was stuck for some reason, crashed. Solution: The machine must be turned off and then turned on again.

Now how does MA v2 work, I would like to know what options there are regarding MA in the creation of HA automation?

OzGav commented 1 year ago

Firstly, glad you have it working.

Secondly, I supplied a link that shows how to upgrade or downgrade to a specific HA version. Please refer to that if you need to do so in the future.

Lastly, the HA integration that will allow MA V2 to interact with HA is still a week or two away. So you can enjoy your music on MA and keep an eye on the updates for future capability enhancements.