Question
How to set Online/Offline via Websocket (CogSocket) with In-Sight Vision Suite Cameras
Answer
To be able to change cell value via HTTP Post request at first, we have to openSession and login with admin privileges described in
000001844 How to Open a Session Via Websocket (CogSocket) With In-sight Vision Suite Cameras (https://community.cognex.com/s/article/web-sdk-how-to-open-session-via-websocket)
We're able to set camera online/offline even when camera booted up in offline.
After creating session and login to camera, we have to send following JSON request to go Online
{ "$type": "put", "id": 22, "path": "<SessionID>/softOnline","body": true }
where
<SessionID> - acquired by creating session described in article 000001844

To go Offline we have to send following JSON request
{ "$type": "put", "id": 22, "path": "<SessionID>/softOnline","body": false}
where
<SessionID> - acquired by creating session described in article 000001844
