• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    [ANSWERED] trigger a telnet comand

    How To... ?
    3
    6
    535
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      deflost last edited by Woland

      hello, we have to send some simple telnet commands from isadora to obsidian onyx lighting control software. onyx is receiving telnet commands on port 23 on a pc with win10.

      we checked it with win enbedded telnet client. we have to open a telnet connection, and then we are able to send commands like "clrclr" (clesr,clesr) and "gql 1,4" (go to cuelist 1, cue number 4) to the ip of the onyx machine on port 23.

      the problem for us here is the starting point in isadora. isadora is our main switch unit so we have to trigger from there. and onyx do not allow direct cue calling with midi or osc.

      do we have to ask some phyton developer, do we have to learn java, is it enought to buy isadora 4, because there is an telnet send actor?

      or maybe someone here can help us?

      thx.

      xmg schenker laptop,clevo board, rtx 3080ti, i9, 32gb.
      windows 11

      Juriaan DusX 2 Replies Last reply Reply Quote 0
      • D
        deflost last edited by deflost

        hello, we get this, so we think we open the connection, but no command transfer.

        thx.

        xmg schenker laptop,clevo board, rtx 3080ti, i9, 32gb.
        windows 11

        D 1 Reply Last reply Reply Quote 0
        • D
          deflost @deflost last edited by

          @deflost

          xmg schenker laptop,clevo board, rtx 3080ti, i9, 32gb.
          windows 11

          1 Reply Last reply Reply Quote 0
          • Juriaan
            Juriaan Tech Staff @deflost last edited by

            @deflost

            Hi there! Could you give me a bit more information regarding the specific Onyx desk that you have to your disposal?
            Since OSC is a protocol that most Onyx desks support, especially if you have a network port.

            And if that is not an option and your device has a MIDI port, I would personally send MSC (Midi Show Commands) to the desk. Since that is natively supported in Isadora.

            Isadora 3.1.1, Dell XPS 17 9710, Windows 10
            Interactive Performance Designer, Freelance Artist, Scenographer, Lighting Designer, TroikaTronix Community moderator
            Always in for chatting about interaction in space / performance design. Drop me an email at hello@juriaan.me

            1 Reply Last reply Reply Quote 0
            • DusX
              DusX Tech Staff @deflost last edited by DusX

              @deflost said:

              If you have Isadora 4 and the new Pythoner actor you can create a Telnet client inside Isadora and send the commands to your client as you wish.

              I haven't been able to test this script. If you have Isadora 4 and wish to use this method, please let me know and I will setup a test environment to ensure the script is complete.

              import telnetlib  # Telnet library to handle Telnet communication (part of the standard Python library)
              # Define Pythoner inputs and outputs
              # iz_input 1 "command"
              # iz_input 2 "trigger"
              # iz_output 1 "status"
              # Define global variables
              TELNET_IP = "192.168.1.100"  # Replace with the IP address of the Onyx machine
              TELNET_PORT = 23  # Default Telnet port
              CONNECTION_TIMEOUT = 10  # Timeout for the Telnet connection
              # Initialize variables
              telnet_connection = None
              def python_init(command, trigger):
                  """
                  This function initializes the Telnet connection.
                  """
                  global telnet_connection
                  try:
                      telnet_connection = telnetlib.Telnet(TELNET_IP, TELNET_PORT, CONNECTION_TIMEOUT)
                      return "Initialized"
                  except Exception as e:
                      return f"Initialization failed: {e}"
              def python_main(command, trigger):
                  """
                  This function sends the command over Telnet when triggered.
                  """
                  global telnet_connection
                  if trigger:
                      if not telnet_connection:
                          return "Error: No connection. Initialize first."
                      try:
                          telnet_connection.write(command.encode('ascii') + b"\n")
                          return f"Command sent: {command}"
                      except Exception as e:
                          return f"Error sending command: {e}"
                  else:
                      return "Waiting for trigger"
              def python_finalize():
                  """
                  This function closes the Telnet connection.
                  """
                  global telnet_connection
                  if telnet_connection:
                      try:
                          telnet_connection.close()
                          return "Connection closed"
                      except Exception as e:
                          return f"Error closing connection: {e}"
                  return "Finalize completed"
              if __name__ == "__main__":
                  """
                  This block allows the script to run in an IDE for testing.
                  It is not executed within the Pythoner actor in Isadora.
                  """
                  test_command = "clrclr"
                  python_init(test_command, True)
                  print(python_main(test_command, True))
                  python_finalize()
              

              The above script should be able to be cut and paste into Pythoner (some indenting may need to be corrected. Be sure to select all, as white space is important in Python). It will provide 2 inputs, one that will take your telnet command, and the other to send the command. 

              NOTE: I suspect that due to the way a Telnet client is created, that you can use only one of these at a time, since it will 'own' the port and raise an error is another client tries to use the same ip/port.

              Troikatronix Technical Support

              • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
              • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
              • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

              Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

              D 1 Reply Last reply Reply Quote 0
              • D
                deflost @DusX last edited by

                @dusx hello, and super thank you.

                the reason for all this is, that onyx is not able to get direct order to jump to a  specific cue via midi or osc. it is simply not possible. but with telnet it is. it does not depend on pc or console, so we will test your script and ask for more support. maybe you can test it for us. because we are verÿ bad in coding.

                it would be ok for us to use only one client connection to onyx, because isadora is our main control hub. thx.

                xmg schenker laptop,clevo board, rtx 3080ti, i9, 32gb.
                windows 11

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post