User Tools

Site Tools


oas:api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
oas:api [19.04.2015 15:48] adminoas:api [23.04.2020 22:33] admin
Line 1: Line 1:
-====== OnAirScreen API / Kommandos ======+#### OnAirScreen API / UDP / HTTP Commands 
 +OnAirScreen can receive API commands via UDP default port 3310 or HTTP default port 8010\\ 
 +Here is an easy UDP example on how to control a local OnAirScreen instance on a linux system.
  
-Die API des OnAirScreens wird per UDP angesprochen.Der default Port ist 3310.+Set LED1 Text to "FOO" and switch LED1 on: 
 +``` 
 +echo "CONF:LED1:text=FOO" > /dev/udp/127.0.0.1/3310 
 +echo "LED1:ON" > /dev/udp/127.0.0.1/3310 
 +```
  
-In diesem Beispiel wird angenommen das der default Port 3310 benutzt wird und der OnAirScreen auf localhost (127.0.0.1) läuft:\\ +To remotely control an OnAirScreen from Windows, use the oas_send.exe which is part of the OAS Windows License:
-''echo "CONF:LED1:text=FOO" | nc -w 1 -u 127.0.0.1 3310''\\ +
-''echo "LED1:ON" | nc -w 1 -u 127.0.0.1 3310''\\ +
-dies setzt den Text der 1. LED auf "FOO" und schaltet sie danach ein+
  
-==== Allgemeine Kommandos ====+``` 
 +oas_send.exe --ip 192.168.23.5 "LED1:ON" 
 +```
  
-  * **LED1:[ON|OFF]** \\ schaltet die LED1 ein/aus +##### HTTP API 
-  * **LED2:[ON|OFF]** \\ schaltet die LED2 ein/aus +You can also pass commands to OAS via HTTP. Strings need to be urlencoded.
-  * **LED3:[ON|OFF]** \\ schaltet die LED3 ein/aus +
-  * **LED4:[ON|OFF]** \\ schaltet die LED4 ein/aus +
-  * **NOW:**TEXT      \\ setzt den TEXT in der ersten Fusszeile +
-  * **NEXT:**TEXT     \\ setzt den TEXT in der zweiten Fusszeile +
-  * **WARN:**TEXT     \\ setzt den TEXT und schaltet die Warnungszeile ein (blendet NOW/NEXT aus) +
-  * **AIR1:[ON|OFF]** \\ startet/stoppt den Mic Timer +
-  * **AIR2:[ON|OFF]** \\ startet/stoppt den Phone Timer +
-  * **AIR3:[ON|OFF|RESET|TOGGLE]** \\ startet/stoppt/resettet/toggelt den Radio Timer +
-  * **AIR3TIME:Sekunden** \\ setzt den Radio Timer auf die angegebenen Sekunden +
-  * **AIR4:[ON|OFF|RESET]** \\ startet/stoppt/resettet den Stream Timer +
-  * **CMD:REBOOT**    \\ startet das Betriebssystem neu +
-  * **CMD:SHUTDOWN**  \\ fährt das Betriebssystem herunter +
-  * **CMD:QUIT**      \\ beendet den OnAirScreen+
  
-==== Konfiguration ====+``` 
 +curl http://127.0.0.1:8010/?cmd=LED1:ON 
 +curl http://127.0.0.1:8010/?cmd=NOW:You%20are%20listening%20to%20Queen%20-%20Show%20must%20go%20on 
 +```
  
-  * **CONF:General:stationname=**TEXT + 
-  * **CONF:General:slogan=**TEXT +##### API Commands 
-  * **CONF:General:stationcolor=**COLOR +| UDP Command         | Function | 
-  * **CONF:General:slogancolor=**COLOR +| `LED1:[ON/OFF]`     | switch LED1 on/off | 
-  * **CONF:LED[1-4]:used=[False|True]** +| `LED2:[ON/OFF]`     | switch LED2 on/off | 
-  * **CONF:LED[1-4]:text=**TEXT +| `LED3:[ON/OFF]`     | switch LED3 on/off | 
-  * **CONF:LED[1-4]:activebgcolor=**COLOR +| `LED4:[ON/OFF]`     | switch LED4 on/off | 
-  * **CONF:LED[1-4]:activetextcolor=**COLOR +| `NOW:TEXT`               | set TEXT in first footer line | 
-  * **CONF:LED[1-4]:autoflash=[False|True]** +| `NEXT:TEXT`              | set TEXT in second footer line | 
-  * **CONF:LED[1-4]:timedflash=[False|True]** +| `WARN:TEXT`              | set TEXT and switch on red warning mode | 
-  * **CONF:Clock:digital=[True|False]** +| `AIR1:[ON/OFF]`          | start/stop Mic Timer | 
-  * **CONF:Clock:digitalhourcolor=**COLOR +| `AIR2:[ON/OFF]`          | start/stop Phone Timer | 
-  * **CONF:Clock:digitalsecondcolor=**COLOR +| `AIR3:[ON/OFF/RESET/TOGGLE]` | start/stop/reset/toggle Radio Timer | 
-  * **CONF:Clock:digitaldigitcolor=**COLOR +| `AIR3TIME:seconds`            | set Radio Timer to given value in seconds | 
-  * **CONF:Clock:logopath=**PathToLogo +| `AIR4:[ON/OFF/RESET]`        | start/stop/reset Stream Timer | 
-  * **CONF:Network:udpport=**PORT +| `CMD:REBOOT`                  | OS restart | 
-  * **CONF:Network:tcpport=**PORT +| `CMD:SHUTDOWN`                | OS shutdown | 
-  * **CONF:CONF:APPLY=TRUE**+| `CMD:QUIT`                    | quit OnAirScreen instance | 
 + 
 +##### Remote Configuration Commands 
 +`CONF:General:stationname=TEXT`\\ 
 +`CONF:General:slogan=TEXT`\\ 
 +`CONF:General:stationcolor=COLOR`\\ 
 +`CONF:General:slogancolor=COLOR`\\ 
 +`CONF:LED[1-4]:used=[False|True]`\\ 
 +`CONF:LED[1-4]:text=TEXT`\\ 
 +`CONF:LED[1-4]:activebgcolor=COLOR`\\ 
 +`CONF:LED[1-4]:activetextcolor=COLOR`\\ 
 +`CONF:LED[1-4]:autoflash=[False|True]`\\ 
 +`CONF:LED[1-4]:timedflash=[False|True]`\\ 
 +`CONF:Clock:digital=[True|False]`\\ 
 +`CONF:Clock:showseconds=[True|False]`\\ 
 +`CONF:Clock:digitalhourcolor=COLOR`\\ 
 +`CONF:Clock:digitalsecondcolor=COLOR`\\ 
 +`CONF:Clock:digitaldigitcolor=COLOR`\\ 
 +`CONF:Clock:logopath=PathToLogo`\\ 
 +`CONF:Network:udpport=PORT`\\ 
 +`CONF:Network:tcpport=PORT`\\ 
 +`CONF:CONF:APPLY=TRUE`\\
oas/api.txt · Last modified: 30.01.2023 17:41 by admin