pssc / ha-addon-squeezelite

Squeezelite Player Addon for Home Assistant, for use with a Logitech Media Server
GNU General Public License v3.0
8 stars 0 forks source link

Resampling #4

Closed Member-12 closed 9 months ago

Member-12 commented 1 year ago

Resampling and other features (related to SOX library?) don't work:

INFO: nice -n -5 squeezelite -M SqueezeLite-HA-Addon -N /data/name -m d3:dc:e6:86:af:01 -d all=info -r 384000 -u hMX Option error: -u

Please add full functionality described in the squeezelite documentation.

pssc commented 1 year ago

So the default pulse audio build for squeezelite doesn't include resample there may be a reason for this... so it will need some testing before full release. I will do a test build then and push to the next branch, @Member-12 could you then pull the addon locally and install that one to test (via the shell addon). I will give you the heads up after a successful test tomorrow of my build.

Member-12 commented 1 year ago

Yes, of course I can test it locally. I just don't know if I can handle the local installation of the add-on. But if you give me hints, I'll try to do it.

pssc commented 1 year ago

@Member-12 Ok Commit b6a443e2e1e23b5dbaa631e9603ec5c2e78a79de ready for testing

this adds resampling to the build it seems at least to play normally on my test system

save your config details uninstall addon

cd /addons/
git clone https://github.com/pssc/ha-addon-squeezelite.git -b next

Go to addons refresh repos Install local version from interface.

Member-12 commented 1 year ago

I don't know if I'm doing something wrong, but after git clone... I can't see any new version in the addon repo. There is only 0.12 - the old one. In .../hassio/addons/ha-addon-squeezelite/ there are two directories /squeezelite1/ - with version 0,14 (in config.json) and /squeezelite/ - with version 0.15.

pssc commented 1 year ago

so that sounds about right it if your in the terminal addon it will need to be in /addons/ha-addon-squeezelite and you will need to go check for updates in the additional options in the addon store.

Member-12 commented 1 year ago

There is nothing new after check for updates. As far as I know, there should appear new menu: local addons, but there isn't.

pssc commented 1 year ago

It should indeed check in your supervisor log, I just tired it only showed up after a few mins and a full browser refresh...

Member-12 commented 1 year ago

Logs:

2023-01-08 02:06:07.288 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SlimProto Player for slimproto Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/slimproto/init.py", line 19, in async_setup_entry await slimserver.start() File "/usr/local/lib/python3.10/site-packages/aioslimproto/server.py", line 56, in start await asyncio.start_server(self._create_client, "0.0.0.0", self.port), File "/usr/local/lib/python3.10/asyncio/streams.py", line 84, in start_server return await loop.create_server(factory, host, port, **kwds) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1505, in create_server raise OSError(err.errno, 'error while attempting ' OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 3483): address in use

pssc commented 1 year ago

You have squeezeplay running elsewhere in the system check the non local one is not running

Member-12 commented 1 year ago

Yes you are right. I had squeezelite installed directly on the system before, but service was stopped. I just uninstalled it completely to be sure. And now I have another error:

23-01-08 03:31:46 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 138, in system_validation return await handler(request) File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 204, in token_validation return await handler(request) File "/usr/src/supervisor/supervisor/api/utils.py", line 62, in wrap_api answer = await method(api, *args, **kwargs) File "/usr/src/supervisor/supervisor/api/store.py", line 178, in store_info ATTR_ADDONS: [ File "/usr/src/supervisor/supervisor/api/store.py", line 179, in self._generate_addon_information(self.sys_addons.store[addon]) File "/usr/src/supervisor/supervisor/api/store.py", line 114, in _generate_addon_information ATTR_ADVANCED: addon.advanced, File "/usr/src/supervisor/supervisor/addons/model.py", line 221, in advanced return self.data[ATTR_ADVANCED] File "/usr/src/supervisor/supervisor/store/addon.py", line 19, in data return self.sys_store.data.addons[self.slug] KeyError: 'a0d7b954_grocy'

pssc commented 1 year ago

Ha thats not me -) plugin is a0d7b954_grocy', you can probably ignore it for the proposes of this testing

On Sun, 8 Jan 2023 at 02:37, Member-12 @.***> wrote:

