@homebridge-plugins/homebridge-matter 0.1.1-beta.0 → 0.1.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,11 +85,51 @@
85
85
  <table class="table w-100 mt-3" id="deviceTable" style="display: none;">
86
86
  <thead>
87
87
  <tr class="table-active">
88
- <th scope="col" style="width: 40%;">Device Name</th>
89
- <th scope="col" style="width: 60%;" id="displayName"></th>
88
+ <th scope="col" style="width: 40%;">Property</th>
89
+ <th scope="col" style="width: 60%;">Value</th>
90
90
  </tr>
91
91
  </thead>
92
92
  <tbody>
93
+ <tr>
94
+ <th scope="row">Display Name</th>
95
+ <td id="displayName"></td>
96
+ </tr>
97
+ <tr>
98
+ <th scope="row">Plugin</th>
99
+ <td id="plugin"></td>
100
+ </tr>
101
+ <tr>
102
+ <th scope="row">Platform</th>
103
+ <td id="platform"></td>
104
+ </tr>
105
+ <tr>
106
+ <th scope="row">UUID</th>
107
+ <td id="uuid"></td>
108
+ </tr>
109
+ <tr>
110
+ <th scope="row">Device Type</th>
111
+ <td id="deviceType"></td>
112
+ </tr>
113
+ <tr>
114
+ <th scope="row">Serial Number</th>
115
+ <td id="serialNumber"></td>
116
+ </tr>
117
+ <tr>
118
+ <th scope="row">Manufacturer</th>
119
+ <td id="manufacturer"></td>
120
+ </tr>
121
+ <tr>
122
+ <th scope="row">Model</th>
123
+ <td id="model"></td>
124
+ </tr>
125
+ <tr>
126
+ <th scope="row">Device ID</th>
127
+ <td id="deviceId"></td>
128
+ </tr>
129
+ <tr>
130
+ <th scope="row">Protocol</th>
131
+ <td id="protocol"></td>
132
+ </tr>
93
133
  </tbody>
94
134
  </table>
95
135
  </div>
@@ -185,19 +225,31 @@
185
225
  cachedAccessories.forEach(a => {
186
226
  const option = document.createElement('option')
187
227
  option.text = a.displayName
188
- option.value = a.context.hbDeviceId
228
+ option.value = a.uuid
189
229
  deviceSelect.add(option)
190
230
  })
191
- showDeviceInfo = async hbDeviceId => {
231
+ showDeviceInfo = async uuid => {
192
232
  homebridge.showSpinner()
193
- const thisAcc = cachedAccessories.find(x => x.context.hbDeviceId === hbDeviceId)
194
- const context = thisAcc.context
233
+ const thisAcc = cachedAccessories.find(x => x.uuid === uuid)
234
+
235
+ // Populate device information
236
+ document.getElementById('displayName').innerHTML = thisAcc.displayName || 'N/A'
237
+ document.getElementById('plugin').innerHTML = thisAcc.plugin || 'N/A'
238
+ document.getElementById('platform').innerHTML = thisAcc.platform || 'N/A'
239
+ document.getElementById('uuid').innerHTML = thisAcc.uuid || 'N/A'
240
+ document.getElementById('deviceType').innerHTML = thisAcc.deviceType?.name || 'N/A'
241
+ document.getElementById('serialNumber').innerHTML = thisAcc.serialNumber || 'N/A'
242
+ document.getElementById('manufacturer').innerHTML = thisAcc.manufacturer || 'N/A'
243
+ document.getElementById('model').innerHTML = thisAcc.model || 'N/A'
244
+ document.getElementById('deviceId').innerHTML = thisAcc.$deviceId || 'N/A'
245
+ document.getElementById('protocol').innerHTML = thisAcc.$protocol || 'N/A'
246
+
195
247
  document.getElementById('deviceTable').style.display = 'inline-table'
196
248
  homebridge.hideSpinner()
197
249
  }
198
250
  deviceSelect.addEventListener('change', event => showDeviceInfo(event.target.value))
199
251
  if (cachedAccessories.length > 0) {
200
- showDeviceInfo(cachedAccessories[0].context.hbDeviceId)
252
+ showDeviceInfo(cachedAccessories[0].uuid)
201
253
  } else {
202
254
  const option = document.createElement('option')
203
255
  option.text = 'No Devices'
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "Homebridge Matter",
4
4
  "alias": "Matter",
5
5
  "type": "module",
6
- "version": "0.1.1-beta.0",
6
+ "version": "0.1.1-beta.1",
7
7
  "description": "Homebridge plugin to showcase examples of Matter devices in Homebridge.",
8
8
  "author": {
9
9
  "name": "bwp91",