tommasomarchionni / homebridge-openHAB

Homebridge plugin for openHAB
Apache License 2.0
49 stars 18 forks source link

Config not loading #19

Open latitjuig opened 8 years ago

latitjuig commented 8 years ago

Hi guys. I new to all of this. Please help. Cant seem to get config.json running

sudo homebridge * WARNING * The program 'node' uses the Apple Bonjour compatibility layer of Avahi. * WARNING * Please fix your application to use the native API of Avahi! * WARNING * For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node * WARNING * The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. * WARNING * Please fix your application to use the native API of Avahi! * WARNING * For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister [3/6/2016, 10:16:23 AM] Loaded plugin: homebridge-openhab [3/6/2016, 10:16:23 AM] Registering platform 'homebridge-openhab.openHAB' [3/6/2016, 10:16:23 AM] --- Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

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

[3/6/2016, 10:16:24 AM] Homebridge is running on port 51826.

ssvenn commented 8 years ago

I had the same problem, when you run it through sudo i think it uses the .homebridge config directory from /root/ Try forcing a specific config directory by running it again with sudo homebridge -U /home/username/.homebridge

You might also want to delete the persist folder in .homebridge and reset HomeKit to start from scratch if it still isn’t working.

-Sverre

On 06 Mar 2016, at 09:17, latitjuig notifications@github.com wrote:

Hi guys. I new to all of this. Please help. Cant seem to get config.json running

sudo homebridge * WARNING * The program 'node' uses the Apple Bonjour compatibility layer of Avahi. * WARNING * Please fix your application to use the native API of Avahi! * WARNING * For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node http://0pointer.de/avahi-compat?s=libdns_sd&e=node * WARNING * The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. * WARNING * Please fix your application to use the native API of Avahi! * WARNING * For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister [3/6/2016, 10:16:23 AM] Loaded plugin: homebridge-openhab [3/6/2016, 10:16:23 AM] Registering platform 'homebridge-openhab.openHAB' [3/6/2016, 10:16:23 AM] --- Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐
│ 031-45-154 │
└────────────┘
[3/6/2016, 10:16:24 AM] Homebridge is running on port 51826.

— Reply to this email directly or view it on GitHub https://github.com/tommasomarchionni/homebridge-openHAB/issues/19.

latitjuig commented 8 years ago

Where is the default homebridge installation folder?? The .homebridge one?

Sent from Outlook Mobile

On Sun, Mar 6, 2016 at 12:44 AM -0800, "ssvenn" notifications@github.com wrote:

I had the same problem, when you run it through sudo i think it uses the .homebridge config directory from /root/

Try forcing a specific config directory by running it again with sudo homebridge -U /home/username/.homebridge

You might also want to delete the persist folder in .homebridge and reset HomeKit to start from scratch if it still isn’t working.

-Sverre

On 06 Mar 2016, at 09:17, latitjuig notifications@github.com wrote:

Hi guys. I new to all of this. Please help. Cant seem to get config.json running

sudo homebridge

* WARNING * The program 'node' uses the Apple Bonjour compatibility layer of Avahi.

* WARNING * Please fix your application to use the native API of Avahi!

* WARNING * For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node http://0pointer.de/avahi-compat?s=libdns_sd&e=node

* WARNING * The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.

* WARNING * Please fix your application to use the native API of Avahi!

* WARNING * For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister

[3/6/2016, 10:16:23 AM] Loaded plugin: homebridge-openhab

[3/6/2016, 10:16:23 AM] Registering platform 'homebridge-openhab.openHAB'

[3/6/2016, 10:16:23 AM] ---

Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐

│ 031-45-154 │

└────────────┘

[3/6/2016, 10:16:24 AM] Homebridge is running on port 51826.

Reply to this email directly or view it on GitHub https://github.com/tommasomarchionni/homebridge-openHAB/issues/19.

— Reply to this email directly or view it on GitHub.

latitjuig commented 8 years ago

Ok, now i have this problem.

$ sudo homebridge -U /home/pi/.homebridge * WARNING * The program 'node' uses the Apple Bonjour compatibility layer of Avahi. * WARNING * Please fix your application to use the native API of Avahi! * WARNING * For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node * WARNING * The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. * WARNING * Please fix your application to use the native API of Avahi! * WARNING * For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister [3/6/2016, 12:59:54 PM] Loaded plugin: homebridge-openhab [3/6/2016, 12:59:55 PM] Registering platform 'homebridge-openhab.openHAB' [3/6/2016, 12:59:55 PM] --- /usr/local/lib/node_modules/homebridge/lib/server.js:181 var username = config.bridge.username; ^

TypeError: Cannot read property 'username' of undefined at Server._loadConfig (/usr/local/lib/node_modules/homebridge/lib/server.js:181:31) at new Server (/usr/local/lib/node_modules/homebridge/lib/server.js:44:23) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:26:16) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Function.Module.runMain (module.js:442:10) at startup (node.js:136:18)

Help please

tommasomarchionni commented 8 years ago

Check your config.json file. It seems that there is no bridge parameter.

jonbid commented 8 years ago

yes, adding the bridge parameter fix that problem for me as well.