I try to retrieve data from the Notification service of the Royal Netherlands Meteorological Institute (KNMI), but I do not have any experience with MQTT over Websockets and so this is quite new for me.
Perhaps someone with more experience sees it immediately and can give a hint.
I tried several different settings in the configuration, but the node does not connect and keeps showing "connecting".
I also tried it with MQTT Explorer, but that does not connect either.
I'm able to "ping" the server, so the server is online.
A simple https://mqtt.dataplatform.knmi.nl/ gives a message "Not found".
Your suggestion to remove :443 after the host name and enter it in the port field does not work.
As soon as you put :// in front of the host name, such as ws:// or wss:// the port entry field is disabled (greyed-out)
I also checked https://groups.google.com/g/node-red/c/ByzqoQdkGMI, where Nick said, in fact, the MQTT over Websocket does not exist in Node-RED. This is approx 6 years ago and the time might have been changed since then. However I never saw the PR from Jacobo del Bosque.
It does work (I'm certain ) but I'm not in a position to try it out to show you. Will be home later. Hopefully someone will pop by with a quick how to before then.
Note: you will need to send me (private message (click my avatar->message)) with details of your MQTT server if you want me to try for you.
After a small modification of the script and inserting the CLIENT_ID and the TOKEN I got a positive result. I had to add the shebang (#!/usr/bin/python3)
The result:
Yes, as soon as you insert :// in front of the hostname, such as ws:// or wss:// the port field is disabled. Therefore I found the suggestion to add the port after the hostname.
See links above.
However playing with this gives not any results and it ends even in a crash of Node-RED.
If you need a temporary work around, you could set up a local broker. Talk to that over mqtt. Then get it to talk to the remote broker over websockets.
I have certainly had this working, though I don't have a working wss server at the moment. Looking at the server node setup I see that I entered the the port number in the same way you have, but it also shows as greyed out in the port field. I assume that I entered that field before filling in the url. That should not make a difference but you never know.
Can you show us the crash please? In fact start node red in a command window and show us the full node red startup output up to the crash.