====== Drive the OnAirScreen ON AIR LED from mAirList ======
[[https://www.mairlist.com/en/products/radio-automation/|mAirList]] can turn OnAirScreen **LED1** (factory label **ON AIR**) when the **mixer** reports channel on / GPI / fader start — or, separately, when mAirList itself goes on air.
This is **not** the current-title howto. Titles: [[onairscreen:mairlist-en|Show the current mAirList title on OnAirScreen]].
API reference: [[oas:api|OnAirScreen API / UDP / HTTP / MQTT]]\\
Mixer GPI on a Raspberry Pi (no playout in between): [[onairscreen:manual-en|User Manual]] (GPIO)\\
mAirList: [[https://wiki.mairlist.com/config:remotecontrol:sas|SAS GPI]], [[https://wiki.mairlist.com/config:remotecontrol:axia|Axia GPIO]], [[https://wiki.mairlist.com/config:remotecontrol:dhd|DHD]], [[https://wiki.mairlist.com/reference:remote_control_commands|remote commands]] (''RUNSCRIPT'')
===== Two different “on air” signals =====
^ Signal ^ What it is ^ Use for LED1? ^
| Mixer GPI / fader / channel ON | Mic or channel live on the desk | **Yes** — this is the studio lamp |
| mAirList ''ON AIR'' / ''OnOnAir'' | Playout is in on-air **mode** (this machine is live) | Only if you want the lamp to follow **software** on-air, not the fader |
Do not wire ''OnOnAir'' if you need the lamp to follow the **mic fader**.
===== What OnAirScreen expects =====
^ Channel ^ Target (default) ^ Example ^
| HTTP | Port **8010** | ''http://OAS-IP:8010/?cmd=LED1:ON'' |
| UDP | Port **3310** | ''LED1:ON'' |
Same pattern for off: ''LED1:OFF''. Other lamps: ''LED2:ON'' (PHONE), and so on. Factory GPIO mapping on the Pi is GPI1 to LED1.
On **Windows** test with ''oas_send.exe'' from the OnAirScreen license:
oas_send.exe --ip 192.168.23.5 "LED1:ON"
oas_send.exe --ip 192.168.23.5 "LED1:OFF"
If OnAirScreen runs on **the same PC**, use ''127.0.0.1''. Firewall: TCP **8010** (HTTP) or UDP **3310**.
===== Recommended path: mixer GPI to RUNSCRIPT to HTTP GET =====
mAirList can assign a **remote control command** to a console GPI going on and off (SAS **GPI** tab, Axia **GPO Events**, DHD logic / fader-start as documented for your remote). Those commands are mAirList verbs, not URLs — so the GPI runs a tiny script that HTTP-GETs OnAirScreen.
**1.** Save two scripts (''.mls''), e.g. ''C:\Scripts\oas_led1_on.mls'':
begin
HTTPGetAsync('http://192.168.23.5:8010/?cmd=LED1:ON');
end.
and ''oas_led1_off.mls'' with ''LED1:OFF''. Use ''HTTPGetAsync'' so the playout thread does not wait on the network. [[https://wiki.mairlist.com/config:remotecontrol:rest|Script HTTPGet / HTTPGetAsync]]
**2.** On the mixer remote, GPI **on** to command:
RUNSCRIPT C:\Scripts\oas_led1_on.mls
GPI **off** to ''oas_led1_off.mls''. [[https://wiki.mairlist.com/reference:remote_control_commands|RUNSCRIPT]]
Replace the GPI index / pin with the desk mic or on-air tally (SAS GPOs labelled GPO.OAC, Axia ON/OFF pins, DHD fader-start / channel logic). You can keep the existing “start player” command and **add** ''RUNSCRIPT'' with a semicolon: ''PLAYER 1-1 START; RUNSCRIPT C:\Scripts\oas_led1_on.mls''.
===== Option B — SAS script events =====
With the **SAS** remote, a **background script** can hook the GPI without ''RUNSCRIPT'' on each pin:
procedure OnSASGPIOn(Remote: ISASRemote; GPI: byte);
begin
if GPI = 1 then
HTTPGetAsync('http://192.168.23.5:8010/?cmd=LED1:ON');
end;
procedure OnSASGPIOff(Remote: ISASRemote; GPI: byte);
begin
if GPI = 1 then
HTTPGetAsync('http://192.168.23.5:8010/?cmd=LED1:OFF');
end;
Register the file under **Configuration → Background Scripts**. ''GPI = 1'' is an example — match the console pin you use for mic live. [[https://wiki.mairlist.com/config:remotecontrol:sas|OnSASGPIOn / OnSASGPIOff]]
===== Option C — mAirList on-air mode (not the mixer) =====
Only if the lamp should follow **mAirList** on-air, not the fader:
procedure OnOnAir;
begin
HTTPGetAsync('http://192.168.23.5:8010/?cmd=LED1:ON');
end;
procedure OnOffAir;
begin
HTTPGetAsync('http://192.168.23.5:8010/?cmd=LED1:OFF');
end;
Background script, same as above. Community (LEDs via UDP/scripts): [[https://community.mairlist.com/t/ansteuerung-des-onairscreen/|Ansteuerung des OnAirScreen]]
===== Notes =====
* OnAirScreen does **not** poll mAirList REST ''/status/onair''. That URL is for **other** software to read mAirList, not to drive the lamp.
* Raspberry Pi with a desk contact: GPIO in the [[onairscreen:manual-en|User Manual]] is shorter than going through mAirList.
* Questions: [[https://www.astrastudio.de/kontakt/|Contact]]
===== Other LED howtos =====
[[onairscreen:mairlist-led-en|mAirList]] · [[onairscreen:proppfrexx-led-en|ProppFrexx]] · [[onairscreen:myriad-led-en|Myriad Playout]] · [[onairscreen:playoutone-led-en|PlayoutONE]] · [[onairscreen:rodecaster-pro-ii-led-en|RØDECaster Pro II (MIDI)]]
Titles: [[onairscreen:mairlist-en|mAirList]] · [[onairscreen:radioboss-en|RadioBOSS]] · [[onairscreen:radiodj-en|RadioDJ]] · [[onairscreen:playoutone-en|PlayoutONE]] · [[onairscreen:stationplaylist-en|StationPlaylist]] · [[onairscreen:proppfrexx-en|ProppFrexx]] · [[onairscreen:myriad-en|Myriad Playout]] · [[onairscreen:zetta-en|RCS Zetta]]