Skip to content

Out-of-range exception Play/Pause button Roberts i94 via Frontier Silicon integration using Internet Radio #164643

@SpeedyGoneZales

Description

@SpeedyGoneZales

The problem

I am using a Roberts Radio Stream 94i via the Frontier Silicon integration.
When pressing the Play/Pause button on the media controls, I get error Failed to perform the action media_player/media_pause. Command failed. Value is not in range for this command.
This only happens in mode "Internet Radio"
This integration uses afsapi.

What version of Home Assistant Core has the issue?

core-2026.2.3

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

frontier_silicon

Link to integration documentation on our website

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

Diagnostics information

I can stop playback like so:
curl "http://<IP>:80/fsapi/SET/netRemote.play.control?pin=1234&value=0"

However, I cannot start playback using the same approach.
To start playback, it seems necessary to select an item from the navigation list, which starts playback:
curl "http://172.22.55.30:80/fsapi/SET/netRemote.nav.action.selectItem?pin=1234&value=7"

The way to do this seems as follows:

  1. Get the name of the current station like so
    curl "http://<IP>:80/fsapi/GET/netRemote.play.info.name?pin=1234"
  2. List all saved stations like so:
    curl "http://<IP>:80/fsapi/LIST_GET_NEXT/netRemote.nav.presets/-1?maxItems=500&pin=1234"

This returns an array with the station name and preset ID:

<item key="7">
<field name="name"><c8_array>BBC WorldService</c8_array></field>
<field name="type"><c8_array>IR</c8_array></field>
</item>
  1. Match the name with the station name, extract the key, and select that for playback, like so:
    curl "http://<IP>:80/fsapi/SET/netRemote.nav.action.selectItem?pin=1234&value=7"

Session IDs will preserve the navigation status, e.g.

session=$(curl -s "http://172.22.55.30:80/fsapi/CREATE_SESSION?pin=1234" | awk -F'[<>]' '/sessionId/ {print $3}')
curl "http://172.22.55.30:80/fsapi/SET/netRemote.nav.state?pin=1234&sid=${session}&value=1" #Set navigation state #Enable Nav
curl "http://172.22.55.30/fsapi/LIST_GET_NEXT/netRemote.nav.list/5?pin=1234&sid=$session" #Get item 5 from list

Anything in the logs that might be useful for us?

Logs show the following exception:

2026-03-03 01:24:41.731 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139636955310784] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 278, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2817, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2860, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 832, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 904, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/frontier_silicon/media_player.py", line 217, in async_media_pause
    await self.fs_device.pause()
  File "/usr/local/lib/python3.13/site-packages/afsapi/api.py", line 500, in pause
    return await self.play_control(PlayControl.PAUSE)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/afsapi/api.py", line 492, in play_control
    return await self.handle_set(API["control"], int(value))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/afsapi/api.py", line 264, in handle_set
    await self.__call(
    ^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    ),
    ^
  File "/usr/local/lib/python3.13/site-packages/afsapi/api.py", line 232, in __call
    raise OutOfRangeException(
        "Command failed. Value is not in range for this command."
    )
afsapi.exceptions.OutOfRangeException: Command failed. Value is not in range for this command.

Additional information

I'm thinking the best course of action would be to store the station name and correlating ID as a state in Home Assistant when the user first selects the station to play, and retain it after playback is stopped. When the start button is then pressed, the ID can be recalled from the HA state.
BTW: The API also offers the image of the active station in the graphicUri endpoint, this could be underlayed on the media player similar to how other media player integrations do it.

Some other calls I observed used by the UNDOK app:

/fsapi/GET/netRemote.nav.currentTitle?pin=1234
/fsapi/SET/netRemote.nav.action.navigate?pin=1234&value=0
/fsapi/LIST_GET_NEXT/netRemote.nav.list/-1?maxItems=25&pin=1234
/fsapi/SET/netRemote.nav.action.selectItem?pin=1234&value=0
/fsapi/GET/netRemote.play.caps?pin=1234
/fsapi/GET/netRemote.play.info.providerLogoUri?pin=1234
/fsapi/GET_NOTIFIES?pin=1234&r=21648&sid=1402866871

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions