Le reverse engineering d’une api pas documentée à l’aide wireshark, c’est (un peu) essayer de grimper le Mont Blanc en tong… Au bout d’un moment, à vouloir domotiser l’indomotisable, on prend le problème par l’autre bout. Est-ce qu’il y a une api documentée (idéalement sans cloud)? Alors, ça devrait le faire. Et on laisse tomber les trucs fermés.
J’ai voulu y croire parce qu’une application Android peut contrôler ma radio mais je me rends compte que c’est compliqué
C’est un achat que j’ai fait avant Home Assistant. Il me reste à réfléchir si je veux vraiment intégrer les radios ou pas, auquel cas je changerai le matériel
Merci en tout cas
Clairement c’est pas simple, sans partir de zéro puisqu’il y a quelques informations sur les api (donc tongs + chaussettes de ski😱) ça reste un bel exercice de recherches.
Personnellement j’irai sur 2 voies :
- le script de découverte python pour essayer de voir si d’autres fichiers sont disponibles et pour avoir une synthèse de ce que ça propose.
- si les trames sont visibles (wireshack etc) j’essayerai de les ‹ rejouer ›. Sans pour autant décoder l’ensemble de la mécanique, si ça permet d’avoir quelques fonctions de bases c’est toujours ça de pris
Tu peux lancer des commandes web:
Ca marche super avec mes auna 150
Et la vrai intégration dans le Yaml pour que ca marche
media_player:
- platform: frontier_silicon
host: TonIp
password: 1234
Url de test par exemple pour connaitre le niveau de volume:
http://TonIp/fsapi/GET/netRemote.sys.audio.volume?pin=1234
Salut, merci d’avoir pris le temps de me répondre. Ça ne marche pas chez moi, les Auna que j’ai n’ont pas de chips et Frontier Silicon
Bonne soirée
I’ve been looking into this myself - there is a python API for airmusic, some info I’ve found:
AirMusic Control by MediaU - #2 by DominikW - Feature Requests - Home Assistant Community - sorry I can’t post links
Sorry for writing in English - I do not know French - just found your forum searching for this integration
@Nenettetobox - I’ve found a solution that might work for you, you can use shell_commands to controll your radio, in configuration.yaml add this code:
shell_command:
kuchnia_on_off: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=7"
kuchnia_vol_up: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=9"
kuchnia_mute: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=8"
kuchnia_vol_down: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=10"
kuchnia_up: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=2"
kuchnia_down: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=3"
kuchnia_1: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=115"
kuchnia_2: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=116"
kuchnia_3: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=117"
kuchnia_4: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=118"
kuchnia_5: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=119"
kuchnia_6: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=120"
kuchnia_7: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=121"
kuchnia_8: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=122"
kuchnia_9: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=123"
kuchnia_left: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=4"
kuchnia_right: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=5"
kuchnia_enter: "curl -H 'Authorization: Basic c3UzZzRnbzZzazc6amkzOTQ1NHh1L14=' http://192.168.0.142/Sendkey?key=6"
Use a name that you want and make sure you have a static IP on your radio and change it in the file accordingly.
Then you can set up a button grid card:
type: vertical-stack
cards:
- square: true
columns: 3
type: grid
cards:
- show_name: true
show_icon: true
type: button
name: Radio Kuchnia
tap_action:
action: call-service
service: shell_command.kuchnia_on_off
service_data: {}
target: {}
icon: mdi:power
show_state: true
hold_action:
action: none
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_up
service_data: {}
target: {}
entity: ''
icon: mdi:arrow-up-bold
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_mute
service_data: {}
target: {}
icon: mdi:volume-mute
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_left
service_data: {}
target: {}
icon: mdi:arrow-left-bold
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_enter
service_data: {}
target: {}
icon: mdi:circle-slice-8
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_right
service_data: {}
target: {}
icon: mdi:arrow-right-bold
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_vol_up
service_data: {}
target: {}
icon: mdi:volume-plus
show_state: true
hold_action:
action: none
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_down
service_data: {}
target: {}
icon: mdi:arrow-down-bold
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_vol_down
service_data: {}
target: {}
icon: mdi:volume-minus
show_state: true
hold_action:
action: none
- square: false
columns: 3
type: grid
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_1
service_data: {}
target: {}
icon: mdi:numeric-1
name: Muzo.fm
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_2
service_data: {}
target: {}
name: Antyradio
icon: mdi:numeric-2
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_3
service_data: {}
target: {}
icon: mdi:numeric-3
name: RockRadio
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_4
service_data: {}
target: {}
icon: mdi:numeric-4
name: EskaRock
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_5
service_data: {}
target: {}
icon: mdi:numeric-5
name: Nowy Świat
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_6
service_data: {}
target: {}
icon: mdi:numeric-6
name: Złote Przeboje
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_7
service_data: {}
target: {}
icon: mdi:numeric-7
name: MeloRadio
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_8
service_data: {}
target: {}
icon: mdi:numeric-8
name: Tok FM
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.kuchnia_9
service_data: {}
target: {}
icon: mdi:numeric-9
name: Antena Rock
It looks like this:
There might be other commands on your radio, you have to try different numbers after Sendkey?key= via ssh curl command. Works great on my two radios. Good luck with your set up.