davglass / bambu-farm

BambuLab Web Interface for multiple printers
Other
92 stars 14 forks source link

Web MQTT Help with Connection Issues #3

Open lunDreame opened 10 months ago

lunDreame commented 10 months ago

Hi friend, I am making a website that shows a simple Bambu firmware status. Get the mqttws31 module that is popular for MQTT connections from the website

var client = new Paho.MQTT.Client(ipAddress, 'web-client-' + new Date().getTime());

var options = { onSuccess: onConnect, onFailure: onFailure, useSSL: false, userName: 'bblp', password: accessCode, mqttVersion: 3, };

I satted the MQTT like above. But the web MQTT module realized that the protocol is ws/s://, not mqtt/s://. Bambu does not support ws/s. How can I connect the Bambu printer to MQTT on the web? Tell me how to do it