tonesto7 / homebridge-hubitat-tonesto7

Hubitat Homebridge Plugin
107 stars 34 forks source link

(BUG) 2.5.13 plugin not loading in Homebridge #130

Closed devenbj closed 2 years ago

devenbj commented 2 years ago

Verify the following before opening an trouble issue

Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!


About Your Setup

Expected Behavior

Plugin should load and function normally

Current Behavior

Upgraded to 2.5.13. Restarted Homebridge. Plugin loads very early on.

Steps to Reproduce (for bugs)

Upgraded to 2.5.13. Error occurs on Homebridge, not Hubitat.

1. 2. 3. 4.

Context

Must roll back to 2.5.12 to manage my devices. All devices have lost room, icon, notification, favorite configuration.


[1/7/2022, 1:01:59 PM] ==================== [1/7/2022, 1:01:59 PM] ERROR LOADING PLUGIN homebridge-hubitat-tonesto7: [1/7/2022, 1:01:59 PM] Error [ERR_REQUIRE_ESM]: require() of ES Module /usr/lib/node_modules/homebridge-hubitat-tonesto7/node_modules/chalk/source/index.js from /usr/lib/node_modules/homebridge-hubitat-tonesto7/src/HE_Platform.js not supported. Instead change the require of index.js in /usr/lib/node_modules/homebridge-hubitat-tonesto7/src/HE_Platform.js to a dynamic import() which is available in all CommonJS modules. at Object. (/usr/lib/node_modules/homebridge-hubitat-tonesto7/src/HE_Platform.js:9:13) at Object. (/usr/lib/node_modules/homebridge-hubitat-tonesto7/src/index.js:2:18) at Plugin.load (/usr/lib/node_modules/homebridge/lib/plugin.js:132:77) at PluginManager.initializeInstalledPlugins (/usr/lib/node_modules/homebridge/lib/pluginManager.js:64:30) at async Server.start (/usr/lib/node_modules/homebridge/lib/server.js:106:9) [1/7/2022, 1:01:59 PM] ====================

tonesto7 commented 2 years ago

sorry about that! Thanks for catching this I just pushed out v2.5.14 of the app and plugin

tonesto7 commented 2 years ago

I'm not sure why the plugin failing to start would eliminate your entire device cache. It's actually designed to use dynamic loading so that never happens.

devenbj commented 2 years ago

Later in the logs it indicated that there were no devices to load for the plugin. Not my favorite to rearrange my Home app, but glad I found this before it could impact too many others. Really thankful for your rapid support and correction. :) And, yes... this fixes the issue and it is working correctly again. Thanks!

tonesto7 commented 2 years ago

I suggest downloading the iOS app named Controller for HomeKit. I've used this for years to fully backup my HomeKit config and automation. The only items you will need to redo are setting favorites, notifications. It restores names, zones, rooms, customizations, and more.
It's worth the one-time fee to unlock full features.