Hi!
The inputs that are configured here are the inputs to connect to the Motorcortex application. If you can connect via shh and perform sudo motorcortex restart, you have the username and the password.
When you ssh you do ssh LOGIN@192.168.2.100, where login is the username. By default this is admin.
After running the command sudo motorcortex restart, you will be prompted for the password. By default this is vectioneer.
These are the logins you can use to connect to the Motorcortex application.
Thus, it will look like (with default parameters):
# import the motorcortex library
import motorcortex
IP_ADDRESS = "wss://192.168.2.100"
PATH_TO_CERTIFICATE = "/Users/miguelbasto/mcx.cert.crt"
LOGIN = "admin"
PASSWORD = "vectioneer"
# Create a parameter tree object
parameter_tree = motorcortex.ParameterTree()
# Open request and subscribe connection
try:
req, sub = motorcortex.connect(IP_ADDRESS, motorcortex.MessageTypes(), parameter_tree,
certificate=PATH_TO_CERTIFICATE, timeout_ms=1000,
login=LOGIN, password=PASSWORD)
tree = parameter_tree.getParameterTree()
print(f"Parameters: {tree}")
except RuntimeError as err:
print(err)
Hopefully, you can connect now.
Coen Smeets