Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


reading and setting CamillaDSP config remotely
#1
Hello,

I know i can easily switch between CDSP configs/yml-files using the CDSP dropdown box.
Would it be possible to do this remotely by API calls or SSH?

Thanks!
Reply
#2
A REST API and SSH command can be created to do this. I'll add to the TODO list but I don't know when I'll be able to get to it. Maybe another dev can take on this small project.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
That would be great! Thanks!
Reply
#4
Still on my list to rewrite the cdsp config handling in moode and bring it in line with the current way that camilladsp supports.

Then you can use the camilladsp api itself for selecting the config (and moode will be synced to it)
Reply
#5
For now i made a temporary solution by sending the following HTTP commands:
To read the current used config: '*moode-ip-adres*/command/cfg-table.php?cmd=get_cfg_system_value&param=camilladsp'
To set the to be used config: '*moode-ip-adres*/command/camilla.php?cmd=cdsp_set_config' with payload 'cdspconfig=MyCamillaConfig.yml'

This seems to work fine for now.
Reply
#6
Nice.

I can make these REST API's which will simplify using them

Whats the exact format of the cdsp_set_config URL?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
I am not sure what you are asking me (probably due to my very limited knowledge of IP communications)
I am using an AMX netlinx controller as automation unit, and i wrote the following code to change the CamillaDSP config file:

MESSAGE = 'cdspconfig=MyCDSPconfig.yml'
SEND_STRING dvMoOde, "'POST http://192.168.1.112/command/camilla.php...set_config HTTP/1.1',13,10,
'Accept-Language: en-us',13,10,
'Content-Type: application/x-www-form-urlencoded',13,10 ,
'Accept-Encoding: gzip, deflate',13,10,
'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1; SV1; .NET CLR 1.1.4322;.NET CLR 2.0.50727)',13,10,
'Host: 192.168.1.112',13,10,
'Connection: close',13,10,
'Cache-Control: no-cache',13,10,
'Content-Length: ',ITOA(LENGTH_STRING(MESSAGE)),13,10,
'Content-Type: text/html',13,10,
'Authorization: Basic Og==',13,10,13,10,
MESSAGE,13,10"
Reply


Forum Jump: