Giter Club home page Giter Club logo

teufel_raumfeld's People

Contributors

b5r1oj0a9g avatar c-mellueh avatar drprofesq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teufel_raumfeld's Issues

Home assistant TTS and other wav is chopped off

First of all, thank you for your project.
I have been trying to integrate my raufeld loudspeakers into a smart home assistant for years. Previously via rhasspy and node-red, now via home assistant. Now I realize that it is not so much a problem of the components but that apparently wav is not played back correctly in general. I have an automation in which I simply send piper tts to a Raufeld speaker for testing and it is always choppy, as with previous attempts.
Is it maybe due to sample rates or do you have any advice for me?

State of integration

Hello,

how is the state of the integration? Is development still active?
I have tested current release. And I encountered a few errors and problems. So I decided to uninstall for now.
But was highly interested in this integration. Maybe I could help and support further development.

I have one Raumfeld Base, and a few Raumfeld Speaker (L, M and S) installed.

Integration setup causes HA to get unresponsible

Hi,

first of all thank you for doing the integration, I already started to look for alternatives to my Teufel Speaker but will stick with it for a little longer now.

I tried to setup the integration twice now, and it always puts my HomeAssistant instance in a state where it will not respond at all. I have to reboot the rasperry in order to get it working again.

Setup

Raspi 4
Home Assistant OS 5.11
core-2021.2.3

Teufel Integration 9c35a4d and 9c4d8df (installed using HACS)

Raumfeld One S v1.28.102057

How to reproduce it:

  1. Go to Configuration -> Integration
  2. Click "Add new Integration" and select Teufel Raumfeld
  3. Enter IP of Raumfeld One S as Host
  4. Click "Submit"

=> The system will not respond any more.

I have check the logs, but they seem to be wiped after the restart. If I can help you in anyway pinpoint that problem, let me know.

Thanks,
Marco

No media entity is created

