Receive device status via websocket
AnsweredIs there a way to receive device updates and status via websocket on the NX mediaserver? We would like to receive events such as camera offline/online, camera added to system, deleted from system, camera updates such as name changes, etc. I looked through the documentation and could not find this.
-
Hi Jackson ,
Please refer to the description of json-rpc mechanism supported by the Media Server:
https://meta.nxvms.com/doc/developers/api-tool/json-rpc
It effectively allows you to subscribe to any changes within the selected namespace converted from the given REST API method.
There is also a method to gather information about all the devices in the current system:
https://meta.nxvms.com/doc/developers/api-tool/rest-v3-devices-get
Thus, converting this method info into the expected json-rpc message:
{"jsonrpc": "2.0", "id": 0, "method": "rest.v3.devices.list.subscribe", "params": {}}
You might want to modify the “params” value based on what you would like the feed to look like.
0
Please sign in to leave a comment.
Comments
1 comment