Giter Site home page Giter Site logo

homebridge-server's People

Contributors

danjohnsonnj avatar gismo141 avatar olehs avatar stephenwoodford avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-server's Issues

Log page

On the log page it would be great if you could jump to the newest log entries by clicking a button.

And filtering the logs by plugin would be great but maybe not that easy to implement.

Localhost:8765 doesn't do anything

Finally got this first 'platform' to work without any strange errors. But can't seem to get into the interface. http://localhost:8765 doesn't do anything. My config.json file is located in /home/pi/.homebridge/

Any idea how to fix this?

*** WARNING *** The program 'nodejs' 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=nodejs
*** WARNING *** The program 'nodejs' 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=nodejs&f=DNSServiceRegister
[11/16/2016, 11:51:18 PM] Loaded plugin: homebridge-server
[11/16/2016, 11:51:18 PM] Registering platform 'homebridge-server.Server'
[11/16/2016, 11:51:18 PM] ---
[11/16/2016, 11:51:18 PM] Loaded config.json with 0 accessories and 1 platforms.
[11/16/2016, 11:51:18 PM] ---
[11/16/2016, 11:51:18 PM] Loading 1 platforms...
[11/16/2016, 11:51:18 PM] [Homebridge Server] Initializing Server platform...
Homebridge-Server is listening on port 8765
[11/16/2016, 11:51:18 PM] Loading 0 accessories...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

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

[11/16/2016, 11:51:18 PM] Homebridge is running on port 51826.

Confirmation window before removing

Is it possible to add a window where you confirm that the platform or accessory should be removed?
That would be great.
btw love your work!

Crash when opening Homebridge configuration page

Hi,

When I open the configuration page, The Homebridge NodeJE crashes, all other functions, like backup, log, plugins and reboot do work as expected. See attached screenshot for the error.
2016-12-19_1607

Im running it on a RPi with only the HomeSeer plugin installed.

Best regards,

Rien

log - use of journalctl requires sudo

the use of journalctl in my raspberry pi requires me to run the command using sudo i.e. "sudo journalctl --no-pager -u homebridge --since yesterday". can this be an option added to the config file?

thanks

Installing Error

When i'm trying to install the homebridge-server plugin on my Homebridge (macOS 10.13.2) with the command "sudo npm install homebridge-server@latest -g" (without quotes of course) the Terminal gives me an error (See screenshot).
Even if i try without the "Sudo" flag in the command.

schermafbeelding 2018-01-01 om 15 25 27

For people who are curious about the log output: here it is >

2018-01-01T14_21_55_591Z-debug.log

Can anybody help me with this error so i can run the plugin?
Thnx anyway!

try the 'Log' page then throw this

homebridge-0.4.22 & node@8


