Closed flyisland closed 11 months ago
Hello @flyisland, thank your for using the MQTT-CLI!
Can you please try:
mqtt pub -h "localhost" -p 8000 -t abc -m "hello mqtt" -r -ws
If you want to add a WebSocket path to you can use -ws:path
Unfortunately the MQTT-CLI uses single dash multi letter options which is very unusual and far from ideal...
I fixed the documentation to reflect the current state of the option as it showed the wrong--ws
and there is already a ticket to improve on the naming conventions of some options.
@LukasBrand, thanks, "-ws" works.
Expected behavior
Connecting to "ws://localhost:8000"
Actual behavior
❯ mqtt pub -h "ws://localhost:8000" -t abc -m "hello mqtt" -r Unable to connect. Reason: 'ws://localhost:8000: nodename nor servname provided, or not known'
❯ mqtt pub -h "ws://localhost" -p 8000 -t abc -m "hello mqtt" -r Unable to connect. Reason: 'ws://localhost: nodename nor servname provided, or not known'
❯ mqtt pub -h "localhost" -p 8000 -t abc -m "hello mqtt" -r Unable to connect. Reason: 'Connection refused'
❯ mqtt pub -h "localhost" -p 8000 -t abc -m "hello mqtt" -r --ws Unknown option: '--ws' Try 'mqtt pub --help' for more information.
To Reproduce
Steps
See above steps please
Reproducer code
Details