Testing auth connection mqtt
This commit is contained in:
parent
89ccd032a9
commit
1975be4375
@ -28,7 +28,10 @@ export class Communicator {
|
|||||||
|
|
||||||
init(state, config) {
|
init(state, config) {
|
||||||
// Connect to the MQTT Broker
|
// Connect to the MQTT Broker
|
||||||
this.client = mqtt.connect(config.mqtt.address);
|
this.client = mqtt.connect(config.mqtt.address, {
|
||||||
|
username: 'hestia',
|
||||||
|
password: 'hestia'
|
||||||
|
});
|
||||||
const { client } = this;
|
const { client } = this;
|
||||||
|
|
||||||
client.on('connect', () => {
|
client.on('connect', () => {
|
||||||
|
@ -13,7 +13,6 @@ window.onload = async function() {
|
|||||||
})
|
})
|
||||||
.then(data => {
|
.then(data => {
|
||||||
config = data;
|
config = data;
|
||||||
console.log(config);
|
|
||||||
psState.init(config);
|
psState.init(config);
|
||||||
comms.init(psState, config);
|
comms.init(psState, config);
|
||||||
refreshState(window.document, psState);
|
refreshState(window.document, psState);
|
||||||
|
Loading…
Reference in New Issue
Block a user