Anytime Help Center

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support
  • Guest
  • Log In
English (US)
US English (US)
DE German
CN Chinese
MX Spanish (Mexico)
Chinese (Simplified)
  • AKG
    Microphones Wireless Integrated Systems Automatic Mixers Headphones Discontinued Products (AKG) General AKG Inquiries Certifications (AKG)
  • AMX
    Networked A/V Distribution (AVoIP) Traditional A/V Distribution Video Signal Processing Architectural Connectivity User Interfaces Control Processing Power (AMX) Programming (AMX) Software (AMX) Discontinued Products (AMX) General AMX Inquiries Certifications (AMX)
  • BSS
    Soundweb™ Omni Soundweb™ London Soundweb™ Contrio™ Software (BSS) Discontinued Products (BSS) General BSS Inquiries Certifications (BSS)
  • Crown
    CDi DriveCore Series CDi Series Commercial Series ComTech Series DCi DriveCore Series I-Tech HD Series XLC series XLi Series XLS DriveCore 2 Series XTi 2 Series Discontinued Products (Crown) Software (Crown) General Crown Inquiries Certifications (Crown)
  • dbx
    CX Series 500 Series DriveRack Personal Monitor Control ZonePRO Zone Controllers FeedBack Suppression Microphone Preamps Dynamics Processors Crossovers Equalizers Software (dbx) Discontinued Products (dbx) General dbx Inquiries Certifications (dbx)
  • Flux::
    Immersive Processing Analysis Subscriptions
  • JBL
    Cinema Sound Installed Live Portable Tour Sound Recording & Broadcast Software (JBL) Discontinued Products (JBL) Video Manual Series (JBL) General JBL Inquiries Certifications (JBL)
  • Lexicon
    Plugins Effects Processors Cinema Discontinued Products (Lexicon) Video Manual Series (Lexicon) General Lexicon Inquiries Certifications (Lexicon)
  • Martin
    Atomic ELP ERA Exterior MAC P3 VC VDO Tools Discontinued Products (Martin) General Martin Inquiries Certifications (Martin)
  • Soundcraft
    Digital Analog Connected Analog Only Discontinued Products (Soundcraft) Video Manual Series (Soundcraft) General Soundcraft Inquiries Certifications (Soundcraft)
  • General HARMAN Inquiries
    Dante
+ More
  • Home
  • AMX
  • Control Processing
  • Central Controllers
  • MU-Series Controller

Controlling MUSE IR Ports with Python Code

Written by Mariana Ramirez

Updated at January 12th, 2026

​The below Python code controls IR ports on a MUSE controller.  It contains code that configures the ports, sends IR commands, and also uses one IR port as a one-way serial device.

MUSE IR Example


from mojo import context
context.log.info('*** Python Script Start ***')
############ Create devices and organize them ###################
idevice = context.devices.get('idevice')
ir1 = idevice.ir[0]
ir2 = idevice.ir[1]
ir3 = idevice.ir[2]
ir4 = idevice.ir[3]
dvTP = context.devices.get('AMX-12345')
irPorts = [ir1, ir2, ir3, ir4]
#################################################################

#################### Configuring IR ports #######################
### Enable Fault Detection on all IR ports
for port in irPorts:
   port.enableFaultDetection()
### Creates function to handle IR fault errors
def handle_ir_faults(event):
   print(f"Received fault from {event.path['data']}: {event.arguments['data']}")
for port in irPorts:
   port.fault.listen(handle_ir_faults)
### Set Port 1 on/off times to 500 milliseconds
ir1.setOnTime(500)
ir1.setOffTime(500)
### Set carrier mode on for Port 2
ir2.carrier.value = True
### Set keypadMode 1 for Pot 3
ir3.keypadMode(1)
### Set IR Port 4 for Serial mode and set communication parameters
ir4.mode.value = "SERIAL"
ir4.setCommParams("9600", 8, 1, "NONE", "232") 
#################################################################

######################### IR Functions ##########################
### Pulsing an IR port via channel number
def channelPulse(event):
   ir1.bufferedSendIr(1)
### Pulsing an IR port via function Name
def namePulse(event):
   ir2.bufferedSendNamedIr("PLAY")
### Sending a channel input using the keypad macro
def keypadMacro(event):
   ir3.keypadMacro(325)
### Sending a one-way serial string
def oneWaySerial(event):
   ir4.send("POWR ON")
### Clear and send via channel
def clearSendChannel(event):
   ir1.clearAndSendIr(2)
### Clear and send via name
def clearSendName(event):
   ir2.clearAndSendNamedIr("STOP")
### Continuous via channel (remember to turn this off)
def onIr(event):
   ir1.onIr(16)
### Continuous via name (remember to turn this off)
def onNamedIr(event):
   ir1.onNamedIr(27)
### Turn off IR on the port
def offIr(event):
   ir1.offIr()
### Load IR file via code
def loadIrFile(event):
   ir1.loadIrFile("SamsungE750.irl")
################################################################

################ Creating Button Watch Events ##################
dvTP.port[1].button[1].watch(channelPulse)
dvTP.port[1].button[2].watch(namePulse)
dvTP.port[1].button[3].watch(keypadMacro)
dvTP.port[1].button[4].watch(oneWaySerial)
dvTP.port[1].button[5].watch(clearSendChannel)
dvTP.port[1].button[6].watch(clearSendName)
dvTP.port[1].button[7].watch(onIr)
dvTP.port[1].button[8].watch(onNamedIr)
dvTP.port[1].button[9].watch(offIr)
dvTP.port[1].button[10].watch(loadIrFile)
################################################################
# leave this as the last line in the Python script
context.run(globals())

Related Videos

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Controlling MUSE Serial Ports with Python Code

Related Articles

  • Controlling MUSE Serial Ports with Python Code
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand