materik / homebridge-harmonyhub-plugin

Logitech HarmonyHub plugin for Homebridge
39 stars 2 forks source link

Error message #35

Closed MSDaytona closed 3 years ago

MSDaytona commented 4 years ago

Starting the plug-in I am getting the following log with errors at the end which do not make any sense to me. Who can help me.

Homebridge - Harmony.pdf

arfNZ commented 4 years ago

I am getting the same error. Anyone got any bright ideas?

: [6/30/2020, 8:06:29 PM] Loaded plugin: homebridge-harmonyhub-plugin@0.5.6 : [6/30/2020, 8:06:29 PM] Registering platform 'homebridge-harmonyhub-plugin.HarmonyHub' : [6/30/2020, 8:06:29 PM] --- : [6/30/2020, 8:06:29 PM] Loading 1 platforms... : [6/30/2020, 8:06:29 PM] [homebridge-harmonyhub-plugin] Initializing HarmonyHub platform... : [6/30/2020, 8:06:29 PM] Loading 2 accessories... : [6/30/2020, 8:06:32 PM] [homebridge-harmonyhub-plugin] {HarmonyHub} Found <1> hubs : [6/30/2020, 8:06:32 PM] [homebridge-harmonyhub-plugin] {HarmonyHub} <7d0eceea-c968-4665-81a2-590dbfa1ae61> : [6/30/2020, 8:06:32 PM] [homebridge-harmonyhub-plugin] {HarmonyHub} create new client for : [6/30/2020, 8:06:33 PM] [homebridge-harmonyhub-plugin] {HarmonyHub} Found <3> activities: <Watch TV, Watch Apple TV, Watch PC> : [6/30/2020, 8:06:33 PM] [homebridge-harmonyhub-plugin] {HarmonyHubAccessory} adding <3> activities : [6/30/2020, 8:06:33 PM] [homebridge-harmonyhub-plugin] {HarmonyHubAccessory} addActivity : [6/30/2020, 8:06:33 PM] [homebridge-harmonyhub-plugin] {HarmonyHubAccessory} loadActivities: TypeError: self.name is not a function : at new ActivityService (/usr/local/lib/node_modules/homebridge-harmonyhub-plugin/lib/activity-service.js:15:64) : at Accessory._this.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:267:11) : at PlatformAccessory.addService (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:92:41) : at Accessory.addService (/usr/local/lib/node_modules/homebridge-harmonyhub-plugin/lib/accessory.js:38:49) ]: at HarmonyHubAccessory.addActivity (/usr/local/lib/node_modules/homebridge-harmonyhub-plugin/lib/harmonyhub-accessory.js:47:27) : at /usr/local/lib/node_modules/homebridge-harmonyhub-plugin/lib/harmonyhub-accessory.js:140:37 : at arrayMap (/usr/local/lib/node_modules/homebridge-harmonyhub-plugin/node_modules/lodash/lodash.js:639:23) : at Function.map (/usr/local/lib/node_modules/homebridge-harmonyhub-plugin/node_modules/lodash/lodash.js:9556:14) : at /usr/local/lib/node_modules/homebridge-harmonyhub-plugin/lib/harmonyhub-accessory.js:139:30 : at tryCallOne (/usr/local/lib/node_modules/homebridge-harmonyhub-plugin/node_modules/promise/lib/core.js:37:12)

rem602 commented 4 years ago

Never written js in my life and don't know why self.name() is valid on lines 11 and 13, but invalid on 15 but the code changes below eliminate the error.

hoobs@hoobs:~/.hoobs/node_modules/homebridge-harmonyhub-plugin/lib $ diff activity-service.js activity-service.js.orig
10d9
<     let name = self.name()
12c11
<     log.debug('{ActivityService} <' + self.id() + '> <' + name + '>')
---
>     log.debug('{ActivityService} <' + self.id() + '> <' + self.name() + '>')
14c13
<     Service.call(self, name, self.id())
---
>     Service.call(self, self.name(), self.id())
16c15
<     self.setCharacteristic(HomebridgeCharacteristic.Name, name);
---
>     self.setCharacteristic(HomebridgeCharacteristic.Name, self.name());
Tesla-P100FX commented 4 years ago

MSDatona & arfNZ did you resolve this? What did you do? The above code from rem602 is not config.json code.

MSDaytona commented 4 years ago

No I didn't / couldn't. And yes you are right the code from rem602 is not the config.json but the Homebridge output file listing the error code in question. I got he same.

ianepperson commented 3 years ago

Ah, I just filed a duplicate issue: #38

materik commented 3 years ago

Sorry for my lack of response. Should be fixed now!