Mr.ToR
(Tonguç Endem)
June 3, 2024, 8:34am
161
kritikos24:
denon pma 900 hne
Hi again, it seems that amp does not support JSON API or the ssh but only uses the ancient telnet method.
You will have to use the telnet integration.
You should be able to do what you want this way.
Maybe you might want to use buttons instead of switches.
However, If your amp asks for a password with telnet, I don’t know how the telnet integration supports passwords.
Mr.ToR
(Tonguç Endem)
September 11, 2024, 3:26pm
162
Hi @Sennevds ,
I just realized I’m getting this error in the log:
Log details (WARNING)
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1607
First occurred: 5:12:52 PM (3 occurrences)
Last logged: 5:12:52 PM
* Entity media_player.receiver (<class 'custom_components.media_player_template.media_player.MediaPlayerTemplate'>) is using deprecated supported features values which will be removed in HA Core 2025.1.
Instead it should use <MediaPlayerEntityFeature.PAUSE|SEEK|VOLUME_SET|VOLUME_MUTE|PREVIOUS_TRACK|NEXT_TRACK|TURN_ON|TURN_OFF|VOLUME_STEP|SELECT_SOURCE|STOP|PLAY|SELECT_SOUND_MODE: 89535>,
please create a bug report at https://github.com/Sennevds/media_player.template/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
Apparently there already is an issue posted on the GitHub.
Have you abandoned the project or will you fix it at some point?
Bluscream
(Bluscream)
September 30, 2024, 9:37pm
163
I have made a example universal media player and a template media player for a android device running the hass app:
- platform: universal
unique_id: bluscream_phone
name: "Bluscream's Phone"
device_class: tv
commands:
turn_on:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: play
turn_off:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: pause
volume_set:
service: notify.mobile_app_timos_handy
data:
message: command_volume_level
data:
media_stream: music_stream
command: "{{ volume_level }}"
volume_up:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: volume_up
volume_down:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: volume_down
volume_mute:
service: notify.mobile_app_timos_handy
data:
message: "command_volume_level"
data:
media_stream: "music_stream"
command: "{{0 if is_volume_muted else 15}}"
media_play:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: play
media_pause:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: pause
media_stop:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: stop
media_previous_track:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: previous
media_next_track:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: next
attributes:
state: sensor.timos_handy_media_session
is_volume_muted: >
{{ "on" if states('sensor.timos_handy_volume_level_music') == 0 else "off" }}
volume_level: sensor.timos_handy_volume_level_music
# source: media_player.receiver|source
# source_list: media_player.receiver|source_list
- platform: media_player_template
media_players:
receiver:
unique_id: bluscream_phone2
friendly_name: "Bluscream's Phone 2"
device_class: receiver
# current_source_template: "{{ states('input_text.selected_source') }}"
value_template: >
{{ 'on' if is_state("sensor.timos_handy_media_session", "Playing") else 'off' }}
turn_on:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: play
turn_off:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: pause
volume_up:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: volume_up
volume_down:
service: notify.mobile_app_timos_handy
data:
message: command_media
data:
media_command: volume_down
# inputs:
# source 1:
# service: input_boolean.turn_on
# data_template:
# entity_id: input_boolean.source_1
# source 2:
# service: input_boolean.turn_on
# data_template:
# entity_id: input_boolean.source_2
set_volume:
service: notify.mobile_app_timos_handy
data:
message: "command_volume_level"
data:
media_stream: "music_stream"
command: "{{volume}}"
mute:
service: notify.mobile_app_timos_handy
data:
message: "command_volume_level"
data:
media_stream: "music_stream"
command: "{{0 if is_muted else 15}}"
current_is_muted_template: >
{{ "on" if states('sensor.timos_handy_volume_level_music') == 0 else "off" }}
# album_art_template: "{{ state_attr('sensor.timos_handy_media_session','title_com.bambuna.podcastaddict') }}"
title_template: "{{ state_attr('sensor.timos_handy_media_session','title_com.bambuna.podcastaddict') }}"
album_template: "{{ state_attr('sensor.timos_handy_media_session','album_com.bambuna.podcastaddict') }}"
artist_template: "{{ state_attr('sensor.timos_handy_media_session','artist_com.bambuna.podcastaddict:') }}"
Please leave some feedback and also tell me how i can do it without knowing the app package name
alexbeatle
(Alexbeatle)
November 20, 2024, 8:43pm
164
Is there a way to launch an app on android tv using this? E.g. call app package name to open?
My android tv project has locked adb, so adb commands don’t work.
EDIT:
Resolved using this…
Perhaps this can be upgraded to media_player - using the following homebridge as an example?
https://github.com/fantasytu/homebridge-xgimi-tv/tree/master
I used their format to send custom command which allowed me to launch apps.
Replace:
self._advance_command = str({"action": 20000, "controlCmd": {"data": "command_holder", "delayTime": 0, "mode": 5, "time": 0, "type": 0}, "msgid": "2"})
with
self._advance_command = str({"action": 20000, "controlCmd": {"data": "command_holder", "delayTime"…