Downloads
Halrad

slaCmdr 1.0

HALRAD sound labs automation commander.

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.
For use with small touch screens or button control automation using an Elgato Stream Deck.

Where does it work?

Built tested: Windows 10 and Windows 11, using .net 8.

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 | enter | ctrl+C] - quit.
sla>
sla>l     <- l, ls, list all work. (see alias notes)
sla:>(0) :optical ->[fb630679-d59c-4352-9739-d2f49645df96]<- on  Phantom Left
sla:>(1) :upnp ->[f4d230e8-6cf7-4855-9800-7db6b90bf37b]<- on  Phantom Left
sla:>(2) :optical ->[9b141388-f14f-4614-b5f1-a519f0fc515d]<- on  Media Room Left
sla:>(3) :spotifyconnect ->[2b5b3f99-6937-4be6-a03e-1b95e150a927]<- on  Phantom Right
sla:>(4) :bluetooth ->[13026ed4-eb62-4dc7-9157-3d277bc49346]<- on  Phantom Right
sla:>(5) :raat ->[8a2be02d-32cc-4786-bb7b-32e7f9dfd0c6]<- on  Phantom Right
sla:>(6) :optical ->[4082e528-b5ba-4a13-8881-663410a743c7]<- on  Media Room Right
sla:>(7) :airplay2 ->[7efbb0ec-b7a4-433b-a362-e2c6c5c4ec97]<- on  Phantom Right
sla:>(8) :arch-physical ->[c19ef09f-89ba-4720-90a1-bc1b52cdea5e]<- on  Arch
sla:>(9) :upnp ->[396d6118-7adf-4467-985e-aeb72170a2dc]<- on  Phantom Right
sla:>(10) :bluetooth ->[883230ca-5782-4b1f-a12e-724b23e416ba]<- on  Phantom Left
sla:>(11) :optical ->[f6e88ce1-0163-435c-ae70-fa623faf2c07]<- on  Dialog
sla:>(12) :raat ->[8d7171c7-78d1-4b08-b1c4-6a9ccb24623a]<- on  Phantom Left
sla:>(13) :airplay2 ->[43a22906-d67d-4e87-8a8a-55f68d5e7cfa]<- on  Phantom Left
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-|-

Device Name Mapping (device_names.json)

(New) for R20 slaCmdr supports mapping device IDs to user-friendly names using a JSON file named device_names.json. This file is created in the same folder the program exe is located the first time it is run. You can delete the file and it will be re-created. This allows you to see meaningful names for your Devialet Phantom devices instead of raw device IDs in the CLI output.

File Location

Place device_names.json in the same directory as slaCmdr.exe.

File Format

{
    "DeviceIds": {
        "9127538b-79cc-56db-84f1-09807255eaa7": "arch",
        "e6e97c6f-0ac8-5a35-b68d-52f70ce7d7af": "left",
        "c8a05c46-3fc0-5111-aa47-56126ffd2d3c": "dialog",
        "a7e4a870-a141-529b-b564-13d71d18fc7e": "right"
    }
}
        

How it works

When listing sources or devices, slaCmdr will look up each device ID in device_names.json and display the friendly name if available. If a device ID is not found in the mapping, the raw device ID will be shown.

Editing the Mapping

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