add state command for websocket connection