Closed bls8486 closed 3 years ago
same problem here, clean homebridge raspberry pi image. First plugin installed unifi protect and get this message.
I’ll take a look a bit later in the day…I’d suggest not upgrading, given nothing’s changed on the plugin end, I assume there’s some requirement quirk that’s kicked in with the most recent images, assuming none of you guys are running the betas.
No not running any beta. Fresh install of Homebridge Raspberry Pi Image.. Then installed Homebridge-UniFi-Protect Plugin Version: 4.4.1.
Homebridge Version | v1.3.4 Node.js Version | v14.17.1 Npm Version | v7.17.0
Yep…I am aware of the issue, and a fix will be coming later today.
Fixed in v4.4.2. The issue, for what it's worth, is really an upstream one in one of the other modules that appears to be a release without as much QA as one would hope. Regardless...fixed for us. :smile:
Confirmed. I am back up and running with 4.4.2. Thank you sir.
Your welcome...hope you consider paying it forward and supporting a local charity or two.
This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.
Describe The Problem: Homebridge-Unifi-Protect module fails to start up after upgrade to 4.4.1
To Reproduce: Restart homebridge. Attempted to downgrade to 4.4.0, and same error. Updated homebridge to latest oznu image.
Logs: [7/19/2021, 9:16:03 AM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /homebridge/node_modules [7/19/2021, 9:16:03 AM] [HB Supervisor] Started Homebridge v1.3.4 with PID: 1486 Initializing HAP-NodeJS v0.9.4... [7/19/2021, 9:16:04 AM] Loaded config.json with 3 accessories and 2 platforms. [7/19/2021, 9:16:04 AM] Loaded 0 cached accessories from cachedAccessories. [7/19/2021, 9:16:04 AM] --- [7/19/2021, 9:16:05 AM] Loaded plugin: homebridge-dummy@0.5.0 [7/19/2021, 9:16:05 AM] Registering accessory 'homebridge-dummy.DummySwitch' [7/19/2021, 9:16:05 AM] --- [7/19/2021, 9:16:05 AM] ==================== [7/19/2021, 9:16:05 AM] ERROR LOADING PLUGIN homebridge-unifi-protect: [7/19/2021, 9:16:05 AM] Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /homebridge/node_modules/homebridge-unifi-protect/node_modules/node-fetch/src/index.js require() of ES modules is not supported. require() of /homebridge/node_modules/homebridge-unifi-protect/node_modules/node-fetch/src/index.js from /homebridge/node_modules/homebridge-unifi-protect/dist/protect-api.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /homebridge/node_modules/homebridge-unifi-protect/node_modules/node-fetch/package.json.
[7/19/2021, 9:16:05 AM] ==================== [7/19/2021, 9:16:05 AM] Loaded plugin: homebridge-wol@4.3.0 [7/19/2021, 9:16:05 AM] Registering accessory 'homebridge-wol.NetworkDevice' [7/19/2021, 9:16:05 AM] --- [7/19/2021, 9:16:05 AM] Loaded plugin: homebridge-config-ui-x@4.41.1 [7/19/2021, 9:16:05 AM] Registering platform 'homebridge-config-ui-x.config' [7/19/2021, 9:16:05 AM] --- [7/19/2021, 9:16:05 AM] Loading 2 platforms... [7/19/2021, 9:16:05 AM] No plugin was found for the platform "UniFi Protect" in your config.json. Please make sure the corresponding plugin is installed correctly. [7/19/2021, 9:16:05 AM] [Config] Initializing config platform... [7/19/2021, 9:16:05 AM] [Config] Running in Service Mode [7/19/2021, 9:16:05 AM] Loading 3 accessories... [7/19/2021, 9:16:05 AM] [Kitchen Computer] Initializing NetworkDevice accessory... [7/19/2021, 9:16:05 AM] [Work PC] Initializing NetworkDevice accessory... [7/19/2021, 9:16:05 AM] [Home Track] Initializing DummySwitch accessory... [7/19/2021, 9:16:05 AM] [Home Track] Setting switch to true Preparing Advertiser for 'Homebridge CAD8' using bonjour-hap backend! Setup Payload: X-HM://0023I2OY7P2H2 Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
Starting to advertise 'Homebridge CAD8' using bonjour-hap backend! [7/19/2021, 9:16:05 AM] Homebridge v1.3.4 (Homebridge) is running on port 51826.
Homebridge Configuration:
{ "controllers": [ { "address": "xxxxxxxxxxxxxxxxx", "password": "xxxxxxxxxxxxxxxx", "username": "xxxxxxxxxxxxxx" } ], "options": [ "Enable.Motion.Trigger", "Enable.Motion.SmartDetect", "Enable.Log.Motion" ], "motionDuration": 20, "platform": "UniFi Protect" },
Screenshots: N/A
Environment: