ilcato / homebridge-Fibaro-HC2

Homebridge plugin for Fibaro Home Center 2 (and Home Center Lite ...)
Apache License 2.0
66 stars 27 forks source link

Error getting data from Home Center: null undefined #27

Closed zirinisp closed 7 years ago

zirinisp commented 7 years ago

I tried to setup homebridge on my iMac running OS X 10.12

When I run homebridge i get the following error and I cannot find any devices from my iPhone:

Pantelis-iMac:.homebridge zirinisp$ homebridge [9/20/2016, 8:13:18 PM] Loaded plugin: homebridge-fibaro-hc2 [9/20/2016, 8:13:18 PM] Registering platform 'homebridge-fibaro-hc2.FibaroHC2' [9/20/2016, 8:13:18 PM] --- [9/20/2016, 8:13:18 PM] Loaded config.json with 0 accessories and 1 platforms. [9/20/2016, 8:13:18 PM] --- [9/20/2016, 8:13:18 PM] Loading 1 platforms... [9/20/2016, 8:13:18 PM] [FibaroHC2] Initializing FibaroHC2 platform... [9/20/2016, 8:13:18 PM] Loading 0 accessories... Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[9/20/2016, 8:13:18 PM] Homebridge is running on port 51826. Plugin - DidFinishLaunching [9/20/2016, 8:13:18 PM] [FibaroHC2] Fetching Fibaro Home Center rooms ... [9/20/2016, 8:13:18 PM] [FibaroHC2] Server Listening... [9/20/2016, 8:13:18 PM] [FibaroHC2] Error getting data from Home Center: null undefined

zirinisp commented 7 years ago

and my config.json file

`{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:32", "port": 51826, "pin": "031-45-154" },

"description": "This is an example configuration file. You can use this as a template for creating your own configuration file.",

"platforms": [
        {
        "platform": "FibaroHC2",
        "name": "FibaroHC2",
        "host": "192.168.50.100",
        "username": "homebridge",
        "password": "3oT-Doo-fSf-EZb",
        "grouping": "none",
        "pollerperiod": "2"
    }

],

"accessories": [
]

}`

ilcato commented 7 years ago

where did you put the config.json file?

zirinisp commented 7 years ago

initially it was confusing so I had to put it in various places. At the end I put it in my home directory under .homebridge (/Users/myname/.homebridge/config.json). Do I have to put it somewhere else?

ilcato commented 7 years ago

The place you used is correct.

ilcato commented 7 years ago

Which version of node.js do you have?

zirinisp commented 7 years ago

v4.5.0

ilcato commented 7 years ago

Try to update to a latest version. I'm on the 6.6 on a mac and homebridge works flawlessly

zirinisp commented 7 years ago

Thank you very much for the prompt replies.

Now I am getting the following error

module.js:583 return process.dlopen(module, path._makeLong(filename)); ^

Error: Module version mismatch. Expected 48, got 46. at Error (native) at Object.Module._extensions..node (module.js:583:18) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (/usr/local/lib/node_modules/homebridge/node_modules/bignum/index.js:4:11) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10)

ilcato commented 7 years ago

I think that it is better for you to remove and reinstall the homebridge package

zirinisp commented 7 years ago

How do I remove it, as I already tried to install it on top but it did not work

ilcato commented 7 years ago

npm uninstall -g homebridge

zirinisp commented 7 years ago

I am getting the same error:

Pantelis-iMac:.homebridge zirinisp$ homebridge [9/23/2016, 11:28:31 AM] Loaded plugin: homebridge-fibaro-hc2 [9/23/2016, 11:28:31 AM] Registering platform 'homebridge-fibaro-hc2.FibaroHC2' [9/23/2016, 11:28:31 AM] --- [9/23/2016, 11:28:31 AM] Loaded config.json with 0 accessories and 1 platforms. [9/23/2016, 11:28:31 AM] --- [9/23/2016, 11:28:31 AM] Loading 1 platforms... [9/23/2016, 11:28:31 AM] [FibaroHC2] Initializing FibaroHC2 platform... [9/23/2016, 11:28:31 AM] Loading 0 accessories... Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[9/23/2016, 11:28:31 AM] Homebridge is running on port 51826. Plugin - DidFinishLaunching [9/23/2016, 11:28:31 AM] [FibaroHC2] Fetching Fibaro Home Center rooms ... [9/23/2016, 11:28:31 AM] [FibaroHC2] Server Listening... [9/23/2016, 11:28:31 AM] [FibaroHC2] Error getting data from Home Center: null undefined

ilcato commented 7 years ago

Are the hostname and credential in config.json correct? Are you able to connect to the HC2 from the mac on that address?

zirinisp commented 7 years ago

My mistake. I used the safari recommended password, which was probably longer than the hc2 could accept. I just used another password and it is adding accessories as we speak.

Thank you very much for the help. Hope it works now. If not I will get back to you.

zirinisp commented 7 years ago

It is working fine now. I suppose that I cannot import scenes at the moment, as I cannot get any scenes.

ilcato commented 7 years ago

Good to know. Scene are not visible. You need to create a virtual device and connect it to the scene.

zirinisp commented 7 years ago

Ok will try and do that then. Again thank you very much, you have been very helpful.