Skip to content

Commit da9682e

Browse files
authored
Merge pull request #2732 from benderl/colors
colors web theme: fix mqtt connection settings
2 parents 60f525c + edf7369 commit da9682e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • packages/modules/web_themes/colors/source/src/components/mqttViewer

packages/modules/web_themes/colors/source/src/components/mqttViewer/mqttClient.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { type QoS } from 'mqtt-packet'
1010
const defaultQoS: QoS = 0
1111
const mqttConnection = {
1212
host: location.hostname,
13-
port: location.protocol == 'https:' ? 443 : 80,
13+
port: parseInt(location.port) || (location.protocol == 'https:' ? 443 : 80),
1414
endpoint: '/ws',
1515
protocol: (location.protocol == 'https:' ? 'wss' : 'ws') as MqttProtocol,
1616
clean: true,
@@ -20,8 +20,6 @@ const mqttConnection = {
2020
.toString(36)
2121
.replace(/[^a-z]+/g, '')
2222
.substring(0, 6),
23-
username: 'openWB',
24-
password: 'openWB',
2523
}
2624
const subscription = {
2725
topic: '',

0 commit comments

Comments
 (0)