Last active
June 10, 2023 04:30
-
-
Save duracell80/d3a12b35c4054cc97b9adfcb02728500 to your computer and use it in GitHub Desktop.
Ocean Digital Internet Radio WR-26F Web API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can store 150 stations | |
favCapacity:150 | |
Download favourites (stored stations as encrypted download, not plain text csv or pls) | |
http://xxx.xxx.x.xx/php/saveFav.php | |
Add local station as FM via favorites form input field | |
fm://9030/FM 90.30 MHz | |
Store a station: | |
form id: #mAddForm | |
form method: post | |
form action: # | |
form fields: "#addFav-chName","#addFav-chUrl","#addFav-chCountry","#addFav-chGenre" | |
$.post( url, param, ... gives ... | |
API URL: http://xxx.xxx.x.xx/php/addCh.cgi?EX=0&chName=<value>&chUrl=<value>&chCountry=<value>&chGenre=<value> | |
From skytune: | |
ai = _0x3fc8f3 == 'A' ? 0x82 : _0x3fc8f3 == 'P' ? 0x81 : '-'; | |
if (ai == '-') return; | |
showLoader(), OpenWindowWithPost(_0x2a61e5(0x26d) + myRadioIP + '/doApi.cgi?SL=' + skytuneLang + _0x2a61e5(0x162) + ai, _0x2a61e5(0x161), { | |
'chName': $(_0x2a61e5(0x26a))['eq'](0x0)['html'](), | |
'chUrl': '*#' + sbc_f_id + '#', | |
'chUrl2': sbc_f_id, | |
'chCountry': -0x1, | |
'chGenre': -0x1 | |
}), $(_0x2a61e5(0x20a))[_0x2a61e5(0x279)](_0x2a61e5(0xad)), hideLoader(); | |
POST | |
http://192.168.x.xxx/doApi.cgi?SL=EN&AI=129 | |
Change volume: http://xxx.xxx.x.xx/php/doVol.php?VL=1 | |
Now Playing: http://xxx.xxx.x.xx/php/playing.php | |
Play channel by index: http://xxx.xxx.x.xx/doApi.cgi?AI=16&CI=<favortie index number, offset by -1 eg 10-1=9> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sys, requests, json | |
# volume down VL=-1 | |
# volume up VL=1 | |
# mute VL=128 | |
# unmute VL=0 | |
r = requests.get("http://192.168.2.20/php/doVol.php", params = {"VL":"-1"}) | |
data = json.loads(str(r.text).replace("'", '"')) | |
data_level = data["level"] | |
data_muted = data["muted"] | |
print("Volume Level:%s\nMute Status:%s" | |
%(data_level, data_muted)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment