question

Upvotes
1 0 0 0

RTDS Connection with DACS user through websocket

Hi I'm trying to find an example where the connection to RRTO is through a RTDS/TREP whith the DACS user but all uses the machine id, password, and client id

Is there a way to connect to the RTDS though websocket with a DACS user?
im using python or node

The EMA examples for Java works but i'm not able to replicate the connection through a ws:// or wss:// protocol

#technologytrepema-apiwebsocketsrrtoDACS
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
87k 294 53 79

@carlosrodrigo.arce01

Thank you for reaching out to us.

The WebSocket examples avialble on GitHub.

The DACS user is specified in the login request.

def send_login_request(ws):
    """ Generate a login request from command line data (or defaults) and send """
    login_json = {
        'ID': 1,
        'Domain': 'Login',
        'Key': {
            'Name': '',
            'Elements': {
                'ApplicationId': '',
                'Position': ''
            }
        }
    }


    login_json['Key']['Name'] = user
    login_json['Key']['Elements']['ApplicationId'] = app_id
    login_json['Key']['Elements']['Position'] = position


    ws.send(json.dumps(login_json))
    print("SENT:")
    print(json.dumps(login_json, sort_keys=True
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
27.7k 67 18 14

Hello @carlosrodrigo.arce01

About the "The EMA examples for Java works but i'm not able to replicate the connection through a ws:// or wss:// protocol" message, does your RTDS enable the WebSocket connection?

If your ADS server has been configured the WebSocket connection, an application should be able to connect via the following WebSocket URL (for the default non-encrypted ADS connection):

ws://ADS_Host:WebSocket_Port/WebSocket


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.