Yes you are right. I had squeezelite installed directly on the system before, but service was stopped. I just uninstalled it completely to be sure. And now I have another error:

23-01-08 03:31:46 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 138, in system_validation return await handler(request) File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 204, in token_validation return await handler(request) File "/usr/src/supervisor/supervisor/api/utils.py", line 62, in wrap_api answer = await method(api, *args, **kwargs) File "/usr/src/supervisor/supervisor/api/store.py", line 178, in store_info ATTR_ADDONS: [ File "/usr/src/supervisor/supervisor/api/store.py", line 179, in self._generate_addon_information(self.sys_addons.store[addon]) File "/usr/src/supervisor/supervisor/api/store.py", line 114, in _generate_addon_information ATTR_ADVANCED: addon.advanced, File "/usr/src/supervisor/supervisor/addons/model.py", line 221, in advanced return self.data[ATTR_ADVANCED] File "/usr/src/supervisor/supervisor/store/addon.py", line 19, in data return self.sys_store.data.addons[self.slug] KeyError: 'a0d7b954_grocy'

— Reply to this email directly, view it on GitHub https://github.com/pssc/ha-addon-squeezelite/issues/4#issuecomment-1374691562, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANORYO5HVXDTQFAJWVEYSDWRIR73ANCNFSM6AAAAAATSQDHSY . You are receiving this because you were assigned.Message ID: @.***>

-- I Can Resist Everything Except Temptation -- Oscar Wilde

Member-12 commented 1 year ago

So, in that situation I don't know what to do. There is no any other errors in log and still not any new version in addons page. It's a pity that I can't test.

Member-12 commented 1 year ago

I found the problem. Local addon should be installed in /addons/local/

cd /addons/local/

And now addon appear in the addons list at Local addons menu.

Member-12 commented 1 year ago

There is another problem. I previously uninstalled the LMS addon. Now after reinstalling it, I get aa error message that another LMS instance is running. Ports 3483 and 9090 are opened by python3. It looks like the LMS was uninstalled incorrectly. Do you have any idea what do do?

Member-12 commented 1 year ago

Situation under control. I could do the tests. So...

  1. Upsampling unsupported configuration error does not occur in logs
  2. Unfortunately, after entering any options related to sound processing, there are huge distortions and breaks.
  3. Playback speeds up and slows down - the music can skip forward a minute and go back for several seconds - all the time.
  4. There is no error in log. If you need a more detailed log level let me know.
pssc commented 1 year ago

hmm guess the pulse build and the resampling are no the way to go, if you select the alsa build and the PA output with resampling does that work

Member-12 commented 1 year ago

PA: no sound, error in log: -u (upsampling) ALSA: no errors, normal sound without upsampling (44,1 on DAC display) PULSE: no log errors, strange sound, jumps forward and back on music, no upsampling

pssc commented 1 year ago

I can help but feel the pulse audio system is getting in on this party and ruining it, I usss the well trod route is direct H/W and alsa with up sampling

Member-12 commented 1 year ago

I think I'm going to give up on this solution. I installed squeezelite independently in docker - works great. I just had to overcome the haasio_audio issue that was blocking access to audio resources. Maybe this was also a problem in the operation of the squeezelite plugin in HA. Thank you for your time and solving my problems :-)

pssc commented 1 year ago

So I think you can do exactly the same thin in the addon select the oss build then the output device that isn't the pulse audio one, That should be exactly the same thing as your have in that docker image then

Phill.

On Wed, 11 Jan 2023 at 23:07, Leo @.***> wrote:

I think I'm going to give up on this solution. I installed squeezelite independently in docker - works great. I just had to overcome the haasio_audio issue that was blocking access to audio resources. Maybe this was also a problem in the operation of the squeezelite plugin in HA. Thank you for your time and solving my problems :-)

— Reply to this email directly, view it on GitHub https://github.com/pssc/ha-addon-squeezelite/issues/4#issuecomment-1379596728, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANORYKNALIYYRC634QZF6TWR44L5ANCNFSM6AAAAAATSQDHSY . You are receiving this because you were assigned.Message ID: @.***>

-- I Can Resist Everything Except Temptation -- Oscar Wilde