Giter Club home page Giter Club logo

aiomusiccast's Introduction

Hi, I'm Tom πŸ‘‹

I live in Germany πŸ‡©πŸ‡ͺ working as a software developer at Tiplu.

I'm interested in...

πŸ’‘ Home Assistant for my smart home (also see my blog at https://vigonotion.com which is mainly about smarthome)

🚍 API libraries for the city I live in (Hamburg). I actually use them mostly for Home Assistant.

πŸ€– Other stuff I'm interested in

πŸ›  Soldering things that help me around my house (again for use with Home Assistant :D)

After a long day...

I'd like to say

Alexa, cinema mode and watch some shows. Here are my top recommendations for you:

🀠 Westworld

🌳 Dark

🧬 Orphan Black

aiomusiccast's People

Contributors

censored3 avatar micha91 avatar vigonotion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aiomusiccast's Issues

TypeError: 'NoneType' object is not iterable

Since some version of HA, I get this error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/yamaha_musiccast/__init__.py", line 120, in _async_update_data
    await self.musiccast.fetch()
  File "/usr/local/lib/python3.11/site-packages/aiomusiccast/musiccast_device.py", line 392, in fetch
    zone_names = {
                 ^
TypeError: 'NoneType' object is not iterable

Related HA issue:
home-assistant/core#106523

mc_server_group_extend throws error if device is added with a dns name instead of ipaddress

Hi again,

first a big thanks for your help, brought me closer to a solution, and thank you for your work on this wonderful integration.
I have four Yamaha RXV-679, running HA 2021.8.3 with aiomusiccast-0.9.1,
I am still trying to get the formerly working group functionality (with mini-media-player) back again.

Current release of mini-media-player cannot use media_player's join, so I had to build it from the current dev tree at commit a3a4a69.

However, I had added the Yamaha's with their dns name in config flow.
When I try to join a mc client, the master stops playing for a second or two, and HA tells:

2021-09-06 19:50:27 WARNING (MainThread) [aiomusiccast.musiccast_device] Coordinator of 172.16.2.131 did not receive the expected group data update via UDP. Fetching manually.
2021-09-06 19:50:28 WARNING (MainThread) [aiomusiccast.musiccast_device] Coordinator of 172.16.2.131 did not receive the expected group data update via UDP. Fetching manually.
2021-09-06 19:50:28 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139976403338480] 172.16.2.131: Failed to extent group by clients ['rxv679-wohnen.in.edevau.net']
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
    await hass.services.async_call(
  File "/usr/lib/python3.9/site-packages/homeassistant/core.py", line 1492, in async_call
    task.result()
  File "/usr/lib/python3.9/site-packages/homeassistant/core.py", line 1527, in _execute_service
    await handler.job.target(service_call)
  File "/usr/lib/python3.9/site-packages/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 658, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 843, in async_request_call
    await coro
  File "/usr/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 695, in _handle_entity_call
    await result
  File "/usr/lib/python3.9/site-packages/homeassistant/components/yamaha_musiccast/media_player.py", line 756, in async_join_players
    await self.coordinator.musiccast.mc_server_group_extend(
  File "/usr/lib/python3.9/site-packages/aiomusiccast/musiccast_device.py", line 831, in mc_server_group_extend
    await self.mc_server_group_extend(zone, client_ips, group_id, distribution_num, False)
  File "/usr/lib/python3.9/site-packages/aiomusiccast/musiccast_device.py", line 833, in mc_server_group_extend
    raise MusicCastGroupException(
aiomusiccast.exceptions.MusicCastGroupException: 172.16.2.131: Failed to extent group by clients ['rxv679-wohnen.in.edevau.net']

When I set up the Yamaha's int the config flow with their IP adresses instead of their hostname, it seems to work, HA only says in the log:

2021-09-06 19:53:10 WARNING (MainThread) [aiomusiccast.musiccast_device] Coordinator of 172.16.2.131 did not receive the expected group data update via UDP. Fetching manually.

DNS is set up properly, HA is able to resolve in both directions:

root@g18-hass:/etc/homeassistant/www # host rxv679-wohnen.in.edevau.net
rxv679-wohnen.in.edevau.net has address 172.16.2.136
root@g18-hass:/etc/homeassistant/www # host 172.16.2.136
136.2.16.172.in-addr.arpa domain name pointer rxv679-wohnen.in.edevau.net.
root@g18-hass:/etc/homeassistant/www # host rxv679-werkstatt.in.edevau.net
rxv679-werkstatt.in.edevau.net has address 172.16.2.131
root@g18-hass:/etc/homeassistant/www # host 172.16.2.131
131.2.16.172.in-addr.arpa domain name pointer rxv679-werkstatt.in.edevau.net.

The HA host is not on the same VLAN with the Yamahas (different building), all affected Yamahas share the same network, UDP traffic is allowed.

Would you say the it is better practice to use ip adresses instead of the host names?
Should I worry about the UDP message?

Thanks for your help.

ypao features not known message

I see the following in the HA logs on startup, which I'm reporting as instructed.

2022-04-11 19:18:39 INFO (MainThread) [aiomusiccast.musiccast_device] The model R-N803D supports the feature ypao_setting which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2022-04-11 19:18:39 INFO (MainThread) [aiomusiccast.musiccast_device] The model R-N803D supports the feature ypao_speaker_unit which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.

Add scene selection API endpoint

I've submitted a PR to pyamaha to include this in the base library. It would be great to see this implemented here for use in home assistant.

These are undocumented API endpoints that exist on my TSR-7850 receiver

"GET_SCENE_INFO": "http://{host}/YamahaExtendedControl/v1/{zone}/getSceneInfo",
"SET_SCENE": "http://{host}/YamahaExtendedControl/v1/{zone}/recallScene?num={scene}"

How do I join a speaker_group?

Sorry, cannot get it working, all documentation I find is very outdated.
I'm on 2021.9.3, the integrated MusicCast (aiomusiccast-0.9.1) (at least HA's docu says) should provide a join routine.
But it tells there is no service musiccast/join. mini-media-player-bundle.js is 12.1.
I have added three RXV's (config flow).

Here's how it looks with platform set to mediaplayer:

Bildschirmfoto 2021-09-05 um 17 34 13

This is my custom card:

type: entities
entities:
  - type: custom:mini-media-player
    group: true
    entity: media_player.rxv_werkstatt
    name: RXV Werkstatt
    toggle_power: false
    artwork: cover
    hide:
      icon: true
      power_state: false
      source: false
    speaker_group:
      platform: media_player
      expanded: false
      entities:
        - entity_id: media_player.rxv_wohnen
          name: Wohnzimmer
        - entity_id: media_player.rxv_kueche
          name: KΓΌche
  - type: custom:mini-media-player
    group: true
    entity: media_player.rxv_wohnen
    hide:
      icon: true
      controls: true
      progress: true
      source: true
      info: true
      power_state: false
  - type: custom:mini-media-player
    group: true
    entity: media_player.rxv_kueche
    hide:
      icon: true
      controls: true
      progress: true
      source: true
      info: true
      power_state: false

if I change the speaker_group platform to musiccast, it looks like this:

Bildschirmfoto 2021-09-05 um 17 34 25

New integration features - RXV-685

I upgraded home assistant which has the new version of your library. Thanks for the improvement The following log appeared which may be useful for the addition of extra features:

2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] The model RX-V685 supports the feature ypao_volume which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] The model RX-V685 supports the feature party_volume which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] The model RX-V685 supports the feature party_mute which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] The model RX-V685 supports the feature name_text_avr which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] The model RX-V685 supports the feature hdmi_standby_through which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] Zone main of model RX-V685 supports the feature extra_bass which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] Zone main of model RX-V685 supports the feature adaptive_drc which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] Zone main of model RX-V685 supports the feature dts_dialogue_control which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] Zone main of model RX-V685 supports the feature adaptive_dsp_level which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] Zone zone2 of model RX-V685 supports the feature extra_bass which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.
2021-07-15 14:08:32 INFO (MainThread) [aiomusiccast.musiccast_device] Zone zone2 of model RX-V685 supports the feature mono which is not known to aiomusiccast. Please consider opening an issue on GitHub to tell us about this feature so we can implement it.

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.