Connecting through websocket



  • Hi,

    I would like connect to the system through websocket. I have tried out the example in https://github.com/UniPiTechnology/evok ... -websocket here using my ip address. I am getting the below error. Please help.

     ws.connect(url)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/websocket_client-0.35.0-py2.7.egg/websocket/_core.py", line 272, in connect
        self.handshake_response = handshake(self.sock, *addrs, **options)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/websocket_client-0.35.0-py2.7.egg/websocket/_handshake.py", line 67, in handshake
        status, resp = _get_resp_headers(sock)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/websocket_client-0.35.0-py2.7.egg/websocket/_handshake.py", line 123, in _get_resp_headers
        raise WebSocketBadStatusException("Handshake status %d", status)
    websocket._exceptions.WebSocketBadStatusException: Handshake status 404
    


  • Hi,

    I would like connect to the system through websocket. I have tried out the example in https://github.com/UniPiTechnology/evok ... -websocket here using my ip address. I am getting the below error. Please help.

     ws.connect(url)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/websocket_client-0.35.0-py2.7.egg/websocket/_core.py", line 272, in connect
        self.handshake_response = handshake(self.sock, *addrs, **options)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/websocket_client-0.35.0-py2.7.egg/websocket/_handshake.py", line 67, in handshake
        status, resp = _get_resp_headers(sock)
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/websocket_client-0.35.0-py2.7.egg/websocket/_handshake.py", line 123, in _get_resp_headers
        raise WebSocketBadStatusException("Handshake status %d", status)
    websocket._exceptions.WebSocketBadStatusException: Handshake status 404
    


  • Could you provide the code you are using? And please use```
    syntax when posting code to the forum



  • Do not forget to install this package or python websocket method does not work

    https://www.howtoinstall.co/en/debian/jessie/main/python-websocket/

    this was what worked me, I hope you serve you too.

    good luck.