@homebridge-plugins/homebridge-meross 10.17.0-beta.0 → 10.17.0-beta.2

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,8 @@ All notable changes to `@homebridge-plugins/homebridge-meross` will be documente
7
7
  ### Changed
8
8
 
9
9
  - feat(ui): add, remove and hide devices from the config via the my devices tab
10
+ - style(ui): standardise the custom ui layout and sync the support tab with the readme
11
+ - feat(ui): add a remove all devices action to the my devices tab
10
12
 
11
13
  ## v10.16.5 (2026-07-18)
12
14
 
@@ -102,6 +102,17 @@
102
102
  </button>
103
103
  </div>
104
104
  </li>
105
+ <li class="list-group-item">
106
+ <div class="d-flex justify-content-between align-items-center">
107
+ <div class="pr-2">
108
+ <div>Remove All Devices</div>
109
+ <div class="text-muted action-desc" id="removeAllText">Remove every device from the plugin config.</div>
110
+ </div>
111
+ <button type="button" class="btn btn-primary m-0 ml-3 py-1 min-w-50" id="removeAllBtn" aria-label="Remove all devices from the config">
112
+ <i aria-hidden="true" class="fas fa-arrow-right"></i>
113
+ </button>
114
+ </div>
115
+ </li>
105
116
  <li class="list-group-item">
106
117
  <div class="d-flex justify-content-between align-items-center">
107
118
  <div class="pr-2">
@@ -169,114 +180,61 @@
169
180
  </table>
170
181
  </div>
171
182
  </div>
172
- <div id="pageSupport" class="mt-4" style="display: none;">
183
+ <div id="pageSupport" class="mt-4" style="display: none">
173
184
  <p class="text-center lead">Thank you for using <strong>homebridge-meross</strong></p>
174
- <p class="text-center">The links below will take you to our GitHub wiki</p>
175
- <h4>Setup</h4>
176
- <ul>
177
- <li>
178
- <a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Installation" target="_blank"
179
- >Installation</a
180
- >
181
- </li>
182
- <li>
183
- <a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Configuration" target="_blank"
184
- >Configuration</a
185
- >
186
- </li>
187
- <li>
188
- <a href="https://github.com/homebridge/homebridge/wiki/How-to-Install-Alternate-Plugin-Versions" target="_blank"
189
- >Beta Version</a
190
- >
191
- </li>
192
- <li>
193
- <a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Node-Version" target="_blank"
194
- >Node Version</a
195
- >
196
- </li>
197
- </ul>
198
- <h4>Features</h4>
199
- <ul>
200
- <li>
201
- <a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Supported-Devices" target="_blank"
202
- >Supported Devices</a
203
- >
204
- </li>
205
- <li>
206
- <a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Cloud-Control" target="_blank"
207
- >Cloud Control</a
208
- >
209
- </li>
210
- <li>
211
- <a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Local-Control" target="_blank"
212
- >Local Control</a
213
- >
214
- </li>
215
- </ul>
216
- <h4>Help/About</h4>
185
+ <h5>Plugin Information</h5>
186
+ <ul>
187
+ <li>This plugin allows you to view and control your Meross devices within HomeKit. The plugin:</li>
217
188
  <ul>
218
- <li>
219
- <a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Common-Errors" target="_blank"
220
- >Common Errors</a
221
- >
222
- </li>
223
- <li>
224
- <a href="https://github.com/homebridge-plugins/homebridge-meross/issues/new/choose" target="_blank"
225
- >Support Request</a
226
- >
227
- </li>
228
- <li>
229
- <a href="https://github.com/homebridge-plugins/homebridge-meross/blob/latest/CHANGELOG.md" target="_blank"
230
- >Changelog</a
231
- >
232
- </li>
233
- <li>
234
- <a href="https://github.com/sponsors/bwp91" target="_blank">About Me</a>
235
- </li>
189
+ <li>downloads a device list if your Meross credentials are supplied</li>
190
+ <li>attempts to control your devices locally, reverting to cloud control if necessary</li>
191
+ <li>listens for real-time device updates when controlled externally</li>
192
+ <li>supports configuring devices for local-only control without your Meross credentials</li>
193
+ <li>can ignore any HomeKit-native devices you have using the configuration</li>
236
194
  </ul>
