Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cannot activate all sources#12

Unanswered
marcperreten asked this question inQ&A
Jul 7, 2023· 1 comments· 2 replies
Discussion options

Hello community

I have successfully written a driver that handles most of the functions. Volume, mute, and some sources work well.

eg I can select Line IN and NetRadio without any problem. Did it so:
http://192.168.1.105/api/v1/playback/sources/active/lineIn

But now I would like to be able to select the HDMI A B C and cannot do this:
Where do I go wrong:
http://192.168.10.201/api/v1/playback/sources/active/tv://hdmi_1

Thank you for all helpful inputs.

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

Hi,

So video "sources" are not stored as sources like audio sources. Instead look atget_remote_menu to see video sources and activate them withpost_remote_trigger.

To see an example of this you can look at the Home Assistant code here:https://github.com/bang-olufsen/bangolufsen-hacs/blob/53e63181ca8ebd1743fc72609dc22855ce4135e7/custom_components/bangolufsen/media_player.py#L448
and here:
https://github.com/bang-olufsen/bangolufsen-hacs/blob/53e63181ca8ebd1743fc72609dc22855ce4135e7/custom_components/bangolufsen/media_player.py#L939

Kind regards.

You must be logged in to vote
2 replies
@marcperreten
Comment options

Sorry, only now get to continue.

That means I send

POST /api/v1/remote/id/trigger HTTP/1.1

right?

What does the "id" look like for HDMI1 on a Theater? If you can give an example that would help me a lot.

Thanks!

Marc

@mj23000
Comment options

Sorry for the late reply, here is an example of switching HDMI input.

from GET /api/v1/remote you get a key, value map of RemoteMenuItem values. An example of this is:

{"0cce0072-55fd-4abb-b5a2-aa4cad606f53": {"actionList": [      {"contentId":"tv://hdmi_3","type":"triggerContent"      }    ],"available":true,"content": {"categories": ["hdmi"      ],"contentUri":"tv://hdmi_3","label":"HDMI C","source": {"value":"tv"      }    },"disabled":false,"dynamicList":"none","fixed":false,"id":"0cce0072-55fd-4abb-b5a2-aa4cad606f53","label":"HDMI C","parentMenuItemId":"1a873cf6-0881-43f4-8ec7-4ff9cb9b7cf2"  },}

To trigger this item (HDMI C / HDMI 3) I would use thePOST /api/v1/remote/{id}/trigger with the id being the desired sources key, so in this case it would bePOST /api/v1/remote/0cce0072-55fd-4abb-b5a2-aa4cad606f53/trigger or with curl:

curl --request POST \  --url http://0.0.0.0/api/v1/remote/0cce0072-55fd-4abb-b5a2-aa4cad606f53/trigger \  --header'Accept: application/json' \  --header'Content-Type: application/json'

Don't hesitate for any clarifications or other questions.

Kind regards.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@marcperreten@mj23000

[8]ページ先頭

©2009-2025 Movatter.jp