Add the following lines to /etc/mosquitto/mosquitto.conf in the “Default Listener” section:


 port 1883
 listener 9001
 protocol websockets