Czy ktoś wie jak zintegrować radio internetowe Oakcastle? Mogę nim sterować przy pomocy AirMusic Contol wydaną przez MediaYou. Znalazłem trochę materiałów na githubie:
https://gist.github.com/hsiboy/5662ee465979550452cf0470ff144353
https://github.com/kayrus/iradio
Tylko za bardzo nie wiem jak to ugryźć, integracja powinna być podobna do Silicon Frontier. Wiem też że inne radia używają tej apki - jak np. popularna w PL Auna czy Sharp.
Trochę więcej informacji znalazłem na githubie:
https://github.com/RobinMeis/AirMusic/tree/master/docs
https://github.com/vitasrutek/special-octo-waffle
https://github.com/edberoi/python-airmusicapi
W ostatnim linku jest nawet jakieś api na pythonie - jak to dodać do HA?
Edycja 9.02.22:
Na raspberry pi 4 zainstalowałem tests.py from https://github.com/edberoi/python-airmusicapi
Mam dwa radia tego typu, info z pierwszego:
Device Name: Radio �azienka
{
“SW_Ver”: “AT9THFCR-i724h-i713**ad-i725a-(DB:20211111)”,
“wifi_info”: {
“status”: “connected”,
“MAC”: “0C8C243E5CE0”,
“SSID”: “DOM3”,
“Signal”: “76”,
“Encryption”: “WPA2/AES”,
“IP”: “192.168.0.141”,
“Subnet”: “255.255.255.0”,
“Gateway”: “192.168.0.1”,
“DNS1”: “192.168.0.91”,
“DNS2”: null
}
}
Current volume = 3
Current mute = False
Hotkeylist: 5 out of 5:
75_256, Muzo.fm, file
75_770, Antyradio 94 FM Warszawa, file
75_4, Rock Radio, file
75_0, Double Q 101 WWQQ FM 101.3, file
75_0, Radio TOK FM, file
Verify navigation through menus to reach a station to play.
List: 10 out of 10:
87 Local Radio → content
51 my mediaU → content
52 Internet Radio → content
2 Media Center → content
5 FM → content
91 DAB/DAB+ → content
3 Information Center → content
47 AUX → content
104 Bluetooth → content
6 Configuration → content
List: 6 out of 6:
75 My Favorite → content
71 Radio Station/Music → content
87 Local Radio → content
154 Sleep Radio → content
59 History → content
4 Service → content
List: 8 out of 8:
75_0 Muzo.fm → file
75_1 Antyradio 94 FM Warszawa → file
75_2 Rock Radio → file
75_3 Double Q 101 WWQQ FM 101.3 → file
75_4 Radio TOK FM → file
75_5 Radio Nowy Å�wiat → file
75_6 Rádio Anténa Rock → file
75_7 Empty → emptyfile
Press CTRL-C to interrupt.
Vol sid Status
3 1 Connecting …
3 1 Connecting …
3 1 Connecting …
3 1 Connecting …
3 1 Connecting …
3 1 Connecting …
3 1 Connecting …
3 1 Connecting …
3 1 Connecting …
3 1 Connecting …
^CGoing to play the radio station at hotkey 1.
Press CTRL-C to interrupt.
Vol sid Status
3 1 Connecting …
3 1 Connecting …
3 1 Connecting …
3 2 Buffering 25%
3 6 Playing
3 6 Playing
3 6 Playing
Drugie radio:
Device Name: Oakcastle IR100
{
“SW_Ver”: “5SADNB33-jb21h-jb21**a*-jb21a-(DB:20220114)”,
“wifi_info”: {
“status”: “connected”,
“MAC”: “74EE2A365265”,
“SSID”: “DOM3”,
“Signal”: “82”,
“Encryption”: “WPA2/AES”,
“IP”: “192.168.0.142”,
“Subnet”: “255.255.255.0”,
“Gateway”: “192.168.0.1”,
“DNS1”: “192.168.0.91”,
“DNS2”: null
}
}
Current volume = 10
Current mute = False
Hotkeylist: 5 out of 5:
75_0, Muzo.fm, file
75_1, Antyradio FM, file
75_2, Rock Radio, file
75_3, EskaROCK, file
75_4, Radio Nowy Swiat, file
Verify navigation through menus to reach a station to play.
List: 7 out of 7:
87 Local Radio → content
52 Internet Radio → content
2 Media Center → content
136 Spotify Connect → content
3 Information Center → content
104 Bluetooth → content
6 Configuration → content
List: 5 out of 5:
75 My Favorite → content
71 Radio Station/Music → content
154 Sleep Radio → content
59 History → content
4 Service → content
List: 10 out of 10:
75_0 Muzo.fm → file
75_1 Antyradio FM → file
75_2 Rock Radio → file
75_3 EskaROCK → file
75_4 Radio Nowy Swiat → file
75_5 ANTENA ROCK → file
75_6 Zlote → file
75_7 MELO- → file
75_8 TOK FM → file
75_9 Empty → emptyfile
Press CTRL-C to interrupt.
Vol sid Status
10 1 Connecting …
10 2 Buffering 25%
10 6 Playing
10 6 Playing
10 6 Playing
10 6 Playing
10 6 Playing
^CGoing to play the radio station at hotkey 1.
Press CTRL-C to interrupt.
Vol sid Status
10 6 Playing
10 1 Connecting …
10 3 Buffering 50%
10 6 Playing
10 6 Playing
Jeśli uruchomię ten skrypt Antyradio będzie odtwarzane:
import json
import logging
import time
from airmusicapi import airmusicIPADDR = ‘192.168.0.142’ # Change this to the IP-address or hostname of your device.
TIMEOUT = 5 # in seconds. In most cases 1 second is sufficient.def main():
am_obj = airmusic(IPADDR, TIMEOUT) am_obj.log_level = logging.DEBUG am_obj.init(language="en") hotkeylist = am_obj.get_hotkeylist() am_obj.enter_menu(75) am_obj.play_station('75_1') am_obj.play_hotkey(1)
if name == ‘main’:
main()
Kontrola po ip działa idealnie, reszta komend jest w init.py i teraz pytanie jak to dalej zintegrować z HA?