Coder Social home page Coder Social logo

Comments (15)

nagyrobi avatar nagyrobi commented on July 19, 2024 1

Yes, It looks at the UUID/MAC address I think.

from home-assistant-custom-components-linkplay.

LennyLip avatar LennyLip commented on July 19, 2024
  1. Is there any conf cache inside the custom component?
  2. Why can't implement search devices by multicast (like the 4STREAM and native HomeAssistant DLNA rendered works)

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024
  1. Double check the address of the devices. Use static address leases or fixed addresses. It's clearly written in the doc.
  2. Not supported, this is free work.

from home-assistant-custom-components-linkplay.

LennyLip avatar LennyLip commented on July 19, 2024
  1. Some investigations. Update function does not call really, state==STATE_UNAVAILABLE . trying to resolve the issue.
  2. I understand, just asking.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Restart HA.

from home-assistant-custom-components-linkplay.

LennyLip avatar LennyLip commented on July 19, 2024

Restart HA.

Sure, it was restarted many times. Reading the docs now and trying to understand when we need to call schedule_update_ha_state(True) (as I understand correctly) function.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

We don't need to call that. HA calls it automatically every 10 seconds.
It can be called in exceptional cases when one doesn't want to wait for that amount of time for a refresh of state but shouldn't be abuse else entire HA system will be locked.
This component is currently not async.

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

There must be an issue in your network. No need to change anything in the code - this is trivial. Try restarting the speaker too.

from home-assistant-custom-components-linkplay.

LennyLip avatar LennyLip commented on July 19, 2024

There must be an issue in your network. No need to change anything in the code - this is trivial. Try restarting the speaker too.

Not sure about this. Tried to "Assert false" inside LinkPlayDevice.update() function - no results in logs. setup_platform() seems to work correctly, at least the new IP is correct. HA native DLNA rendered work ok also.
$wget http://192.168.1.*/httpapi.asp?command=getStatusEx from HA host work fine also.

from home-assistant-custom-components-linkplay.

LennyLip avatar LennyLip commented on July 19, 2024

Are you sure that HA will update the entity with an unavailable state?

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Look, I have 4 linkplay devices working perfectly here...
Maybe your HA install is wrecked... Try removing the entire custom component restart ha, and re-install from HACS...

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Are you sure that HA will update the entity with an unavailable state?

Yes.

from home-assistant-custom-components-linkplay.

LennyLip avatar LennyLip commented on July 19, 2024

Ok, removing Entity from registry and Restart helped. Then I tried to change the IP address of the host value to a random one and it add a new linkplay item. 1st is restored, 2nd is unavailable - it's ok. When I return the IP back - it works ok. The start post problem was that there was only one restored Entity in the registry. I do not have enough knowledge about HA structure, but it looks like HA did not accept a new entity with add_entities. Not sure how LinkPlayDevice objects compare inside the Entity registry, but it looks like HA decided that the restored entity and the entity with new IP are the same.

from home-assistant-custom-components-linkplay.

LennyLip avatar LennyLip commented on July 19, 2024

Yes, It looks at the UUID/MAC address I think.

Ok, so it could be the next logic (the only ONE device!):

  1. Add Entity1 -> Device online -> Entity1.MAC in registry
  2. Add Entity2 with another IP -> Device online (device with new IP, but old mac) -> Entity1.MAC == Entity2.MAC -> reject adding Entity2 to the registry, HA uses Entity1 with old IP (and as I understand Entity1 source code runs from cached inside registry database in this case)
  3. Add Entity3 with random IP -> Device offline (device with old ip, and old mac) -> Entity1.MAC != Entity3.MAC (can't resolve due offline) - Device added (as I decribe above).

So the 2nd item - is the start topic problem.

Thank you for your support!

from home-assistant-custom-components-linkplay.

nagyrobi avatar nagyrobi commented on July 19, 2024

Thanks.

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.