This article is dedicated to Miris Box integrators and administrators who need to control stations using the Miris API.
As a reminder, this API is accessible via HTTP, Websockets and TCP (on port 6666 by default). It is also available via RS232 if it is activated and if the hardware allows it.
Let's now see how to check that the connection to Miris via TCP is working.
The virtual terminal must be used to launch a TCP connection test command
Prerequisites
First, you need to activate the Miris TCP API via the Settings tab > Configuration > Advanced settings > API:
TCP connection test
Once the API has been activated, connect to the Miris station terminal using another Miris Box on the same subnet. Reading the "Miris diagnostics" article in the "Command line" chapter will help you make this connection.
For example, if the password for the ubicast account is admin, we can enter the command line below with the IP of the Miris station (here 10.0.0.7) for which the TCP API has been activated. In this case, we will use the Miris API call /api/system/get_state which retrieves information about the state of the station:
echo "/api/system/get_state*token=$(echo -n admin | sha1sum | awk -e '{print $1}')\r" | socat - tcp:10.0.0.7:6666
If the connection is established, you will get :
/api/system/get_state*success=True*time=2024-07-26T14:53:39.410929+02:00*free_space_bytes=90803716096*total_space_bytes=97373327360*hostname=ubi-box-54b2030ea259*friendly_name=ubi-box-54b2030ea259*gpu_connected=False*filesystems_dirty=False*settings_locked=False
If the password is incorrect, you will get this message:
/api/system/get_state*success=False*error=Authentication error
We hope you have found this article useful. Please feel free to consult the documentation on configuring recording profiles for further information.
Comments
0 comments
Please sign in to leave a comment.