Coder Social home page Coder Social logo

Comments (12)

nagyrobi avatar nagyrobi commented on July 19, 2024

In bluetooth pause doesn't have a reason to work, it behaves as a line input source. You can't pause that.
I don't have a Spotify subscription anymore so I can't test.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Try this overwrite, restart HA.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Note that if you're using their latest beta firmware they have a bug related to play/pause functionality.

from home-assistant-custom-components-linkplay.

christianbarnard22 avatar christianbarnard22 commented on July 19, 2024

@nagyrobi You're right, I was not having an issue with bluetooth, I was mistaken.

Thanks for posting these changes! I've tested it and here's what I experienced:

After pausing, the play button appears momentarily then changes back to a pause button. If I continue to click the pause button, the play button returns momentarily again. The audio does not start playing.

One thing that I should mention, is I am able to successfully resume the audio from the 4stream app and Spotify apps.

I will read about the bug you mentioned above as well.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Next steps to try finding your problem:

  • restart HA
  • go to Develper Tools > States, select your media player
  • look at the state and the debug_info attributes, what are they?
  • open Lovelace again in a new browser window, play something,
  • refresh the state in Developer tools, look at the state and the debug_info attributes, what are they now?
  • pause
  • refresh the state in Developer tools, look at the state and the debug_info attributes, what are they now?
  • try resuming
  • refresh the state in Developer tools, look at the state and the debug_info attributes, what are they now?

Post results please.

from home-assistant-custom-components-linkplay.

christianbarnard22 avatar christianbarnard22 commented on July 19, 2024

Thanks for pointing me to the dev tools. I hadn't considered looking at that.

What I saw in the dev tools is in line what the report I mentioned but I did learn some information that will help with the investigation and debugging.

I started playing audio, the state of my media player changed to playing.
I paused the audio, the state changed to paused, then changed back to playing without any action from me.

This helps to explain why the the play button changes back to pause in my previous report.

Interestingly enough, if I press pause repeatedly, eventually the state will paused (The play button displays) for a few moments then the state is changed back to playing without any action from me. When the play button shows up for that short amount of time, I can click play and the audio will resume. This is not ideal but this also shows that there is something updating the state of the media player to playing without user action.

I figured a video would help explain what I'm seeing, https://share.getcloudapp.com/X6ulAYkO Note that the only time the music goes off is when I click pause.

A few other points to mention from my testing.

  • Playing and pausing from Spotify works as expected
  • Playing and pausing from 4stream app works as expected.
  • When operating the from either of these apps, the state is not updated in home assistant, which I'd expect since I believe those apps are connected directly to the up2stream devices.

Hopefully this is clear and please feel free to ask questions or poke holes. I'm also going to

from home-assistant-custom-components-linkplay.

christianbarnard22 avatar christianbarnard22 commented on July 19, 2024

Here is an updated link, https://share.getcloudapp.com/X6ulAYkO

from home-assistant-custom-components-linkplay.

christianbarnard22 avatar christianbarnard22 commented on July 19, 2024

I've got one more test to share. I decided to revert to the original version of the code. Here is the state does not change to pause at all. I did notice though some times where the pause state was updated but that was after clicking pause repeatedly.

https://share.getcloudapp.com/GGupWL8m

from home-assistant-custom-components-linkplay.

christianbarnard22 avatar christianbarnard22 commented on July 19, 2024

One last interesting development while testing original version of the code. I paused the audio in home assistant, the state does not get updated.

I manually update the state to paused, then the state is changed to playing with out any user action.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

And this only happens with Spotify...

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Check updated release...

from home-assistant-custom-components-linkplay.

christianbarnard22 avatar christianbarnard22 commented on July 19, 2024

I did test the updated code and play and pause works as expected.

Thank you @nagyrobi

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.