Hi there,
it seems that its only me only struggeling with this component :(

I was using this component frequently the last weeks, when all of a sudden it stopped working. I checked HA didnt find nothing, redownloaded the component and reconfigured and figured out that my host is recognised. 2 Devices are recognised (seems correct as I have an Teufel S and Teufel M) but only 6 entities are created. Per device this is :

  • Powerstate
  • Softwareversion
  • Updateinfoversion

No media entity is created, no zone no nothing. I enabled logging and this is the error I'm getting when reloading the integration:

Logger: homeassistant.components.media_player
Source: loader.py:1045
Integration: Media player ([documentation](https://www.home-assistant.io/integrations/media_player), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+media_player%22))
First occurred: 19:59:56 (2 occurrences)
Last logged: 20:04:16

Error while setting up teufel_raumfeld platform for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/teufel_raumfeld/media_player.py", line 133, in async_setup_entry
    entity_registry = await hass.helpers.entity_registry.async_get_registry()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1045, in __getattr__
    value = getattr(self._module, attr)
AttributeError: module 'homeassistant.helpers.entity_registry' has no attribute 'async_get_registry'

Anything I can try to get this fixed?

deprecated `async_get_registry` warning

Hi, I am getting the following error. I have no clue how to fix this; would you please be so kind to fix this?

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:103
First occurred: 19:04:43 (1 occurrences)
Last logged: 19:04:43
Detected integration that uses deprecated `async_get_registry` to access entity registry, use async_get instead. Please report issue to the custom component author for teufel_raumfeld using this method at custom_components/teufel_raumfeld/media_player.py, line 133: entity_registry = await hass.helpers.entity_registry.async_get_registry()

Issues with Repo and Integration since 2022.02

I had the integration disabled for a long time, just because I had no time to get it working properly.
Now with the new media integration in 2022.02 I thought it is a good idea to start with.

Enabled the integration, the speakers popped up but they were not usable, nor the media card, the custom mini media card or the new HA media had the option to choose them.

After deleting the integration from HA and HACS, I started over again and now I am unable to install the latest release, the log says

This error originated from a custom integration.

Logger: custom_components.hacs
Source: custom_components/hacs/repositories/base.py:867
Integration: HACS (documentation, issues)
First occurred: 8:23:13 AM (2 occurrences)
Last logged: 8:23:47 AM

No assets found for release 'tags/v0.1.10-alpha1'

v0.1.10-alpha is still able to be downloaded and works, but HACS bugs me with messages to update to the "latest alpha1" version.

Next and previous track command not working in Spotify SingleRoom mode

          allright, now it partly works for me, I don't know what exactly changed, I did a ton of restarting, reinstalling and so on concerning other problems. HA still does not realize if music is playing via spotify multiroom. If I hit play though, it starts playing from the multiroom speaker. Background-image still does not appear, but who cares. What bothers me is that i cant skip or replay songs. Imma just dump the log report here, can't make out what is of relevance and what not

` [140228859544000] 'HassRaumfeldHost' object has no attribute 'async_room_next_track'

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1704, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
await result
File "/config/custom_components/teufel_raumfeld/media_player.py", line 419, in async_media_next_track
await self._raumfeld.async_room_next_track(self._room)
AttributeError: 'HassRaumfeldHost' object has no attribute 'async_room_next_track'
`

Originally posted by @MaxSchuck in #4 (comment)

Release 0.1.2-alpha dependency to async-upnp-client breaks integration

In release of 0.1.2a all UPnP calls are implemented by async-upnp-client and the previously used module upnpclient was removed. This change was dependent on some pull requests to async-upnp-client which have finally been released with version 0.15.0 of async-upnp-client.
As there is a general version pinning in HA for a selection modules, including async-upnp-client, this requirement from teufel_raumfeld is currently prevented by HA to be met and finally leads to issues resp. error messages like the following ones:

2021-03-14 10:14:01 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up teufel_raumfeld platform for sensor
Traceback (most recent call last):
  File "/var/home/nobody/home-assistant/core/homeassistant/helpers/entity_platform.py", line 200, in _async_setup_platform
    await asyncio.shield(task)
  File "/var/home/nobody/home-assistant/core/config/custom_components/teufel_raumfeld/sensor.py", line 62, in async_setup_entry
    device_name = raumfeld.device_udn_to_name(renderer_udn)
  File "/var/home/nobody/home-assistant/core/venv/lib64/python3.9/site-packages/hassfeld/__init__.py", line 324, in device_udn_to_name
    device_name = self.resolve["devudn_to_name"][device_udn]
KeyError: None
2021-03-14 10:14:11 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.room_kitchen fails
Traceback (most recent call last):
  File "/var/home/nobody//home-assistant/core/homeassistant/helpers/entity.py", line 277, in async_update_ha_state
    await self.async_device_update()
  File "/var/home/nobody//home-assistant/core/homeassistant/helpers/entity.py", line 473, in async_device_update
    raise exc
  File "/var/home/nobody//home-assistant/core/config/custom_components/teufel_raumfeld/media_player.py", line 627, in async_update
    await self.async_update_all()
  File "/var/home/nobody//home-assistant/core/config/custom_components/teufel_raumfeld/media_player.py", line 618, in async_update_all
    await self.async_update_transport_state()
  File "/var/home/nobody//home-assistant/core/config/custom_components/teufel_raumfeld/media_player.py", line 550, in async_update_transport_state
    transport_state = info["CurrentTransportState"]
TypeError: 'NoneType' object is not subscriptable

Currently identified work-arounds (In recommended order):

Config dialog not showing

I installed teufel_raumfeld via HACS and restarted Home Assistant. In the Wiki, it says that a config dialog should pop up where I enter my Teufel Raumfeld main device IP address, but I don't see that dialog. Neither can I find a button to open it.

Can anyone help me out? Thank you!

Media browser may crash in "My Music"

At the tiem of writing observed for "Artists", "Genres" and "Composers":

2023-07-25 01:50:50.892 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140074998355136] Error handling message: Unknown error (unknown_error) test from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0)
Traceback (most recent call last):
  File "/var/home/marc/Development/github/home-assistant/core/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/var/home/marc/Development/github/home-assistant/core/homeassistant/components/media_player/__init__.py", line 1224, in websocket_browse_media
    payload = await player.async_browse_media(media_content_type, media_content_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/marc/Development/github/home-assistant/core/config/custom_components/teufel_raumfeld/media_player.py", line 638, in async_browse_media
    children = await self._raumfeld.async_browse_media(object_id, BROWSE_CHILDREN)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/marc/Development/github/home-assistant/core/config/custom_components/teufel_raumfeld/__init__.py", line 442, in async_browse_media
    if DIDL_VALUE in entry[DIDL_ELEM_TITLE]:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

State incompletely restored when streaming via optical input

I have noticed that the state is not correctly/completely restored by the teufel_raumfeld.snapshot/restore service combination, when streaming sound via the optical input.

Steps for reproduction:

  1. Play radio station via TuneIn
  2. Set source to optical input (television)
  3. Create snapshot via teufel_raumfeld.snapshot
  4. Apply various changes, e.g. play message via TTS
  5. Restore state via teufel_raumfeld.restore

After step 5, the Raumfeld media player should be streaming sound from the optical input again. Instead, it continues to play the radio station.
I am using a Teufel Cinebar Lux with firmware v2.15.1. The Teufel Raumfeld integration is installed with version 71cdd42.

Add tune-in service

With the raumfeld app I can play radio stations using the tune-in service. Can this service be made available through your add-in, would be great!

Deprecated entities (i.e. `SUPPORT_BROWSE_MEDIA`) have been removed from HA 2024.1, leading to an exception

When browsing media on a teufel_raumfeld device in HA 2024.1, you get the following error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1298, in websocket_browse_media
    if MediaPlayerEntityFeature.BROWSE_MEDIA not in player.supported_features:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable

Reason is that the teufel_raumfeld implementation still returns the old int-based constants for the supported_features method here.

According to the docs, these int contents have been removed in 2024.1, so this is why this error occurs. We are forced to use the MediaPlayerEntityFeature enum according to the docs.

I think what needs to be done is in the media_player.py of this repo here, we need to replace

SUPPORT_RAUMFELD_GROUP = (
    SUPPORT_PAUSE
    | SUPPORT_SEEK
    | SUPPORT_VOLUME_SET
    | SUPPORT_VOLUME_MUTE
    | SUPPORT_PREVIOUS_TRACK
    | SUPPORT_NEXT_TRACK
    | SUPPORT_PLAY_MEDIA
    | SUPPORT_VOLUME_STEP
    | SUPPORT_STOP
    | SUPPORT_TURN_ON
    | SUPPORT_TURN_OFF
    | SUPPORT_PLAY
    | SUPPORT_SHUFFLE_SET
    | SUPPORT_BROWSE_MEDIA
    | SUPPORT_REPEAT_SET
)

with something like

SUPPORT_RAUMFELD_GROUP = (
    MediaPlayerEntityFeature.SUPPORT_PAUSE
    | MediaPlayerEntityFeature.SUPPORT_SEEK
    | MediaPlayerEntityFeature.SUPPORT_VOLUME_SET
    | MediaPlayerEntityFeature.SUPPORT_VOLUME_MUTE
    | MediaPlayerEntityFeature.SUPPORT_PREVIOUS_TRACK
    | MediaPlayerEntityFeature.SUPPORT_NEXT_TRACK
    | MediaPlayerEntityFeature.SUPPORT_PLAY_MEDIA
    | MediaPlayerEntityFeature.SUPPORT_VOLUME_STEP
    | MediaPlayerEntityFeature.SUPPORT_STOP
    | MediaPlayerEntityFeature.SUPPORT_TURN_ON
    | MediaPlayerEntityFeature.SUPPORT_TURN_OFF
    | MediaPlayerEntityFeature.SUPPORT_PLAY
    | MediaPlayerEntityFeature.SUPPORT_SHUFFLE_SET
    | MediaPlayerEntityFeature.SUPPORT_BROWSE_MEDIA
    | MediaPlayerEntityFeature.SUPPORT_REPEAT_SET
)

Similar issues might come up from other constants as all of these integer based constants seem to have been retired.

Integration is using deprecated `DEVICE_CLASS_*` constants

This custom integration uses deprecated DEVICE_CLASS_* constants in its codebase.

The DEVICE_CLASS_* constants have been deprecated and replaced in Home Assistant Core 2021.12 (over a year ago). I would highly suggest updating/migrating this integration to the new enums.

For example, for the device classes supported by the sensor platform, there is now a SensorDeviceClass enum. So if a sensor previously used the DEVICE_CLASS_ENERGY constant, it should now use SensorDeviceClass.ENERGY. Other platforms (like binary_sensor, and number) provide similar enumerations for their supported device classes.

The migration thus only consists of replacing constants with an enumeration member and is, therefore, very low impact and should be fairly straightforward.

If I can help resolve any questions regarding this change or migration, feel free to ask or respond to this issue. I'm happy to help!

Kindest regards,

../Frenck

Volume goes up at media_player.volume_down

Hi, it seems that volume is going up at media_player.volume_down instead of down. Could this be the issue? First DEFAULT_CHANGE_STEP_VOLUME_DOWN is set to -2 and subsequently it is multiplied with -1, rendering a positive number. Just tested it and it seems to work when the -1 is removed.

DEFAULT_CHANGE_STEP_VOLUME_DOWN = -2

-1 * self._raumfeld.options[OPTION_CHANGE_STEP_VOLUME_DOWN]

Hass 2022.4.0 not loaded and can't remove/readd

As title. With the newest hass which is pretty amazing, the integration won't work any more. I can't even uninstall it in HACS or remove is in the integration page. When I delete it there. Nothing happens...

With "ignore" you can deletetr it in in hacs, reboot and delete it from the integrations. But then after reinstalling in hacs yout can't add a integration as it saye error this integration does not support configuration with gui....

switch play on does not work after some off-time

I use the service for switching on and off the players:

       - service: select.select_option
            data:
              option: "on"
            target:
              entity_id:
                - select.room_wz_powerstate
                - select.room_bad_powerstate
                - select.room_kueche_powerstate

But after some time (off longer than a hour) the players doent come up:

Logging:

2024-01-17 18:05:21.484 DEBUG (MainThread) [custom_components.teufel_raumfeld] select.py->async_select_option: Bad -> option: on
2024-01-17 18:05:21.484 DEBUG (MainThread) [custom_components.teufel_raumfeld] select.py->async_select_option: Kueche -> option: on
2024-01-17 18:05:21.484 DEBUG (MainThread) [custom_components.teufel_raumfeld] select.py->async_select_option: WZ -> option: on
2024-01-17 18:05:22.347 DEBUG (MainThread) [custom_components.teufel_raumfeld] Update event triggered for type: zone_config
2024-01-17 18:05:22.642 DEBUG (MainThread) [custom_components.teufel_raumfeld] Update event triggered for type: zone_config
2024-01-17 18:05:23.722 DEBUG (MainThread) [custom_components.teufel_raumfeld] Update event triggered for type: zone_config
2024-01-17 18:05:24.746 DEBUG (MainThread) [custom_components.teufel_raumfeld] Update event triggered for type: host_info
2024-01-17 18:05:26.086 DEBUG (MainThread) [custom_components.teufel_raumfeld] Update event triggered for type: host_info
2024-01-17 18:05:53.412 DEBUG (MainThread) [custom_components.teufel_raumfeld] Starting attempt '2' out of '16' attempts for transpo
rt state update
2024-01-17 18:05:54.054 DEBUG (MainThread) [custom_components.teufel_raumfeld] Starting attempt '3' out of '16' attempts for transpo
rt state update
2024-01-17 18:05:55.572 DEBUG (MainThread) [custom_components.teufel_raumfeld] Update event triggered for type: host_info
2024-01-17 18:05:56.031 DEBUG (MainThread) [custom_components.teufel_raumfeld] Starting attempt '4' out of '16' attempts for transpo
rt state update
2024-01-17 18:05:56.661 DEBUG (MainThread) [custom_components.teufel_raumfeld] Starting attempt '5' out of '16' attempts for transpo
rt state update
2024-01-17 18:10:35.397 INFO (MainThread) [hassfeld] Long-polling timed out

and the automation logs says:

Stopped because of unknown reason "null" at 17. Januar 2024 um 18:05:58

something wrong?

Invalid host

Hi,

After installing teufel_raumfeld (using HACS), the integration works perfectly, but after a restart of homeassistant i get following error:

Logger: custom_components.teufel_raumfeld
Source: custom_components/teufel_raumfeld/__init__.py:105
Integration: Teufel Raumfeld (documentation, issues)
First occurred: 13:43:05 (1 occurrences)
Last logged: 13:43:05

Invalid host: 10.0.1.10:47365

After removing the integration and installing it again the host is discovered correctly.

I am using docker:

System Health

version core-2021.4.6
installation_type Home Assistant Container
dev false
hassio false
docker true
virtualenv false
python_version 3.8.7
os_name Linux
os_version 4.4.59+
arch x86_64
timezone UTC
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 4664
Installed Version 1.12.3
Stage running
Available Repositories 777
Installed Repositories 17
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Lovelace
dashboards 14
resources 7
views 34
mode storage

Teufel One S-speakers unfortunately cannot be used for playing media from Homeassistant

First off i would like to thank you for your ongoing support of our Teufel and Raumfeld Speakers. Having them integrated into Home Assistant adds great benefit for many use cases, everyone got at home.
Since your recent update i was finally able to play Radio Stations directly on my Raumfeld One S speakers in my home.

My current setup is:
-2x Raumfeld One S (the first generation; works perfectly with your integration)
-2x Teufel One S (current gen, won't work with media_player.play-functions)

Unfortunately the current gen Teufel One S-Speakers somehow can not be used to play from Home Assistant.
Whenever i choose a Radio Station through the Selector-Popup inside Home Assistant, the following messages appear in my log:

Logger: pychromecast.socket_client Source: /usr/local/lib/python3.11/site-packages/pychromecast/socket_client.py:398 First occurred: 30. Dezember 2023 um 23:29:42 (31 occurrences) Last logged: 09:12:50 [Schlafzimmer(192.168.120.231):8009] Failed to connect to service ServiceInfo(type='mdns', data='Raumfeld-One-S-c3ac909469cd6a7b7ebedaa4712e1392._googlecast._tcp.local.'), retrying in 5.0s

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:238 Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22)) First occurred: 09:12:44 (5 occurrences) Last logged: 09:13:39 [140262985549376] None Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 878, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/teufel_raumfeld/media_player.py", line 544, in async_play_media await self._raumfeld.async_set_av_transport_uri( File "/usr/local/lib/python3.11/site-packages/hassfeld/__init__.py", line 767, in async_set_av_transport_uri zone_loc = self.resolve["udn_to_devloc"][zone_udn] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ KeyError: None

As far as i know and according to the german support-site of Teufel, it seems that the Teufel WIFI-product line (https://support.teufel.de/hc/de/articles/360001161345-Woran-erkenne-ich-ob-mein-Teufel-Streaming-Raumfeld-Ger%C3%A4t-Chromecast-unterst%C3%BCtzt-) won't support Chromecast anymore...i guess that might be the culprit, am i right?

Nevertheless it seems to be possible to play Webradio-Stations on the Teufel media players directly from the raumfeld-app itself, so there might/must be some way to trigger this, hopefully through home assistant.

I am happy to provide any logs necessary to get to the bottom of it.
Thank you in advance and best wishes
Chris

Feature Request: Spotify in SingleRoom mode

Hi!

First of all, thank you for this! I've been experimenting a bit with this and found that Spotify does not appear to be supported in SingleRoom mode.

To recap: Raumfeld supports two modes for Spotify: SingleRoom and MultiRoom. In SingleRoom mode, each room is separately available as a Device in Spotify. In MultiRoom mode, a single Device is available in Spotify, and the Teufel App can be used to configure which speakers actually play the music from Spotify.

Using Spotify in MultiRoom mode seems to mostly work (though I haven't experimented long with it).

Spotify in SingleRoom mode does not work: The Room shows as not active / playing. I suspect that this is because of this:

$ curl -L speaker-wohnzimmer:47365/getZones
<?xml version='1.0' encoding='UTF-8'?>
<zoneConfig numRooms='2' spotifyMode='singleRoom'>
 <zones>
  <zone udn='uuid:36C2A43C-B31C-4572-9EC1-0F43CFA40BB5'>
   <room name='Schlafzimmer' udn='uuid:b8f30d11-9a37-40c0-a9d5-fb334955de66' powerState='ACTIVE'>
    <renderer udn='uuid:1225735b-aec8-4058-892e-01018aa7d420' name='Speaker Schlafzimmer'></renderer>
   </room>
  </zone>
 </zones>
 <unassignedRooms>
  <room name='Wohnzimmer' udn='uuid:9b46f7f7-94e7-45f4-9e4f-49a45a7d2fbb' powerState='ACTIVE'>
   <renderer udn='uuid:666d35e9-f74f-4c0d-a59e-270f39e20a15' name='Speaker Wohnzimmer' spotifyConnect='active'></renderer>
  </room>
 </unassignedRooms>
</zoneConfig>

Note that the room where Spotify is active is listed as in unassignedRooms.

I don't understand enough about the data model here to determine if there's an ~easy fix for this or not. I'd be happy to test potential patches or even to try and write a patch myself if you can point me in the correct direction.

(Note: I totally understand if this is not a priority for you, but wanted to open this so that there's at least a central place for tracking this).

Media player does not support browsing media

Since the latest upgrade to v0.1.12-alpha4 I receive the following error message, when using the "Play media" service:
"Media player does not support browsing media".
I am running HA version 2022.4.7. This used to work before.

UnboundLocalError: local variable 'play_uri' referenced before assignment

I can no longer use the TTS service with my Teufel Raumfeld speakers (neither cloud-based nor via Google Translate). TTS stopped working a while ago. I do not exactly know when it broke. This is my test script:

alias: Liebeserklärung
sequence:
  - service: tts.cloud_say
    data:
      message: >-
        Guten Morgen Joël und Isabelle. Auch wenn der Papa nicht zu Hause ist,
        denkt er an euch und hat euch lieb.
      entity_id: media_player.room_cinebar_lux
mode: single

And here are the error messages from the log:

Logger: custom_components.teufel_raumfeld
Source: custom_components/teufel_raumfeld/__init__.py:106
Integration: Teufel Raumfeld ([documentation](https://github.com/B5r1oJ0A9G/teufel_raumfeld/wiki), [issues](https://github.com/B5r1oJ0A9G/teufel_raumfeld/issues))
First occurred: 9:53:51 PM (7 occurrences)
Last logged: 10:02:34 PM
Unexpected URI for media type: music
Logger: homeassistant.components.script.1662148356947
Source: custom_components/teufel_raumfeld/media_player.py:462
Integration: Script (documentation, issues)
First occurred: 9:53:56 PM (6 occurrences)
Last logged: 10:02:34 PM

Liebeserklärung (Duplicate): Error executing script. Unexpected error for call_service at pos 1: local variable 'play_uri' referenced before assignment
Liebeserklärung (Duplicate): Error executing script. Unexpected error for call_service at pos 2: local variable 'play_uri' referenced before assignment
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 218, in async_say_handle
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
    await result
  File "/config/custom_components/teufel_raumfeld/media_player.py", line 462, in async_play_media
    log_debug("self._rooms=%s, play_uri=%s" % (self._rooms, play_uri))
UnboundLocalError: local variable 'play_uri' referenced before assignment
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/teufel_raumfeld/media_player.py:462
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 9:53:56 PM (7 occurrences)
Last logged: 10:02:34 PM
[548195573024] local variable 'play_uri' referenced before assignment

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 290, in service_handler
    await script_entity.async_turn_on(
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 398, in async_turn_on
    await coro
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 428, in _async_run
    return await self.script.async_run(script_vars, context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 218, in async_say_handle
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
    await result
  File "/config/custom_components/teufel_raumfeld/media_player.py", line 462, in async_play_media
    log_debug("self._rooms=%s, play_uri=%s" % (self._rooms, play_uri))
UnboundLocalError: local variable 'play_uri' referenced before assignment

Noteworthy the same script works with a Sonos speaker.
I am running Teufel Raumfeld v0.1.12-alpha4 on Home Assistant version 2022.8.7

Set the volume of a specific room regardless of its zone

Hi,
is it possible to adjust, increase or decrease the volume of a particular room/speaker regardless of the zone it is in?
From my testing, it looks like you can only decrease/increase the volume of a media player, which represents a complete zone. It is also possible to set the volume for a specific room in an active zone. However, in my automations I don't know which zone is currently active and just want to set the volume of a specific room. Is there a way to achieve this?
Best regards,
Timo

mediainfo not in the attributes

I use the latest version (with patch included), but my attributes show only

group_members: Jonas
volume_level: 0.5
is_volume_muted: false
media_duration: 0
media_position: 0
media_position_updated_at: 2024-01-05T20:21:16.517919+00:00
media_title: Michael Jackson - Billie Jean
media_track: 1
shuffle: false
repeat: off
device_class: speaker
entity_picture: /api/media_player_proxy/media_player.room_jonas?token=40270e32e7d0fa5f4ce738132f9f597c46f580f47bd0049e820248157339aad6&cache=fc34c5a59991676d
icon: mdi:speaker
friendly_name: Room: ['Jonas']
supported_features: 972735

There is also not a debug log...
Any hints?

Data too long for column 'event_type'

Hi,
thanks for adding this integration for Teufel. I installed the integration yesterday and was greeted by a bunch of errors in the log today

System:
Hass.io on a NUC

  • Home Assistant OS 5.12
  • supervisor-2021.03.4
  • core-2021.3.3

Recorder: MariaDb AddOn 2.2.2
HACS 1.11.3
teufel_raumfeld component version: 696ac9b
Teufel Systems:

  • Teufel Conector (Host)
  • Teufel Soundbar
  • Teufel Soundbar
  • Stereo S

Error:

sqlalchemy.exc.DataError: (MySQLdb._exceptions.DataError) (1406, "Data too long for column 'event_type' at row 1")
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id, context_parent_id) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: ('teufel_raumfeld.webservice_update', '{"type": "system_state"}', 'LOCAL', datetime.datetime(2021, 3, 12, 9, 50, 31, 439025, tzinfo=datetime.timezone.utc), datetime.datetime(2021, 3, 12, 9, 50, 31, 439025, tzinfo=datetime.timezone.utc), '5e12278b6b5af7c2acd3b8d8d83187e4', None, None)]
(Background on this error at: http://sqlalche.me/e/13/9h9h)
2021-03-12 10:55:47 ERROR (Recorder) [homeassistant.components.recorder] Unexpected error saving events: (MySQLdb._exceptions.DataError) (1406, "Data too long for column 'event_type' at row 1")
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id, context_parent_id) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: ('teufel_raumfeld.webservice_update', '{"type": "host_info"}', 'LOCAL', datetime.datetime(2021, 3, 12, 9, 55, 47, 383320, tzinfo=datetime.timezone.utc), datetime.datetime(2021, 3, 12, 9, 55, 47, 383320, tzinfo=datetime.timezone.utc), '4cad8da787364a91960d48e2b60a21b2', None, None)]
(Background on this error at: http://sqlalche.me/e/13/9h9h)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
    res = self._query(query)
  File "/usr/local/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
    db.query(q)
  File "/usr/local/lib/python3.8/site-packages/MySQLdb/connections.py", line 259, in query
    _mysql.connection.query(self, query)
MySQLdb._exceptions.DataError: (1406, "Data too long for column 'event_type' at row 1")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 496, in _commit_event_session_or_recover
    self._commit_event_session_or_retry()
  File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 517, in _commit_event_session_or_retry
    self._commit_event_session()
  File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 547, in _commit_event_session
    self.event_session.commit()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1046, in commit
    self.transaction.commit()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 504, in commit
    self._prepare_impl()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 483, in _prepare_impl
    self.session.flush()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2540, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2682, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.raise_(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2642, in _flush
    flush_context.execute()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
    rec.execute(self)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 586, in execute
    persistence.save_obj(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 239, in save_obj
    _emit_insert_statements(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 1135, in _emit_insert_statements
    result = cached_connections[connection].execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
    ret = self._execute_context(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
    util.raise_(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/local/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
    res = self._query(query)
  File "/usr/local/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
    db.query(q)
  File "/usr/local/lib/python3.8/site-packages/MySQLdb/connections.py", line 259, in query
    _mysql.connection.query(self, query)
sqlalchemy.exc.DataError: (MySQLdb._exceptions.DataError) (1406, "Data too long for column 'event_type' at row 1")
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id, context_parent_id) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: ('teufel_raumfeld.webservice_update', '{"type": "host_info"}', 'LOCAL', datetime.datetime(2021, 3, 12, 9, 55, 47, 383320, tzinfo=datetime.timezone.utc), datetime.datetime(2021, 3, 12, 9, 55, 47, 383320, tzinfo=datetime.timezone.utc), '4cad8da787364a91960d48e2b60a21b2', None, None)]
(Background on this error at: http://sqlalche.me/e/13/9h9h)

No configuration dialog

I am not getting any kind of configuration dialog when adding teufel_raumfeld integration on HACS in HomeAssitant OS 6.1.

The integration is added, restart requested and no entities added.

Set abs volume of a room in a group not working

Hi there,

I it's not an bug but I simply cannot figure out how to set the abs volume for a room within a group.

My setup is the following:

image

My script loooks like this:

alias: Raumfeld normal
sequence:
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.2
      entity_id: media_player.group_one_m_one_s
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.3
      rooms: One S
      entity_id: media_player.room_one_s
mode: single

The volume is set to 20%, but the second call is not processed. I tried removing the attribute "rooms", but then the log tells me

2023-01-12 10:58:38.066 ERROR (MainThread) [homeassistant.components.script.raumfeld_lautstarke_normal] Raumfeld normal: Error executing script. Invalid data for call_service at pos 2: value must be one of ['One M', 'One S'] @ data['rooms'][0]

When i change the attribute to the following

alias: Raumfeld normal
sequence:
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.2
      entity_id: media_player.group_one_m_one_s
  - service: teufel_raumfeld.abs_volume_set
    data:
      volume_level: 0.3
      rooms: 'One S'
      entity_id: media_player.room_one_s
mode: single

I can see the following statement in the logs

2023-01-12 11:05:02.967 DEBUG (MainThread) [custom_components.teufel_raumfeld] media_player.py->async_set_rooms_volume_level: Method was called although speaker group '['One S']' is invalid

I assume I'm calling the wrong room, but how can I find out? Any suggestions of how to continue?
I can always change the volume of a group but not of a room.... :(

HACS Teufel integration not connecting to Teufel host

I run Homeassistant core-2021.6.6 on a QNAP Docker station.
I've installed HACS and managed to install the teufel integration.
When adding the integration to Home Asisstant the Teufel Host does not connect (not when using the IP of my raumfeld expand nor any of the raumfeld speakers of which I have a pair of series L, 3 OneS speakers and the soundbar.)
--> when entering any of the speaker - IP addresses I get a fail to connect error
--> when enetering the IP address of the raumfeld connect there is no error but the integration seems to endlessly process

Any guidance to complete the TEufel integration to my HA would be appreciated. I'm quite a newbie.
I've read the other issues and posts and think I miss the Hassfeld install. Can you confirm that to be the issue and if so,
I understand Hassfeld is another integration on Home Assistant. Should I install and how to do that on HA Core?

Speakers temporary offline causes error messages in the log

I configured some speakers, but no one has to be temporary offline.
This causes error messages in the Log.

KeyError: 'WZ'
2023-12-09 23:25:22.601 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.room_wz fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 698, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 959, in async_device_update
    await self.async_update()
  File "/config/custom_components/teufel_raumfeld/media_player.py", line 876, in async_update
    elif self._raumfeld.room_is_spotify_single_room(self._room):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hassfeld/__init__.py", line 449, in room_is_spotify_single_room
    room_udn = self.resolve["room_to_udn"][room]
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'WZ'
2023-12-09 23:25:26.953 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.connector_wz_2_softwareversion fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 698, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 959, in async_device_update
    await self.async_update()
  File "/config/custom_components/teufel_raumfeld/sensor.py", line 106, in async_update
    self._state = await self._get_state(self._device_udn)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hassfeld/__init__.py", line 1067, in async_get_device_info
    location = self.device_udn_to_location(udn)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hassfeld/__init__.py", line 380, in device_udn_to_location
    device_location = self.resolve["udn_to_devloc"][device_udn]
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^

Any hints, how to handle this?

thx

Could not Connect to Host

Hello!

I tried to use this integration to control my Raumfeld speakers via HomeAssistant. Unfortunately, I am stuck at this point:
image

I have also tried running the code from here: #2 (comment)

the script hung with the following output:

Long-polling failed with error: <class 'TypeError'>list indices must be integers or slices, not str

Thank you very much for the help!

I'm running Teufel Streaming 2.13.4 on my Speakers

Is this integration/maintainer still active

Hey just an open question (and ask for an honest answers). Is this package/integration for raumfeld under further development? I do know and am fully aware of that this is all just a hobby for most of us, however there people using this plugin and just wanted to check what the current state of affairs is?

I see that almost like a year no real development or issue topic has been adressed anymore.

Cheers

set_power_state Service is not available anymore

Hi,

I'm happy that you're active again. Nice that the Raumfeld integration lives again!

I noticed, that the set_power_state service is not available anymore. Is this ment to be, or is it a bug?

Thanks for your help!

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.