237
- <h4>Credits</h4>
195
+ </ul>
196
+ <h5>Prerequisites</h5>
197
+ <ul>
198
+ <li>To use this plugin, you will need to already have:</li>
238
199
  <ul>
239
- <li>
240
- This is a fork of the work originally done by
241
- <a href="https://github.com/Robdel12" target="_blank">@Robdel12</a> and
242
- <a href="https://github.com/dylanfrankcom" target="_blank">@dylanfrankcom</a>.
243
- </li>
244
- <li>
245
- To <a href="https://github.com/donavanbecker" target="_blank">@donavanbecker</a> the previous
246
- maintainer of this plugin.
247
- </li>
248
- <li>
249
- To <a href="https://github.com/Apollon77" target="_blank">@Apollon77</a> and
250
- <a href="https://github.com/colthreepv" target="_blank">@colthreepv</a> for the
251
- <a href="https://github.com/Apollon77/meross-cloud" target="_blank">meross-cloud</a> library
252
- (contained in this plugin).
253
- </li>
254
- <li>
255
- To the creator of the awesome plugin header logo:
256
- <a href="https://www.instagram.com/keryan.me" target="_blank">Keryan Belahcene</a>.
257
- </li>
258
- <li>
259
- To the creators/contributors of
260
- <a href="https://github.com/simont77/fakegato-history" target="_blank">Fakegato</a>:
261
- <a href="https://github.com/simont77" target="_blank">@simont77</a> and
262
- <a href="https://github.com/NorthernMan54" target="_blank">@NorthernMan54</a>.
263
- </li>
264
- <li>
265
- To the creators/contributors of
266
- <a href="https://homebridge.io" target="_blank">Homebridge</a> who make this plugin possible.
267
- </li>
268
- </ul>
269
-
270
- <h4>Disclaimer</h4>
271
- <ul>
272
- <li>
273
- I am in no way affiliated with Meross and this plugin is a personal project that I maintain in
274
- my free time.
275
- </li>
276
- <li>
277
- Use this plugin entirely at your own risk - please see licence for more information.
278
- </li>
200
+ <li><a href="https://nodejs.org" target="_blank">Node</a>: latest version of <code>v22</code> or <code>v24</code> - any other major version is not supported.</li>
201
+ <li><a href="https://homebridge.io" target="_blank">Homebridge</a>: <code>v1.6</code> or above - refer to link for more information and installation instructions.</li>
279
202
  </ul>
203
+ </ul>
204
+ <h5>Setup</h5>
205
+ <ul>
206
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Installation" target="_blank">Installation</a></li>
207
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Configuration" target="_blank">Configuration</a></li>
208
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Beta-Version" target="_blank">Beta Version</a></li>
209
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Node-Version" target="_blank">Node Version</a></li>
210
+ </ul>
211
+ <h5>Features</h5>
212
+ <ul>
213
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Supported-Devices" target="_blank">Supported Devices</a></li>
214
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Cloud-Control" target="_blank">Cloud Control</a></li>
215
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Local-Control" target="_blank">Local Control</a></li>
216
+ </ul>
217
+ <h5>Help/About</h5>
218
+ <ul>
219
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/wiki/Common-Errors" target="_blank">Common Errors</a></li>
220
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/issues/new/choose" target="_blank">Support Request</a></li>
221
+ <li><a href="https://github.com/homebridge-plugins/homebridge-meross/blob/latest/CHANGELOG.md" target="_blank">Changelog</a></li>
222
+ <li><a href="https://github.com/sponsors/bwp91" target="_blank">About Me</a></li>
223
+ </ul>
224
+ <h5>Credits</h5>
225
+ <ul>
226
+ <li>This is a fork of the work originally done by <a href="https://github.com/Robdel12" target="_blank">@Robdel12</a> and <a href="https://github.com/dylanfrankcom" target="_blank">@dylanfrankcom</a>.</li>
227
+ <li>To <a href="https://github.com/donavanbecker" target="_blank">@donavanbecker</a> the previous maintainer of this plugin.</li>
228
+ <li>To <a href="https://github.com/Apollon77" target="_blank">@Apollon77</a> and <a href="https://github.com/colthreepv" target="_blank">@colthreepv</a> for the <a href="https://github.com/Apollon77/meross-cloud" target="_blank">meross-cloud</a> library (contained in this plugin).</li>
229
+ <li>To the creator of the awesome plugin header logo: <a href="https://www.instagram.com/keryan.me" target="_blank">Keryan Belahcene</a>.</li>
230
+ <li>To the creators/contributors of <a href="https://github.com/simont77/fakegato-history" target="_blank">Fakegato</a>: <a href="https://github.com/simont77" target="_blank">@simont77</a> and <a href="https://github.com/NorthernMan54" target="_blank">@NorthernMan54</a>.</li>
231
+ <li>To the creators/contributors of <a href="https://homebridge.io" target="_blank">Homebridge</a> who make this plugin possible.</li>
232
+ </ul>
233
+ <h5>Disclaimer</h5>
234
+ <ul>
235
+ <li>I am in no way affiliated with Meross and this plugin is a personal project that I maintain in my free time.</li>
236
+ <li>Use this plugin entirely at your own risk - please see licence for more information.</li>
237
+ </ul>
280
238
  </div>
