diff --git a/public/demoData/demo.json b/public/demoData/demo.json
index 99c6238..164573b 100644
--- a/public/demoData/demo.json
+++ b/public/demoData/demo.json
@@ -42,6 +42,7 @@
"matrixType": 4,
"note": "This is demo data",
"hostname": "PixelIt-Demo",
+ "deviceID": "PixelIt-123456789",
"matrixTempCorrection": "default",
"ntpServer": "0.pool.ntp.org",
"clockTimeZone": 1,
@@ -67,6 +68,7 @@
"mqttPassword": "",
"mqttServer": "",
"mqttMasterTopic": "Home/PixelIt/",
+ "mqttUseDeviceTopic": true,
"mqttPort": 1883,
"luxOffset": 0,
"temperatureOffset": 0,
diff --git a/src/store/index.js b/src/store/index.js
index 3539d9e..f5e00f8 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -619,6 +619,9 @@ function getDisplayName(key) {
case 'hostname':
key = 'Hostname';
break;
+ case 'deviceID':
+ key = 'Device-ID';
+ break;
case 'note':
key = 'Note';
break;
diff --git a/src/views/Options.vue b/src/views/Options.vue
index 589e02b..72204f9 100644
--- a/src/views/Options.vue
+++ b/src/views/Options.vue
@@ -26,7 +26,7 @@
-
+
@@ -102,6 +102,8 @@
+
+
@@ -215,6 +217,15 @@ export default {
telemetryData() {
return this.$store.state.telemetryData;
},
+ deviceTopicLabel() {
+ let hostname = '';
+ if (this.$store.state.configData.hostname != '') {
+ hostname = this.$store.state.configData.hostname.trim();
+ } else {
+ hostname = this.$store.state.displayHostname;
+ }
+ return 'Use additional device topic (' + this.$store.state.configData.mqttMasterTopic.trim().replace(/\/?$/, '/') + hostname + '/)';
+ },
},
methods: {
save() {