-
Notifications
You must be signed in to change notification settings - Fork 16
SDK documentation
TrackAudio provides a websocket interface at ws://0.0.0.0:49080/ws
to receive state updates and interact with TrackAudio. For an example of using the websocket interface see the StreamDeck-TrackAudio project.
The following messages are sent by TrackAudio to the connected websocket clients.
Sent when the TrackAudio voice connection state changes. The following value properties are sent:
Property | Description |
---|---|
connected | True if voice is connected. |
{
"type": "kVoiceConnectedState",
"value": {
"connected": true
}
}
Sent whenever an individual station's state updates, including when stations are added and removed. The following value properties are sent:
Property | Description |
---|---|
callsign | The callsign for the station. |
frequency | The frequency of the station whose state updated. |
headset | True if the audio is routed to the headset. |
isAvailable | True if the requested station is currently listed in TrackAudio. False if not. |
isOutputMuted | True if the station is muted. |
outputVolume | The volume for the station. Range is 0-100. |
rx | True if rx is enabled. |
tx | True if tx is enabled. |
xc | True if xc is enabled. |
xca | True if xca is enabled. |
Example response when the station is in TrackAudio:
{
"type": "kStationStateUpdate",
"value": {
"callsign": "SEA_E_TWR",
"frequency": 119900000,
"headset": true,
"rx": true,
"tx": true,
"xc": false,
"xca": false,
"isAvailable": true,
"isOutputMuted": false,
"outputVolume": 80
}
}
Example response when the station is not in TrackAudio:
{
"type": "kStationStateUpdate",
"value": {
"callsign": "SEA_E_TWR",
"isAvailable": false,
}
}
Sent in response to a kGetStationStates
message. The following value properties are sent:
Property | Description |
---|---|
stations | An array of kStationStateUpdate messages, one for each station in TrackAudio. |
{
"type": "kStationStates",
"value": {
"stations": [
{
"type": "kStationStateUpdate",
"value": {
"callsign": "SEA_E_TWR",
"frequency": 119900000,
"headset": true,
"rx": true,
"tx": true,
"xc": false,
"xca": false,
"isOutputMuted": false,
"outputVolume": 80
}
},
{
"type": "kStationStateUpdate",
"value": {
"callsign": "SEA_DEL",
"frequency": 128000000,
"headset": true,
"rx": false,
"tx": false,
"xc": false,
"xca": false,
"isOutputMuted": true,
"outputVolume": 80
}
}
]
}
}
Sent when any station starts transmitting.
{
"type": "kTxBegin",
"value": {}
}
Sent when any station stops transmitting.
{
"type": "kTxEnd",
"value": {}
}
Sent when a frequency receives an incoming transmission. The following value properties are sent:
Property | Description |
---|---|
callsign | The callsign making the transmission. |
pFrequencyHz | The frequency of the station receiving the transmission. |
{
"type": "kRxBegin",
"value": {
"callsign": "ASA49",
"pFrequencyHz": 118000000
}
}
Sent when a frequency stops receiving an incoming transmission. The following value properties are sent:
Property | Description |
---|---|
activeTransmitters | Array of callsigns still transmitting. |
callsign | The callsign that stopped transmitting. |
pFrequencyHz | The frequency of the station receiving the transmission. |
{
"type": "kRxEnd",
"value": {
"callsign": "ASA49",
"pFrequencyHz": 118000000
}
}
Sent when the main TrackAudio volume changes. The following value properties are sent:
Property | Description |
---|---|
volume | The current volume. Range is 0-100. |
{
"type": "kMainOutputVolumeChange",
"value": {
"volume": 42
}
}
Warning
This event is only sent for backwards compatibility. New code should track kStationStateUpdate
messages instead.
Sent whenever a station state changes.
{
"type": "kFrequencyStateUpdate",
"value": {
"rx": [
{
"pCallsign": "KSEA_ATIS",
"pFrequencyHz": 118000000
},
{
"pCallsign": "SEA_E_TWR",
"pFrequencyHz": 119900000
}
],
"tx": [],
"xc": []
}
}
The following messages can be sent to TrackAudio to trigger state changes or to request state information.
Starts transmitting on active Tx stations.
{
"type": "kPttPressed"
}
Stops transmitting on active Tx stations.
{
"type": "kPttReleased"
}
Adds the station with the specified callsign to TrackAudio. If the station isn't already in TrackAudio a
kStationAdded
message will be returned once the station is added. If the station is already in TrackAudio
a kStationStateUpdate
message will be returned with the station's current state.
There is no queueing provided by TrackAudio for this message and adding a station can take a few millseconds.
Sending multiple kAddStation
messages in succession without any delay between messages will result in
some stations not getting added successfully. Either wait for the kStationAdded
/kStationStateUpdate
message
to get returned, or add a small delay between each sent message.
The following value properties are supported:
Property | Description |
---|---|
callsign | The callsign of the station to add. Required. |
{
"type": "kAddStation",
"value": {
"callsign": "SEA_TWR"
}
}
Sets the states on the specified station. The following value properties are supported:
Property | Description |
---|---|
frequency | The frequency of the station to set the state on. Required. |
isOutputMuted | The new value for the isOutputMuted state. Can be true , false , or "toggle" . |
rx | The new value for the rx state. Can be true , false , or "toggle" . |
tx | The new value for the tx state. Can be true , false , or "toggle" . |
xca | The new value for the xca state. Can be true , false , or "toggle" . |
headset | The new value for the headset state. Can be true , false , or "toggle" . |
{
"type": "kSetStationState",
"value": {
"frequency": 121700000,
"rx": "toggle"
}
}
Increases or decreases the volume on the specified frequency. The following value properties are supported:
Property | Description |
---|---|
frequency | The frequency of the station to set the state on. Required. |
amount | The amount to adjust the volume by. Range is -100 to 100. |
{
"type": "kChangeStationVolume",
"value": {
"frequency": 121700000,
"amount": -2
}
}
Increases or decreases the main TrackAudio volume. The following value properties are supported:
Property | Description |
---|---|
amount | The amount to adjust the volume by. Range is -100 to 100. |
{
"type": "kChangeMainOutputVolume",
"value": {
"amount": 1
}
}
Returns the current value for the main TrackAudio volume. The response will be a kMainOutputVolumeChange
message.
{
"type": "kGetMainOutputVolume"
}
Returns the current state for the specified station. The following value properties are supported:
Property | Description |
---|---|
callsign | The callsign of the station to get the status for. Required. |
{
"type": "kGetStationState",
"value": {
"callsign": "SEA_GND"
}
}
Returns the current state for all stations in TrackAudio.
{
"type": "kGetStationStates"
}
Warning
The HTTP endpoint is no longer updated or supported. Use the websockets interface instead.
TrackAudio runs an HTTP server on 0.0.0.0:49080.
The following endpoints are implemented
GET /* -> returns 'TrackAudio/0.0.0' with the current version string
GET /transmitting -> returns nothing or a comma delimited list of callsigns which are transmitting. Empty if nothing.
GET /rx -> returns a comma delimited packet of each frequency that is currently on RX, see example. Empty if nothing.
GET /tx -> returns a comma delimited packet of each frequency that is currently on TX, see example. Empty if nothing.
Examples:
GET /transmitting -> EJU1652,LSGG_TWR
GET /transmitting -> AFR007
GET /tx -> LFPG_TWR:118.700,LFMN_APP:134.475
GET /rx -> EGLL_N_TWR:118.700
- HTTPS is not supported
- WSS is not supported