petro-kushchak / homebridge-homepod-radio

MIT License
39 stars 2 forks source link

Update from 2.0.9 to 3.0.x #40

Closed Matt-Eagle-Pi closed 1 day ago

Matt-Eagle-Pi commented 1 year ago

Hi @petro-kushchak!

I've tried the Update to every Version 3.0.x. After that, I can't activate any radio over HomeKit anymore. Do I have to reset all previous settings?

Greetings, Matt

PS: pyatv and node.js are up to date.

petro-kushchak commented 1 year ago

Hi, try to add switch accessories again. If it doesn't help - please share homebridge logs

Matt-Eagle-Pi commented 1 year ago

Hi @petro-kushchak. Now I tried it wie Version 3.0.0. The log Shows the error:

[18.10.2023, 21:07:06] [petro-kushchak/homebridge-homepod-radio] [JazzRadio Berlin ] Error while trying to stop: Error: Command failed: kill -9 11149 /bin/sh: 1: kill: No such process

I have the Same issues with the Audio Buttons...

For the moment, I will Switch back to Version 2.0.9.

By the way... HomePod Version is 17.0 (21J354)

Matt

petro-kushchak commented 1 year ago

In case if you still try 3.+ could you please enable verbose mode ("verbose": true in plugin config) and send logs again?

Most probably it's related to user/permissions which are used to access pyatv package from homebridge...

Matt-Eagle-Pi commented 1 year ago

Hi @petro-kushchak!

Maybe you are right. Here is the log:

[19.10.2023, 20:54:251 [petro-kushchak/homebridge-homepod-radio] [JazzRadio Berlin ] s treaming data: Traceback (most recent call last): File "/var/lib/homebridge/node "/var/lib/homebridge/node_modules/@petro-kushchak/homebridge-homepod-radio/dist/ stream.py", line 15, in from pyatv.interface import MediaMetadata ImportError: cannot import name 'MediaMetadata' from 'pyatv.interface' (/home/homebridg e/.local/lib/python3.7/site-packages/pyatv/interface py) [19.10.2023, 20:54:25] [petro-kushchak/homebridge-homepod-radio] [JazzRadio Berlin ] P layback heartbeat, source: streaming [19.10.2023, 20:54:251 [petro-kushchak/homebridge-homepod-radio] [JazzRadio Berlin ] s treaming exit: code 1 signal null [19.10.2023, 20:54:251 [petro-kushchak/homebridge-homepod-radio] [JazzRadio Berlin ] K illing process: streaming: 8751 [19.10.2023, 20:54:251 [petro-kushchak/homebridge-homepod-radio] [JazzRadio Berlin ] C leared hearbeat 19611 - stop requested [19.10.2023, 20:54:25] [petro-kushchak/homebridge-homepod-radio] [JazzRadio Berlin ]E

But did the permissions change?

petro-kushchak commented 1 year ago

It was reported by others as well, try to install pyatv from homebridge terminal - looks like somehow latest pyatv is not accessible for linux user which runs homebridge

Matt-Eagle-Pi commented 1 year ago

Thanks. I'll try it.

Matt-Eagle-Pi commented 1 year ago

Hi. Just installed pyatv via Homebridge-Terminal. Doesn't worked for me. Any hint?

image

petro-kushchak commented 1 year ago

Hi - try steps from this issue: https://github.com/petro-kushchak/homebridge-homepod-radio/issues/35#issuecomment-1481018025

Matt-Eagle-Pi commented 1 year ago

Hi.

Does't work for my installation. Now I installed pyatv with "sudo -H pip3 install pyatv" again. The same log as before. Homebridge is now installed under user pi and user homebridge.

I really miss the function to change music volume in Homekit but I will reinstall the version 2.0.13 for now. In this Version everthing works fine.

Nevertheless, thanks for your support so far!

Matt-Eagle-Pi commented 1 year ago

Update:

After installing everything again, the error is the same, as before:

image

I installed the Homebridge manually on a pi-debian to run zigbee2mqtt side by side on the same system.

Maybe you have another idea, I can check in my system...

Thanks, Matt

petro-kushchak commented 1 year ago

Hi, can you check which version of python3 you have? Now I remember that I had to upgrade python to 3.10 to be able to install proper version of pyatv...

petro-kushchak commented 1 year ago

Actually from screenshot I see that you have python 3.7, please upgrade to 3.9-3.10

Matt-Eagle-Pi commented 1 year ago

Hi. Thanks for the hint. Now I have installed Python 3.10.

image

But the Plugin still uses the Python 3.7 Installation:

image

How do I change this? Plugin reinstall?

Hopefully not...

petro-kushchak commented 1 year ago

I think you should change default version of python3 globally. One of the options:

sudo rm /usr/bin/python3
sudo ln -s /usr/bin/python3.10 /usr/bin/python3

Note: before running, check that /usr/bin/python3.10 exists (in my case its located in /usr/local/bin/python3.10) and that python3 is executed from /usr/bin/python3 (run which python3)

Matt-Eagle-Pi commented 1 year ago

Thanks. This works. Now the Error turned to this:

image

Now, every time I activate a Button or a Radio the Child Bridge stops working.

petro-kushchak commented 1 year ago

Check that link to python3 works properly, from error looks like python3 command doesn't work

Matt-Eagle-Pi commented 2 weeks ago

Hello Petro. I just updated my Raspberry to Raspbian Bookworm (64-bit) and installed your plugin in Version 3.0. The volume-switch is available and music-streaming works great.

But the button-playback doesn't work. Do you know about that?

Regards, Matt

petro-kushchak commented 2 weeks ago

Hi, can you attach some logs? Sounds like some configuration issue

Matt-Eagle-Pi commented 2 weeks ago

homebridge.log.txt Hi Petro. Here is the log. Pyatv is installed in a virtual-environment under homebridge. The permission of the media-path is set to 777. I hope you can find the issue. Thanks in advance!

Matt

petro-kushchak commented 1 week ago

hi @Matt-Eagle-Pi - from logs I see that it can not decode file:

[15.11.2024, 10:25:52] [@petro-kushchak/homebridge-homepod-radio] [Postbox] streaming data: raise DecodeError("failed to decode file", result) miniaudio.DecodeError: ('failed to decode file', -6)

maybe file which you are trying to stream somehow broken?

Matt-Eagle-Pi commented 1 week ago

Hi Petro. Ok... I wil try another....

Matt-Eagle-Pi commented 1 week ago

Hi. No, same error with another file...

If I start the playback manually, the following error accoured (see attachment). Maybe the source cannot be found...

homebridge.log.txt

petro-kushchak commented 1 week ago

looks like something wrong with command parameters, try:

atvremote --id <homepod-id> stream_file=/home/homebridge/media/mail.mp3

Matt-Eagle-Pi commented 1 week ago

Hi Petro. Thanks for the hint. It works in the app again. Thanks!