281
239
  <script>
282
240
  ;(async () => {
@@ -302,6 +260,7 @@
302
260
  ]
303
261
  let pickerAccessories = []
304
262
  let removeConfirmTimer
263
+ let removeAllConfirmTimer
305
264
 
306
265
  // The action buttons always show the settings-page arrow; the row text
307
266
  // (and the button's aria-label) says what the arrow will do
@@ -523,6 +482,58 @@
523
482
  homebridge.toast.error(err.message, 'Error')
524
483
  }
525
484
  })
485
+ const resetRemoveAllButton = () => {
486
+ const btn = document.getElementById('removeAllBtn')
487
+ clearTimeout(removeAllConfirmTimer)
488
+ delete btn.dataset.confirm
489
+ btn.classList.remove('btn-danger')
490
+ btn.classList.add('btn-primary')
491
+ btn.innerHTML = actionArrow
492
+ btn.setAttribute('aria-label', 'Remove all devices from the config')
493
+ document.getElementById('removeAllText').innerHTML = 'Remove every device from the plugin config.'
494
+ }
495
+
496
+ document.getElementById('removeAllBtn').addEventListener('click', async () => {
497
+ try {
498
+ const btn = document.getElementById('removeAllBtn')
499
+ const blocks = await getConfigBlocks()
500
+ const config = blocks[0]
501
+ let total = 0
502
+ deviceArrays.forEach((key) => {
503
+ if (Array.isArray(config[key])) {
504
+ total += config[key].length
505
+ }
506
+ })
507
+ if (total === 0) {
508
+ resetRemoveAllButton()
509
+ homebridge.toast.info('There are no devices in the config.', 'Nothing To Remove')
510
+ return
511
+ }
512
+ if (btn.dataset.confirm !== 'yes') {
513
+ // Removing everything always asks for a second click, since any
514
+ // settings on the entries would be lost
515
+ btn.dataset.confirm = 'yes'
516
+ btn.classList.remove('btn-primary')
517
+ btn.classList.add('btn-danger')
518
+ btn.innerHTML = actionArrow
519
+ btn.setAttribute('aria-label', 'Confirm removing all devices from the config')
520
+ document.getElementById('removeAllText').innerHTML = 'Any settings on these entries will be lost. Click again to remove all ' + total + (total === 1 ? ' entry.' : ' entries.')
521
+ removeAllConfirmTimer = setTimeout(resetRemoveAllButton, 5000)
522
+ return
523
+ }
524
+ deviceArrays.forEach((key) => {
525
+ delete config[key]
526
+ })
527
+ await homebridge.updatePluginConfig(blocks)
528
+ resetRemoveAllButton()
529
+ setConfigButton(false)
530
+ setHideControl(false)
531
+ homebridge.toast.success(total + ' device entr' + (total === 1 ? 'y' : 'ies') + ' removed - press Save to apply.', 'Removed From Config')
532
+ } catch (err) {
533
+ homebridge.toast.error(err.message, 'Error')
534
+ }
535
+ })
536
+
526
537
  // ===== End device picker =====
527
538
 
528
539
  showIntro = () => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@homebridge-plugins/homebridge-meross",
3
3
  "alias": "Meross",
4
4
  "type": "module",
5
- "version": "10.17.0-beta.0",
5
+ "version": "10.17.0-beta.2",
6
6
  "description": "Homebridge plugin to integrate Meross devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",