this question is a reformulation (and simplification) of a precedent question which doesn't interest the community (Different behaviors with 2 different Websocket APIs but same request).
I am trying to communicate with a server on my local network thanks to Websockets but I am a real noob.
Currently, I am stuck because I don't have the same behaviour when I am doing (or trying to do) the same thing with "wscat" in bash and "websocket" lib in python.
$ wscat -c $serveur_address -n
Connected (press CTRL+C to quit)
< {[...]"token":"11235326"[...]}
>
>>> import websocket, ssl
>>> uri = 'server_address'
>>> ws = websocket.create_connection(uri, sslopt={"cert_reqs": ssl.CERT_NONE})
>>> ws.recv()
... infinite wait
With wscat I receive immediately a response containing a token to use for next connection.
But with websocket in python, no response at all.
Is there differences between those two creations of Websocket ?
Edit: In both cases the server_address is 'wss://192.168.1.20:8002/api/v2/channels/samsung.remote.control?name=dGVzdA=='
I assumed that giving a wss address is in both cases automatically detected as a secure websocket request.