slaCmdr 1.0

HALRAD sound labs automation commander. slaCmdr.exe - Rhymes with salamander but is more like a chameleon, piloting your Devialet Phantom speakers.

Puts you in the drivers seat piloting Devialet Phantom speakers.

What is it?

A command line interface for Devialet Phantom speaker.

Why?

slaCmdr provides a command | shell interface for the Devialet Phantom speakers.

Initially this is conceived for use with small touch screens and an elgato Stream Deck as a simple way to control phantom speakers with the buttons.

Where does it work?

Built tested: Windows 10, using .net6.

Where is it?

slaCmdr.exe - usage

slaCmdr.exe -SystemIP -RootNameSpace [operation]
slaCmdr.Exe -Connect:SystemIP for CLI

- SystemIP: IPaddress of Devialet Phantom control point.
- 'RNS' RootNameSpace: Operate on one of a (Devices | Systems | Groups) object.

Examples Uses:

Usage
slaCmdr.exe -Discover query network for mDNS hosts
slaCmdr.exe SystemIP RootNameSpace -operation
slaCmdr.Exe -Connect SystemIP for CLI

SystemIP: IPaddress of Devialet Phantom control point.
'RNS' RootNameSpace: one of ('devices' | 'systems' | 'groups').
Operation [-GetNowPlaying | -GetSourceList | -PlaySource sourceID |
-Play | -Pause | -VolUp | -VolDown | -Pause]
Supported Commands -------------------------------------------------------------
slacmdr.exe -Discover
slacmdr.exe -Connect systemIP
slcmdr.exe SystemIP RNS [-GetNowPlaying | -GetSourceList]
slcmdr.exe SystemIP RNS -PlaySource sourceID
slcmdr.exe SystemIP RNS -Play
slcmdr.exe SystemIP RNS -Pause
slcmdr.exe SystemIP RNS -VolUp
slcmdr.exe SystemIP RNS -VolDown
Command Examples ---------------------------------------------------------------
slcmdr.exe 192.168.0.15 groups -Play
slcmdr.exe 192.168.0.15 systems -PlaySource 30b18894-f4d7-4da7-b523-6e57f1021e7b
slcmdr.exe 192.168.0.15 systems -PlaySource 3 (play sourcelist index #3)
slcmdr.exe -Connect 192.168.0.15

sla>help
sla>h
[help] - this
[alias] - show CLI command alias
[Use] systemIP
[Set] (Groups | Systems | Devices)
[Get] - now playing information
[List] - current sources
[PlaySource [sourceID]
[Play | Pause] - currently selected source
[VolUp | VolDown] - raise lower volume by 5%
[cls] - clear screen.
[exit | enter | ctrl+C] - quit.
sla>

How to use it

It's a command line tool, run it from anything you can call a command from.  You could run it to Play, Pause, Play a source, turn the volume up or down.  Theater or Music applications that enable you to run external commands for example.  Home automation?  "HALRAD play me a tune"...

Known working / tested scenarios:

CLI Use Example

slacmdr -connect 192.168.0.15

sla>help
sla>h
[help] - this
[alias] - show CLI command alias
[Use] systemIP
[Set] (Groups | Systems | Devices)
[Get] - now playing information
[List] - current sources
[PlaySource [sourceID]
[Play | Pause] - currently selected source
[VolUp | VolDown] - raise lower volume by 5%
[cls] - clear screen.
[exit | '' | ctrl+C] - quit.
sla>
sla>l     <- l, ls, list all work. (see alias notes)
sla:>(0) :optical ->[fb630679-d59c-4352-9739-d2f49645df96]<- on  0ac33155-615a-5a99-9bf9-39490f2c6260
sla:>(1) :upnp ->[f4d230e8-6cf7-4855-9800-7db6b90bf37b]<- on  0ac33155-615a-5a99-9bf9-39490f2c6260
sla:>(2) :optical ->[9b141388-f14f-4614-b5f1-a519f0fc515d]<- on  a7e4a870-a141-529b-b564-13d71d18fc7c
sla:>(3) :spotifyconnect ->[2b5b3f99-6937-4be6-a03e-1b95e150a927]<- on  e6e97c6f-0ac8-5a35-b68d-52f70cef57af
sla:>(4) :bluetooth ->[13026ed4-eb62-4dc7-9157-3d277bc49346]<- on  e6e97c6f-0ac8-5a35-b68d-52f70cef57af
sla:>(5) :raat ->[8a2be02d-32cc-4786-bb7b-32e7f9dfd0c6]<- on  e6e97c6f-0ac8-5a35-b68d-52f70cef57af
sla:>(6) :optical ->[4082e528-b5ba-4a13-8881-663410a743c7]<- on  97183fb4-4f56-5547-b262-cdec621ac44a
sla:>(7) :airplay2 ->[7efbb0ec-b7a4-433b-a362-e2c6c5c4ec97]<- on  e6e97c6f-0ac8-5a35-b68d-52f70cef57af
sla:>(8) :arch-physical ->[c19ef09f-89ba-4720-90a1-bc1b52cdea5e]<- on  9127538b-79cc-56db-84f1-09807255ec7f
sla:>(9) :upnp ->[396d6118-7adf-4467-985e-aeb72170a2dc]<- on  e6e97c6f-0ac8-5a35-b68d-52f70cef57af
sla:>(10) :bluetooth ->[883230ca-5782-4b1f-a12e-724b23e416ba]<- on  0ac33155-615a-5a99-9bf9-39490f2c6260
sla:>(11) :optical ->[f6e88ce1-0163-435c-ae70-fa623faf2c07]<- on  e6e97c6f-0ac8-5a35-b68d-52f70cef57af
sla:>(12) :raat ->[8d7171c7-78d1-4b08-b1c4-6a9ccb24623a]<- on  0ac33155-615a-5a99-9bf9-39490f2c6260
sla:>(13) :airplay2 ->[43a22906-d67d-4e87-8a8a-55f68d5e7cfa]<- on  0ac33155-615a-5a99-9bf9-39490f2c6260
sla:> Use (listID) or [SourceID] with PlaySource
sla>
pla 8  <- using list Index to PlaySource 8. Same as PlaySource c19ef09f-89ba-4720-90a1-bc1b52cdea5e
sla:>using playindex (8) as source: c19ef09f-89ba-4720-90a1-bc1b52cdea5e
{"availableOptions":["mute","unmute","play","pause"],"metadata":{"album":"","artist":"","coverArtUrl":"","title":""},"muteState":"unmuted","playingState":"playing","source":{"deviceId":"9127538b-79cc-56db-84f1-09807255ec7f","sourceId":"c19ef09f-89ba-4720-90a1-bc1b52cdea5e","type":"arch-physical"}}
sla>

CLI Alias:

- These command alias are interchangeable.

case|alias|a
case|exit|e
case|help|h
case|use|u
case|setnamespace|sns|ns|set
case|groups|group|g
case|systems|system|s
case|devices|device|d
case|getnowplaying|get|g
case|getsourcelist|getlist|list|ls|li|l
case|playsource|ps|pla
case|play|pl
case|pause|pa
case|volup|vup|vu|v+|+
case|voldown|vdown|vd|v-|-

API rubric

Reference to the related Devialet APIs for the scenarios:

1) Get Current Source - Device | System | Group + (/current/sources/current").Get(); - Method: GetNowPlaying   
1) Get Current Sources - Device | System | Group + (/current/sources").Get(); - Method: GetSourceList  

2) PlaySource - Device | System | Group + (/current/sources/" + sourceID + "/playback/play").Post(); Method: PlaySource:{SourceID}

3) Play - Device | System | Group + (/current/sources/current/playback/play").Post();  Method: Play
4) Pause - Device | System | Group + (/current/sources/current/playback/pause").Post();  Method: Pause

5) Vol Up - Device | System | Group + (/current/sources/current/soundControl/volumeUp").Post(); - Method: VolUp
6) Vol Down - Device | System | Group + (/current/sources/current/soundControl/volumeDown").Post();- Method: VolDown

7) Get Current Volume - System | Group  + (/current/sources/current/soundControl/volume").Get(); - Method:GetVolume

Collaborate

If you have suggestions or want to report issues slcmdr@eltekco.com

Links