Coder Social home page Coder Social logo

Comments (19)

mgustavss avatar mgustavss commented on July 19, 2024 1

Thank you. There are a ton of different linkplay devices so I imagine it's hard to get things working everywhere.

I have also had issues when joining/unjoining speakers. Will try to track those bugs down and submit a pull request when I have more time.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

What music source do you play, and what card do you use to display in Lovelace?

from home-assistant-custom-components-linkplay.

borgswen avatar borgswen commented on July 19, 2024

I am using the standard Lovelace card and i have tried the mini media player card, but it didn't make a difference. I am listening to music through Spotify, but I have tried TuneIn, and that didn't work either.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Well this is more or less intended to control playback of contents initiated through HA.

It's a weirdness of Lovelace, as it tries to combine pause and stop functionality in the same button. For min-media-plyer it can be overridden in Lovelace config:

    hide:
      play_pause: true
      play_stop: false

from home-assistant-custom-components-linkplay.

borgswen avatar borgswen commented on July 19, 2024

Aha, hmmm what I was trying to accomplish is that my stereo amplifier turns on when I start using the audiocast device, but as the state doesn't update I think I'll have to find an other way. Thanks tho.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Well what I have for that is

- alias: 'Amp on'
  trigger:
    platform: template
    value_template: "{% if is_state('media_player.room1', 'playing') %}True{% endif %}"
  action:
    - service: switch.turn_on
      entity_id: switch.amp

from home-assistant-custom-components-linkplay.

mgustavss avatar mgustavss commented on July 19, 2024

I think the issue is due to the following lines of code in media_player.py:

    def media_pause(self):
        """Send pause command."""
        if not self._slave_mode:
            if self._playing_stream:
                # Pausing a live stream will cause a buffer overrun in hardware. Stop is the correct procedure in this case.
                # If the stream is configured as an input source, when pressing Play after this, it will be started again (using self._prev_source).
                self.media_stop()
                return

When you play a stream like Spotify Connect or TuneIn, the media player pause command is converted to a stop command. This doesn't work well with the Lovelace media players.

To get my Audio Pro setup to work I just commented out the "if self._playing_stream" block. @nagyrobi , could you elaborate on why you added it? It wasn't there on the old linkplay component and I never saw any issues with buffer overruns..

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Try to pause a live stream (like a TuneIn or other live radio) for a longer period, like 10 minutes or so, and see what happens.

from home-assistant-custom-components-linkplay.

borgswen avatar borgswen commented on July 19, 2024

I'll try that this afternoon, I am at work now

from home-assistant-custom-components-linkplay.

mgustavss avatar mgustavss commented on July 19, 2024

Pausing a live stream for a longer time works fine on my Audio Pro system. I just tried pausing a TuneIn stream for 15 min and playback resumed without a hitch. If I pause for longer the unit automatically goes into standby mode. It works exactly the same as when I use the play/pause button on the speaker itself.
(This is with the code converting a pause command to a stop command commented out.)

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Are you sure it really "resumed" (=continued playing from the moment you paused it earlier)?.
My Linkplay devices (Audiocast and Arylic) when "resuming" even after 30 seconds, restart playing the stream from new, and sound becomes distorted in the first seconds.

There's no point in pausing a live stream, unless the server buffers the whole content. Linkplay modules don't have that much memory to buffer minutes of audio, so they drop it and resuming is not handled correctly (at least not in my devices).
Exception could be of course Spotify, where the streams are not really live. I'll see in the code if this could be handled differently for Spotify.

from home-assistant-custom-components-linkplay.

mgustavss avatar mgustavss commented on July 19, 2024

Ah, now I understand what you're getting at. After I resume listening to a live stream, the sound jumps to a new spot, but I never thought that the sound sounded distorted in any way. And I can pause and resume a live stream using the play/pause button on the Audio Pro, just as when playing from other sources.

I think all the different Audio Pro speakers have a play/pause button and I imagine that many other Linkplay devices do as well. The Audiocast M5 of course does not.

I would argue for having the media_pause (or media_playpause) service behave just as when I push the play/pause button on the device. Converting to a media_stop breaks the Lovelace media player functionality (both built-in and mini-media-player). And if I actually want media_stop, I can call that service.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

OK, I'll see what I can do. The main difference between us is that none of my devices have any buttons, they can only be controlled via network.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Yes, the biggest issue is that the firmware on them is very inconsistent. Some end-manufacturers don't release the updates, although the internal Linkplay module have it.

from home-assistant-custom-components-linkplay.

ant0nwax avatar ant0nwax commented on July 19, 2024

Hi, sorry for off topic, can you update your internal linkplay module on a (doss cloudfox A1) speaker where the firmware is not released with some hack-o-whack, the current firmware is 3.5 somthing ?

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Not unless you get from manufacturer.

from home-assistant-custom-components-linkplay.

ant0nwax avatar ant0nwax commented on July 19, 2024

yesterday i found something
curl http://192.168.1.80/httpapi.asp\?command\=GetUpdateServer -v

which led me to the place where all the firmwares are on linkplay server
the most latest are from 2017 and the very latest is from 2019 but also only 3.61

i updated from a build 2016 06 to 2016 11 which was not present in the online update, but by manually selecting

so i guess this device can only be used for multiroom wifi true
right?

could you please share the output of the device that you updated to 4+

curl http://$ip/httpapi.asp\?command\=GetUpdateServer -v

would be really helpful in debugging, thanks

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Mine is http://silenceota.linkplay.com/wifi_audio_image

from home-assistant-custom-components-linkplay.

ant0nwax avatar ant0nwax commented on July 19, 2024

from home-assistant-custom-components-linkplay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.