[2017-7-23 17:11:46] Homebridge is running on port 51826.
`/usr/local/lib/node_modules/homebridge-server/index.js:487
return log(err);
^

TypeError: log is not a function
at ReadFileContext.callback (/usr/local/lib/node_modules/homebridge-server/index.js:487:34)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13)

Cannot read property

Hi.

When I run the homebridge after installing, I get this.

`/usr/lib/node_modules/homebridge/lib/api.js:50
if (name.indexOf('.') == -1) {
^

TypeError: Cannot read property 'indexOf' of undefined
at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:50:12)
at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:264:42)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)`

Do I need to nano in to the api.js and do something or?

Issues with proxy_pass

Basically, I use nginx to forward homebridge-server (with HTTPS and username / password authentication), so that I can have remote access, as my setup is a headless Ubuntu Server. However I found that when setting the "add_header X-Content-Type-Options nosniff;" header, the proxy pass, now returns the page as raw HTML. Commenting out this line fixes this issue, but since I also happen to host a Wordpress on my server (on a different domain of course), this line is very important to me...

Graphics changed?

Today i opened my homebridge server and i seen this graphics.

And works bad.

schermata 2018-02-07 alle 13 34 54

restart does nothing

tried "systemctl restart homebridge.service"

and "service homebridge restart". In Terminal, I can see

[Homebridge Server] Executing: service homebridge restart

but it does nothing..

Does not work with journalctl and sudo

Restart command added as follows:

"sudo service homebridge restart" but that doesn't work since it can't authenticate

Logging when put systemd as logging source doesn't work either, logging comes from journalctl here...

error starting Homebridge-Server

Hi

I'm trying to start my Homebridge-Server on my Mac and are getting an error:

MQTT:.homebridge MQTT$ homebridge -D -U /Users/MQTT/.homebridge
[12/22/2016, 10:10:56 AM] Loaded plugin: homebridge-server
[12/22/2016, 10:10:56 AM] Registering platform 'homebridge-server.Server'
[12/22/2016, 10:10:56 AM] ---
[12/22/2016, 10:10:56 AM] Loaded config.json with 1 accessories and 1 platforms.
[12/22/2016, 10:10:56 AM] ---
[12/22/2016, 10:10:56 AM] Loading 1 platforms...
[12/22/2016, 10:10:56 AM] [Homebridge Server] Initializing Server platform...
[12/22/2016, 10:10:56 AM] Loading 1 accessories...
/usr/local/lib/node_modules/homebridge/lib/api.js:46
if (name.indexOf('.') == -1) {
^

TypeError: Cannot read property 'indexOf' of undefined
at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:46:11)
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:254:42)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

**Also my config.json file is in the .homebridge folder.

This is what my config.json consist of:

{
"bridge": {
"name": "Homebridge",
"username": "CC:22:4D:E3:DE:30",
"port": 51826,
"pin": "031-45-154"
},

"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",

"accessories": [
    {
       
    }
],

"platforms": [
    {
	"platform": "Server",
	"port": 8765,
	"name": "Homebridge Server",
	"log" : "/Users/MQTT/Documents/MQTT LOGS"
    }
]

}

Please assist

Option to update Plugins

Is it possible to add the option to update plugins that have available updates? Right now it looks like the only option is install or uninstall. I'm not sure if this is possible but it would be a great addition if it is. Thank you!

Platform does not load

It seems like a few people have had similar issues but I tried those "fixes" already.

Log output

Sep 15 11:48:37 raspberrypi homebridge[24139]: [15.9.2017, 11:48:36] No plugins found. See the README for information on installing plugins.
Sep 15 11:48:37 raspberrypi homebridge[24139]: [15.9.2017, 11:48:37] Loaded config.json with 0 accessories and 1 platforms.
Sep 15 11:48:37 raspberrypi homebridge[24139]: [15.9.2017, 11:48:37] ---
Sep 15 11:48:37 raspberrypi homebridge[24139]: [15.9.2017, 11:48:37] Loading 1 platforms...
Sep 15 11:48:37 raspberrypi homebridge[24139]: /usr/local/lib/node_modules/homebridge/lib/api.js:122
Sep 15 11:48:37 raspberrypi homebridge[24139]: throw new Error("The requested platform '" + name + "' was not registered by any plugin.");
Sep 15 11:48:37 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=1/FAILURE
Sep 15 11:48:37 raspberrypi systemd[1]: homebridge.service: Unit entered failed state.
Sep 15 11:48:37 raspberrypi systemd[1]: homebridge.service: Failed with result 'exit-code'.
Sep 15 11:48:47 raspberrypi systemd[1]: homebridge.service: Service hold-off time over, scheduling restart.
Sep 15 11:48:47 raspberrypi systemd[1]: Stopped Node.js HomeKit Server.

My config file:

{ "bridge": { "name": "homebridge", "username": "CC:22:3D:E3:CE:30", "port": 36021, "pin": "031-45-453" }, "description": "My homebridge", "accessories": [], "platforms": [ { "platform": "Server", "port": 8765, "name": "Homebridge Server", "log": "systemd", "config": "/usr/local/etc/homebridge", "restart": "sudo systemctl restart homebridge" } ] }

This is running on Pi with systemd.

if I remove the [] in platforms it runs homebridge but the server does not load,

"platforms": { "platform": "Server", "port": 8765, "name": "Homebridge Server", "log": "systemd", "config": "/usr/local/etc/homebridge", "restart": "sudo systemctl restart homebridge" }

if I remove the definition it runs homebridge no problem.

"platforms": [ ]

Trying to install homebridge-server

I installed the plugin with that:

[sudo] npm install homebridge-server@latest -g

and added this code to the config.json in systemd:

{
"bridge": {
"name": "HomeBridge",
"username": "18:00:27:40:BC:1B",
"port": 51825,
"pin": "261-12-015"
},

    "platforms": [{
                    "platform": "yeelight",
                    "name": "Yeelight"
            },
            {
                    "platform": "Server",
                    "port": 2611,
                    "name": "Homebridge Server",
                    "log": "homebridgelog",
                    "restart": "homebridgerestart"
            }
    ]

}

but I can't access to the localhost:2611

I get that error:

events.js:141
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE :::51825
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at Server._listen2 (net.js:1238:14)
at listen (net.js:1274:10)
at Server.listen (net.js:1370:5)
at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:60:19)
at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:158:20)
at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:509:16)
at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:114:16)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:91:10)

Help me please :)

raspberry

hi
not working on raspberry
error cannot find module /usr/local/bin/node/config.json

on pi it mjst be /home/pi/.homebridge

Keep Getting Error Regarding a Module

module.js:474
throw err;
^

Error: Cannot find module '/usr/local/Cellar/node/7.1.0/bin/node/config.json'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at new Server (/usr/local/lib/node_modules/homebridge-server/index.js:17:22)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:294:32)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:80:36)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.runMain (module.js:607:10)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3

cannot load (or find) log file

I cannot load the log file through the webpage. /showLog eventually times out.

At first I thought I just had to specify a logfile path and location for the homebridge-server plugin, afterwards I realized that I was maybe supposed to link to the actual log file of homebridge. But when I then tried to find how that file should be named, I couldn't find it back. I then tried to look for files that could look like they were the log files, but no luck again neither.

I am running homebridge on OSX, automatically starting it with Launchd as explained on
https://github.com/nfarina/homebridge/wiki/Install-Homebridge-on-OSX

Pretty sure it's something stupid, but just can't find it right now...

Thanks, Jurgen

Help needed

config file

{
	"bridge": {
		"name": "Homebridge",
		"username": "18:00:27:40:BC:1B",
		"port": 51925,
		"pin": "031-45-164"
	},
	"platforms": [{
		"platform": "Server",
		"port": 8765,
		"name": "HomebridgeServer",
		"log": "/Users/Admin/.homebridge/controller/logs/loging.log",
		"restart": "launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist && launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist"
	}]


}

Error i'm getting

[2017-02-22 15:31:49] [HomebridgeServer] is listening on: http://192.168.2.3:8765
[2017-02-22 15:31:49] [HomebridgeServer] is listening on: http://192.168.2.67:8765
[2017-02-22 15:31:49] Homebridge is running on port 51925.
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: bind EADDRINUSE 0.0.0.0:1982
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at dgram.js:213:18
    at doNTCallback3 (node.js:452:9)
    at process._tickCallback (node.js:358:17)
    at Function.Module.runMain (module.js:469:11)
    at startup (node.js:136:18)
    at node.js:963:3

what can i do ?

restart not working (Mac launchd)

I'm using...
"restart" : "launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist && launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist"
...for restart in config.json, but it doesn't seem to be working. It does work in Terminal.

When I use the Restart button on the web ui, it appears to unload fine, but then never reloads.

I'm running on a Mac, using launchd

npm install|uninstall not working

There is an issue with running plugin (un)installs. The commands in index.js should get prepended "sudo " (e.g. sudo npm install -g ...). Otherwise allowing npm in sudoers file wouldn't make sense as described in wiki. Patching as mentioned allows plugins to be installed correctly while executing homebridge as a service via systemd.

Another patch possibility would be to allow to specify npm base command via config.json file as done for rebooting homebridge or the whole raspberry.

Thank you!

Can make it to work - please assist

Hi!
I installed server plugin, added necessary lines to config.json, got confirmation that server is listening on port 8765 but I can access it on pi or other computer in my network (IP address and localhost:8765 are not working).

[2017-12-28 21:40:00] Loaded plugin: homebridge-server
[2017-12-28 21:40:00] Registering platform 'homebridge-server.Server'
[2017-12-28 21:40:00] ---
[2017-12-28 21:40:00] Loaded plugin: homebridge-tplink-smarthome
[2017-12-28 21:40:00] Registering platform 'homebridge-tplink-smarthome.TplinkSmarthome'
[2017-12-28 21:40:00] ---
[2017-12-28 21:40:00] Loaded config.json with 0 accessories and 2 platforms.
[2017-12-28 21:40:00] ---
[2017-12-28 21:40:00] Loading 2 platforms...
[2017-12-28 21:40:00] [Homebridge Server] Initializing Server platform...
[2017-12-28 21:40:00] [Homebridge Server] is listening on: http://192.168.0.50:8765
"platforms": [
	{
	"platform": "TplinkSmarthome",
	"name": "TplinkSmarthome"
	},
	{
	"platform": "Server",
	"port": 8765,
	"name": "Homebridge Server",
	"log": "systemd",
	"restart": "sudo reboot"
	}
]
pi@raspberrypi:~ $ sudo netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp6       0      0 :::40121                :::*                    LISTEN      442/homebridge      
tcp6       0      0 :::37121                :::*                    LISTEN      442/homebridge      
tcp6       0      0 :::41826                :::*                    LISTEN      442/homebridge      
tcp6       0      0 :::80                   :::*                    LISTEN      831/apache2     

Am I missing any dependency? My Homebridge works no problem with tp-link hardware.

Please assist!
Thank you!

Server does not find config.json, if location is specified with --user-storage-path

If the directory containing config.json is specified with -U, life is good: homebridge starts. Otherwise, if the directory containing config.json is specified with --user-storage-path, homebridge fails to start because homebridge-server raises an exception.

Here are the relevant log entries:

[12/18/2016, 12:00:04 AM] Loaded plugin: homebridge-harmonyhub
[12/18/2016, 12:00:05 AM] Registering platform 'homebridge-harmonyhub.HarmonyHub'
[12/18/2016, 12:00:05 AM] ---
[12/18/2016, 12:00:07 AM] Loaded plugin: homebridge-nest
[12/18/2016, 12:00:07 AM] Registering platform 'homebridge-nest.Nest'
[12/18/2016, 12:00:07 AM] ---
[12/18/2016, 12:00:07 AM] Loaded plugin: homebridge-server
[12/18/2016, 12:00:07 AM] Registering platform 'homebridge-server.Server'
[12/18/2016, 12:00:07 AM] ---
[12/18/2016, 12:00:07 AM] Loaded config.json with 0 accessories and 3 platforms.
[12/18/2016, 12:00:07 AM] ---
[12/18/2016, 12:00:07 AM] Loading 3 platforms...
[12/18/2016, 12:00:07 AM] [Harmony Hub] Initializing HarmonyHub platform...
[12/18/2016, 12:00:07 AM] Initializing Nest platform...
[12/18/2016, 12:00:07 AM] Fetching Nest devices.
[12/18/2016, 12:00:07 AM] [Homebridge Server] Initializing Server platform...
[12/18/2016, 12:00:07 AM] [Homebridge Server] !!!
[12/18/2016, 12:00:07 AM] [Homebridge Server] !!!
[12/18/2016, 12:00:07 AM] [Homebridge Server] ERROR: No 'config.json' found!
[12/18/2016, 12:00:07 AM] [Homebridge Server] Please specify the path of your 'config.json'! E.g.: '-U /home/pi/.homebridge'

Reboot issue on MacOS

Launching using a LaunchAgent in the auto-login user's Library. My reboot command is now just 'launchctl unload /Users/*/Library/LaunchAgents/*****.plist' because I'm just trying to get the single command to work. The page just spins but the plist is never unloaded. I wouldn't think I need to do any special permissioning as I am launch HomeBridge via the same launching account, an account that I can interactively unload the plist without any sudo necessary. Anyone see this on MacOS?

HomeBridge Server on Windows 10 Log Path trouble

Hello!
First off thank you for your amazing work. Its very fancy!
I have a few things I would like help with.
I am currently running HomeBridge Server on Windows 10 and it seems to be running ok.
The problem I have is that if I add anything other than "system" for the log path entry here:
"platform": "Server",
"port" : 8765,
"name" : "Homebridge Server",
"log" : "<PATH_TO_YOUR_LOG_FILE>",
"restart" : "<COMMAND_TO_EXECUTE>"

The service does not start.
Ive tried windows variable paths,
UNC paths such as "C:\Users\Username\output.log
and even c:\users\username\Output.log.

Neither option works and therefor stops the service from running.
I can leave it systemd but when I click the log tab in the interface the service crashes.

Also, for the restart value I want to either stop/start the task or even just execute shutdown /r /t 0 and I have a script that starts the service on reboot. Neither option seems to be allowed and does not allow the service to start.

Any advice?

Search and Install plugins

Need the ability to directly search, filter, and install plugins from the community to enable browser-only management.

no logs

My bridge is using "systemd", but the logfiles are empty. Well, my 4th issue. Guess this is a big alpha state-plugin, not really working for me, as I still have to do so much on terminal everytime.

1.0.22 Update - New error at launch

Recently update to 1.0.22 with no changes to my config.json file. Now I get the following error when launching. Everything worked fine before update but now I get;

events.js:160
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE :::8765
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at Server._listen2 (net.js:1252:14)
at listen (net.js:1288:10)
at Server.listen (net.js:1384:5)
at new ServerPlatform (/usr/local/lib/node_modules/homebridge-server/index.js:499:12)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:294:32)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:80:36)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

Nobee needs help! What is my problem?

`{
"bridge": {
„name": "Homebridge",
"username": "****",
"port": ,
"pin": "031-45-
"
},

"accessories": [
],

"platforms": [

{
"platform": "Server",
"port" : ***,
"name" : "Homebridge Server",}
"log" : "<PATH_TO_YOUR_LOG_FILE>",
"restart" : "<COMMAND_TO_EXECUTE>"
},
]
}`

home bridge got error after install home bridge-server plugin

/usr/local/lib/node_modules/homebridge/lib/server.js:176
throw err;
^

SyntaxError: Unexpected token [
at Object.parse (native)
at Server._loadConfig (/usr/local/lib/node_modules/homebridge/lib/server.js:170:19)
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:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)

this is the error. thx

Crash when clicking /listInstallablePlugins

As soon as I click on plugins, the server crashes.

homebridge.service - Node.js HomeKit Server
   Loaded: loaded (/etc/systemd/system/homebridge.service; enabled)
   Active: activating (auto-restart) (Result: exit-code) since Do 2017-01-12 05:35:21 CET; 2s ago
  Process: 13665 ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS (code=exited, status=1/FAILURE)
 Main PID: 13665 (code=exited, status=1/FAILURE)

Jan 12 05:35:21 magicmirror homebridge[13665]: at _combinedTickCallback (internal/process/next_tick.js:74:11)
Jan 12 05:35:21 magicmirror homebridge[13665]: at process._tickCallback (internal/process/next_tick.js:98:9)
Jan 12 05:35:21 magicmirror systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE
Jan 12 05:35:21 magicmirror systemd[1]: Unit homebridge.service entered failed state.

Then auto-restart from homebridge.service kicks in and reboots.

Config:

{ 
    "port": 8765,
    "log": "systemd",
    "restart": "systemctl restart homebridge.service"
}

Platform not loading

Hi,

I have recently installed homebridge-server and updated the config.json (below):

{
"bridge": {
"name": "HomeBridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-453"
},
"description": "HomeBridge",
"accessories": [{
"accessory": "HiveThermostat",
"name": "Hive Thermostat",
"username": "login",
"password": "password"
}
],
"platform": [{
"platform": "Server",
"port": 8765,
"name": "Homebridge Server",
"log": "systemd",
"config": "/usr/local/etc/homebridge",
"restart": "sudo systemctl restart homebridge"
}]
}

The code compiles without error on JSONLint

When I start Homebridge I see the following lines:

[2017-6-23 08:13:01] Loaded plugin: homebridge-hive
[2017-6-23 08:13:01] Registering accessory 'homebridge-hive.HiveThermostat'
[2017-6-23 08:13:01] ---
[2017-6-23 08:13:01] Loaded plugin: homebridge-server
[2017-6-23 08:13:01] Registering platform 'homebridge-server.Server'
[2017-6-23 08:13:01] ---
[2017-6-23 08:13:01] Loaded config.json with 1 accessories and 0 platforms.
[2017-6-23 08:13:01] ---
[2017-6-23 08:13:01] Loading 1 accessories...
[2017-6-23 08:13:01] [Hive Thermostat] Initializing HiveThermostat accessory...
[2017-6-23 08:13:01] [Hive Thermostat] Logging into Hive...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
....

As you can see 0 platforms have loaded.

Any ideas what could be wrong?
Going to http://localhost:8765/ on the Pi fails to load a page.

Task Manager shows the dbus-daemon service is running

Thanks in advance

Possibility to define the "system" log name

Hi,
First of all great plugin and thanks for the job so far done. I ahem implemented the plugin and it works. However I have one minus. I am using multiple instances of home bridge on my server (due to the reason splitting stable from non stable plugins without crashing all my system). This also includes the my system log must be extended with an different search string e.g. "homebridge-main"

Could you make an update to add this configuration as an optional value, so that you aren to only make a call with the hardcoded standard call. For example:

{
    "platform": "Server",
    "port": 8765,
    "name": "Homebridge Server",
    "log" : "systemd"
    **"System-string" : "homebridge-main"**
}

Many Thanks in advance

can get it to work right

I am not sure what I am doing wrong. this is the only plug in I can get to work correctly.

[Homebridge Server] is listening on: http://**.**.**.**:1234
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::9876
    at Object.exports._errnoException (util.js:1022:11)
    at exports._exceptionWithHostPort (util.js:1045:20)
    at Server._listen2 (net.js:1259:14)
    at listen (net.js:1295:10)
    at Server.listen (net.js:1391:5)
    at new InfoPlatform (/usr/local/lib/node_modules/homebridge-info/index.js:63:12)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:294:32)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:80:36)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)

Restart not working - no password

Getting some errors on a Raspberry Pi 3 - Clean install w/ only homebridge-server installed.
Running HB as a service w/ user "homebridge".

When hitting "Restart" on the webpage:

Jan 10 20:00:59 raspberrypi sudo[21509]: pam_unix(sudo:auth): conversation failed
Jan 10 20:00:59 raspberrypi sudo[21509]: pam_unix(sudo:auth): auth could not identify password for [homebridge]
Jan 10 20:00:59 raspberrypi homebridge[21035]: [1/10/2017, 8:00:59 PM] [Homebridge Server] Executing: sudo systemctl restart homebridge
Jan 10 20:01:46 raspberrypi homebridge[21035]: [1/10/2017, 8:01:46 PM] [Homebridge Server] Executing: journalctl --no-pager -u homebridge --since yesterday

Nothing happens...

When I run sudo systemctl restart homebridge it runs as expected.

Jan 10 20:04:42 raspberrypi systemd[1]: Stopping Node.js HomeKit Server...
Jan 10 20:04:42 raspberrypi homebridge[21035]: [1/10/2017, 8:04:42 PM] Got SIGTERM, shutting down Homebridge...
Jan 10 20:04:42 raspberrypi systemd[1]: homebridge.service: main process exited, code=exited, status=143/n/a
Jan 10 20:04:42 raspberrypi systemd[1]: Unit homebridge.service entered failed state.
Jan 10 20:04:42 raspberrypi systemd[1]: Starting Node.js HomeKit Server...
Jan 10 20:04:42 raspberrypi systemd[1]: Started Node.js HomeKit Server.
Jan 10 20:04:42 raspberrypi homebridge[21571]: *** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
Jan 10 20:04:42 raspberrypi nodejs[21571]: *** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
Jan 10 20:04:42 raspberrypi nodejs[21571]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jan 10 20:04:42 raspberrypi nodejs[21571]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs
Jan 10 20:04:42 raspberrypi nodejs[21571]: *** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Jan 10 20:04:42 raspberrypi nodejs[21571]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jan 10 20:04:42 raspberrypi nodejs[21571]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister
Jan 10 20:04:42 raspberrypi homebridge[21571]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jan 10 20:04:42 raspberrypi homebridge[21571]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs
Jan 10 20:04:42 raspberrypi homebridge[21571]: *** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Jan 10 20:04:42 raspberrypi homebridge[21571]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jan 10 20:04:42 raspberrypi homebridge[21571]: *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] Loaded plugin: homebridge-server
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] Registering platform 'homebridge-server.Server'
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] ---
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] Loaded config.json with 0 accessories and 1 platforms.
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] ---
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] Loading 1 platforms...
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] [Homebridge Server] Initializing Server platform...
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] Loading 0 accessories...
Jan 10 20:04:45 raspberrypi homebridge[21571]: Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
Jan 10 20:04:45 raspberrypi homebridge[21571]: ┌────────────┐
Jan 10 20:04:45 raspberrypi homebridge[21571]: │ XXX-XX-XXX │
Jan 10 20:04:45 raspberrypi homebridge[21571]: └────────────┘
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] [Homebridge Server] is listening on: http://XX.XX.XX.XX:8765
Jan 10 20:04:45 raspberrypi homebridge[21571]: [1/10/2017, 8:04:45 PM] Homebridge is running on port 51826.
Jan 10 20:05:49 raspberrypi homebridge[21571]: [1/10/2017, 8:05:49 PM] [Homebridge Server] Executing: journalctl --no-pager -u homebridge --since yesterday

Understanding the installation process

Hi,

Firstly, I am very sorry for these naive questions.

I am an absolute novice. I have managed to get homebridge installed and I am currently running a platform.

I have been having issues trying to add a second platform and when I found your solution I thought it might help me, however, I am having issues getting it installed as I do not know what some of the items and terms used in your installation section mean.

 "log"     : "<PATH_TO_YOUR_LOG_FILE>",
"restart" : "<COMMAND_TO_EXECUTE>"

I have Homebridge installed on a mac mini and to start the homebridge I simply type homebridge into a terminal window and it starts it and I am under the impression when I close the terminal window it then stops the homebridge running.

So, therefore, I am asking for more detail with regards to the correct information I should be using for both the log and the restart above.

Thank in advance for any help you can give me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.