I’ve been trying to test the websocket interface to verify that it’s even running but not having any success. I’ve tried using curl as follows:
curl -i -N -H "GET / HTTP/1.1" -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: 192.168.1.19" -H "Origin: http://192.168.1.19" http://192.168.1.19
I get a:
curl: (52) Empty reply from server
I tried the websocket-io-tester from appsaloon.github.io and get no response.
I wrote a python script to test it:
async def hello():
async with websockets.connect(‘ws://192.168.1.19’) as websocket:
name = input("What's your name? ")
greeting = await websocket.recv()
It pukes with:
Traceback (most recent call last):
File "/home/alan/.local/lib/python3.5/site-packages/websockets/client.py", line 79, in handshake
status_code, headers = yield from read_response(self.reader)
File "/home/alan/.local/lib/python3.5/site-packages/websockets/http.py", line 65, in read_response
status_line, headers = yield from read_message(stream)
File "/home/alan/.local/lib/python3.5/site-packages/websockets/http.py", line 83, in read_message
start_line = yield from read_line(stream)
File "/home/alan/.local/lib/python3.5/site-packages/websockets/http.py", line 107, in read_line
raise ValueError("Line without CRLF")
ValueError: Line without CRLF
This all leads me to believe that the websocket plugin is not running / installed. It doesn’t show up in the Plugins menu on the web browser. Is there something that needs to be done to enable the websocket interface?
I’m running System Version 2.201 Released: Tue Jun 13 21:31:16 CEST 2017.