Specify MQTT not WS

This commit is contained in:
Skylar Grant 2024-11-28 15:58:45 -05:00
parent dafce39a24
commit 6871b0d1c8
2 changed files with 5 additions and 1 deletions

View File

@ -74,7 +74,10 @@ export class Communicator {
// Connect to the MQTT Broker // Connect to the MQTT Broker
console.log(`Attempting MQTT connection to broker: ${config.mqtt.address}`); console.log(`Attempting MQTT connection to broker: ${config.mqtt.address}`);
this.client = mqtt.connect(config.mqtt.address, { this.client = mqtt.connect(config.mqtt.address, {
port: config.mqtt.port port: config.mqtt.port,
protocol: config.mqtt.protocol,
username: config.mqtt.username,
password: config.mqtt.password
}); });
const { client } = this; const { client } = this;

View File

@ -5,6 +5,7 @@ const config = {
"username": "hestia", "username": "hestia",
"password": "hestia", "password": "hestia",
"port": 1883, "port": 1883,
"protocol": "mqtt",
"topics": { "topics": {
"igniter": "hestia/status/igniter", "igniter": "hestia/status/igniter",
"exhaust": "hestia/status/exhaust", "exhaust": "hestia/status/exhaust",