--- title: "Nexmosphere" slug: "nexmosphere" updated: 2025-04-29T10:01:16Z published: 2025-04-29T10:01:16Z canonical: "support.dise.com/nexmosphere" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.dise.com/llms.txt > Use this file to discover all available pages before exploring further. # Nexmosphere ## Connect a Nexmosphere device - Connect the Nexmosphere to a media player via USB. - Test the connection via a 3rd party software: - Termite. - Additional drivers may be required. --- ## Connect a Nexmosphere Device to Dise ### Premium - [Download](/docs/downloads) and [install](/docs/windows) the Premium player. - [Create a Display](/docs/create-a-display) on the CX Portal. ### CX Composer - [Download](/docs/downloads) and [install](/docs/set-up-the-cx-composer) the CX Composer. - [Connect the Composer to the CX Portal](/docs/connect-composer-to-cx-portal). ### Scripts Connect the Nexmosphere device to a Premium player using the relevant COM port: ```python import serial ser = serial.Serial( port='COM3',\ baudrate=115200,\ parity=serial.PARITY_NONE,\ stopbits=serial.STOPBITS_ONE,\ xonxoff=True,\ bytesize=serial.EIGHTBITS,\ timeout=0) print("connected to: " + ser.portstr) count=1 ``` Read the signal commands being sent: ```python for line in ser.read(): time.sleep(0.5) packet = ser.readline() packet_clean = (packet.decode('utf').rstrip()) print(packet.decode('utf').rstrip()) ``` Close the termite connection before starting Dise. Only one connection can be opened over a single COM port at any time.  --- ## Control Dise Using the Nexmosphere Device 1. Use [triggers](/docs/triggers) within a script to control what content plays. 2. The [Dise methods library](/docs/dise-methods-library) can be used in the script for further controls. 3. [Connect the script](/docs/connect-a-script) to the media player by adding it to a Dise movie. 4. Upload the Dise movie to the CX Portal Run the script as a background or transparent layer.Example script: ```python import serial import time loglevel = 'Warning' #Connects to the serial port, Port can change to something else but the rest should be ok if using Nexmosphere ser = serial.Serial( port='COM3',\ baudrate=115200,\ parity=serial.PARITY_NONE,\ stopbits=serial.STOPBITS_ONE,\ xonxoff=True,\ bytesize=serial.EIGHTBITS,\ timeout=0) #Prints out what port we are connected to print("connected to: " + ser.portstr) count=1 while DISEScript.ProcessEvents(1000) != 'Terminated': for line in ser.read(): #Checks that the script is running and looking for packages DISEScript.Log(loglevel, 'Looking for relevant packages!') #Slows down the read of the packages to not overload the script, can be adjusted and probably lowered a bit for faster triggering time.sleep(0.5) #Reads the package and puts it in the variable 'Packet' packet = ser.readline() #Cleans the packet by decoding it as utf for readability packet_clean = (packet.decode('utf').rstrip()) #Uncomment line below to see all packets that come in. #DISEScript.Log(loglevel, packet.decode('utf').rstrip()) #Triggering part of the script, change the packetname to trigger based on different events on the Nexmosphere board #Can use the logging part above to log all packets to see what the name for the different packets are and just read that in diselog #Disescript.settrigger toggles the trigger set on player, "MAGNETIC_SENSOR" for example. Needs to be changed to the name of your triggers #Triggers based on the Magnetic pick-up sensor, [7] is when you detach it [4] is when you put it back. On [4] we trigger the image off if packet_clean == '003A[7]': DISEScript.SetTrigger("MAGNETIC_SENSOR", True) if packet_clean == '003A[4]': DISEScript.SetTrigger("MAGNETIC_SENSOR", False) #Trigger based on the RFID sensor, 007A[0] is if it is put on the senor and the [1] is if it has been removed and then we trigger off if packet_clean == '007A[0]': DISEScript.SetTrigger("RFID_1", True) if packet_clean == '007A[1]': DISEScript.SetTrigger("RFID_1", False) #Trigger based on the Buttons Clicking the left button will trigger it on, clicking the right button will trigger it off if packet_clean == '001A[17]': DISEScript.SetTrigger("BUTTON", True) if packet_clean == '001A[3]': DISEScript.SetTrigger("BUTTON", False) #Trigger based on the Light sensor, lifting it will trigger it on and putting it back will trigger it off if packet_clean == '006A[3]': DISEScript.SetTrigger("LIGHT_SENSOR", True) if packet_clean == '006A[0]': DISEScript.SetTrigger("LIGHT_SENSOR", False) ser.close() ```