Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roku integration fails to play FLAC files #119034

Closed
danvolchek opened this issue Jun 7, 2024 · 8 comments
Closed

Roku integration fails to play FLAC files #119034

danvolchek opened this issue Jun 7, 2024 · 8 comments
Assignees

Comments

@danvolchek
Copy link

danvolchek commented Jun 7, 2024

Update: This turned out to be a duplicate of #83819.


The problem

I'm using Music Assistant to play music on my Roku TV.

I configured MA, and got my TV to show up as a device, but when I hit play nothing happens.

In HA logs, I see (full error below):

Media type music is not supported with format None (mime: audio/flac)

This looks to be due to FLAC not being in these lists: https://github.com/home-assistant/core/blob/dev/homeassistant/components/roku/media_player.py#L50, https://github.com/ctalkington/python-rokuecp/blob/c61440be3041a0cf1854f6d340b57b4dc096e53d/src/rokuecp/helpers.py#L13

I'm able to play FLAC files through the default media player app, so I think this should be possible. Thanks!

Edit: Maybe not, see comments.

What version of Home Assistant Core has the issue?

core-2024.6.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Roku

Link to integration documentation on our website

https://www.home-assistant.io/integrations/roku/

Diagnostics information

Diagnostic info (click to expand)
{
  "home_assistant": {
    "installation_type": "Home Assistant Container",
    "version": "2024.6.0",
    "dev": false,
    "hassio": false,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "aarch64",
    "timezone": "America/Los_Angeles",
    "os_name": "Linux",
    "os_version": "6.6.20+rpt-rpi-2712",
    "run_as_root": true
  },
  "custom_components": {
    "mass": {
      "documentation": "https://github.com/music-assistant/hass-music-assistant",
      "version": "2024.5.1",
      "requirements": [
        "music-assistant==2.0.0"
      ]
    },
    "hacs": {
      "documentation": "https://hacs.xyz/docs/configuration/start",
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "roku",
    "name": "Roku",
    "codeowners": [
      "ctalkington"
    ],
    "config_flow": true,
    "documentation": "https://www.home-assistant.io/integrations/roku",
    "homekit": {
      "models": [
        "3820X",
        "3810X",
        "4660X",
        "7820X",
        "C105X",
        "C135X"
      ]
    },
    "integration_type": "device",
    "iot_class": "local_polling",
    "loggers": [
      "rokuecp"
    ],
    "quality_scale": "silver",
    "requirements": [
      "rokuecp==0.19.3"
    ],
    "ssdp": [
      {
        "st": "roku:ecp",
        "manufacturer": "Roku",
        "deviceType": "urn:roku-com:device:player:1-0"
      }
    ],
    "is_built_in": true
  },
  "setup_times": {
    "null": {
      "setup": 1.994600006582914e-05
    },
    "7682eb49d0734acf56dcde79f76ff95d": {
      "wait_import_platforms": -0.03385305499978131,
      "wait_base_component": -0.0008701189999555936,
      "config_entry_setup": 0.16269832800026052
    }
  },
  "data": {
    "entry": {
      "data": {
        "host": "192.168.0.16",
        "name": "TV"
      },
      "unique_id": "YK00SR846290"
    },
    "data": {
      "info": {
        "name": "TV",
        "brand": "TCL",
        "device_type": "tv",
        "device_location": "Living room",
        "model_name": "40S325",
        "model_number": "8113X",
        "serial_number": "YK00SR846290",
        "version": "12.0.0",
        "network_type": "wifi",
        "network_name": "Net5_5G",
        "ethernet_support": false,
        "ethernet_mac": null,
        "wifi_mac": "44:d8:78:13:83:68",
        "supports_airplay": true,
        "supports_find_remote": false,
        "supports_private_listening": true,
        "supports_wake_on_wlan": true,
        "headphones_connected": false
      },
      "state": {
        "available": true,
        "standby": false,
        "at": "2024-06-07T03:34:39.311117+00:00"
      },
      "apps": [
        {
          "app_id": "31012",
          "name": "Vudu Movie & TV Store",
          "version": "2.0.62",
          "screensaver": false
        },
        {
          "app_id": "12",
          "name": "Netflix",
          "version": "5.0.100079006",
          "screensaver": false
        },
        {
          "app_id": "tvinput.hdmi1",
          "name": "Nintendo Switch",
          "version": "1.0.0",
          "screensaver": false
        },
        {
          "app_id": "tvinput.hdmi2",
          "name": "HDMI\u00a02",
          "version": "1.0.0",
          "screensaver": false
        },
        {
          "app_id": "tvinput.hdmi3",
          "name": "HDMI\u00a03\u00a0(ARC)",
          "version": "1.0.0",
          "screensaver": false
        },
        {
          "app_id": "tvinput.cvbs",
          "name": "AV",
          "version": "1.0.0",
          "screensaver": false
        },
        {
          "app_id": "2213",
          "name": "Roku Media Player",
          "version": "5.5.13",
          "screensaver": false
        },
        {
          "app_id": "837",
          "name": "YouTube",
          "version": "2.22.110005100",
          "screensaver": false
        },
        {
          "app_id": "61322",
          "name": "Max",
          "version": "57.0.1",
          "screensaver": false
        },
        {
          "app_id": "592369",
          "name": "Jellyfin",
          "version": "2.0.7",
          "screensaver": false
        },
        {
          "app_id": "22297",
          "name": "Spotify Music",
          "version": "2.11.67",
          "screensaver": false
        },
        {
          "app_id": "253232",
          "name": "Dropout",
          "version": "8.400.1",
          "screensaver": false
        },
        {
          "app_id": "2285",
          "name": "Hulu",
          "version": "6.82.3",
          "screensaver": false
        },
        {
          "app_id": "31440",
          "name": "Paramount Plus",
          "version": "8.14.20240529",
          "screensaver": false
        },
        {
          "app_id": "291097",
          "name": "Disney Plus",
          "version": "1.38.2023120800",
          "screensaver": false
        }
      ],
      "channels": [],
      "app": {
        "app_id": null,
        "name": "Roku",
        "version": null,
        "screensaver": true
      },
      "channel": null,
      "media": null
    }
  }
}

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.roku.media_player
Source: components/roku/media_player.py:403
integration: Roku ([documentation](https://www.home-assistant.io/integrations/roku), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+roku%22))
First occurred: 8:09:09 PM (23 occurrences)
Last logged: 8:15:46 PM
Media type music is not supported with format None (mime: audio/flac)

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jun 7, 2024

Hey there @ctalkington, mind taking a look at this issue as it has been labeled with an integration (roku) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of roku can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign roku Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


roku documentation
roku source
(message by IssueLinks)

@danvolchek
Copy link
Author

Unfortunately it doesn't look to be as simple as updating the supported formats/mimetypes lists to add FLAC.

Unless I did it wrong, going into my home assistant install and updating the two files mentioned to support FLAC file types as music causes the "Play on Roku" to show up on my TV, but then it immediately exits.

@danvolchek
Copy link
Author

danvolchek commented Jun 7, 2024

Play on Roku doesn't support FLAC, apparently: https://support.roku.com/article/208755108#section-2

@danvolchek
Copy link
Author

Music Assistant only supports outputting in FLAC it looks like: https://music-assistant.io/faq/troubleshooting/ (ctrl+f FLAC)

@danvolchek
Copy link
Author

danvolchek commented Jun 7, 2024

Also relevant: https://github.com/orgs/music-assistant/discussions/430

If Roku truly cannot play FLAC files, then it's up to Music Assistant to provide a different codec, if possible.

Is there a way to play audio on Roku that's through the Media Player app rather than Play on Roku? It supports a much wider range of file types.

@danvolchek
Copy link
Author

danvolchek commented Jun 7, 2024

I figured out how to get Music Assistant to send MP3 files to Home Assistant/the Roku integration, and confirmed it's getting MP3 files as the media id, and that there are no errors in HA logs, but Roku Play still immediately exits like before.

I'm not sure how to debug this further. What should I do next? Thanks!

@ctalkington
Copy link
Contributor

Play on Roku was nerfed by Roku in the recent past. They claim security and implemented a different protocol for their mobile apps. HA integration hasn't been updated to support such (the feature has been removed from docs temporarily) but the intent is to try and reimplmwnt the new protocol or allow sending to specific app ID but it just hasn't been an item that I could get to yet. Ref #83819

@danvolchek
Copy link
Author

Oh dang, that sucks.

Thank you for the info, I didn't find that issue because I thought it was a codec problem.

This is a duplicate then - I'll close it.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants