Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homebridge-garagedoor-ryobi #2

Closed
wnaylor opened this issue Jan 14, 2020 · 9 comments
Closed

homebridge-garagedoor-ryobi #2

wnaylor opened this issue Jan 14, 2020 · 9 comments
Assignees

Comments

@wnaylor
Copy link

wnaylor commented Jan 14, 2020

Whenever I try to install the home bridge plugin homebridge-garagedoor-ryobi I get this message below. It seems it installed correctly but the warning is that it is missing the dependencies show below. I have tried to install these two dependencies to no avail. When I open home bridge it tells me that the garage door plugin is installed but it doesn't show my garage door as an accessory. It just doesn't work. Is the problem the two dependencies below or something else. I'll also include my json file below.
Thank you for any help with this problem.

Waynes-iMac:~ wnaylor$ npm install -g homebridge-garagedoor-ryobi
npm WARN ws@7.2.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.2.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

  • homebridge-garagedoor-ryobi@0.2.6
    added 52 packages from 64 contributors in 3.357s
    Waynes-iMac:~ wnaylor$

I committed the sensitive materials for the platforms below but everything works but the Garage Door Opener accessory.

{
"bridge": {
"name": "Homebridge",
"username": "C8:28:3D:E9:CE:30",
"port": 51826,
"pin": "041-78-280"
},

"platforms": [{
		"platform": "SensiboSky",
		"name": "Sensibo",
		"apiKey": "SENSIBOAPIKEY",
		"timeLapse": 5,
		"ai": true,
		"hideFan": false,
		"hideHumidity": true,
		"fixedState": "auto"
	},
	{
		"platform": "Bond",
		"bonds": [{
			"ip_address": "BONDIPADDRESS",
			"token": "BONDTOKEN"
		}],
		"accessories": [
			{
			"accessory": "RyobiGarageCommand",
			"name": "Garage Door Opener",
			"email": "MYRYOBIEMAILADDRESS",
			"password": "MYRYOBIPASSWORD"
		}
	]
	}
]

}

@knuckleheadsmiff
Copy link
Owner

knuckleheadsmiff commented Jan 14, 2020

Normally I say to include any errors you see from the log file to look into this further but yes if dependencies are not correctly installed that would be the first things to fix. I have a dependency on websockets (ws) and it has the dependencies you listed as required.

Googling returned this:

Have you tried updating ALL your NPMs to the latest version like that article suggests. Reading that post makes it seem like you are running some old stuff. (I'm also running version 6.13.4 of NPM itself.)

try:
npm outdated -g
npm update -g

(or the equivalent commands for your setup.)

Also, if you could include relevant info from your log file (you may have to turn on debugging?) that would be great. That would show where/why things are failing.

Note that to debug somethings you have to add the "debug_sensitive" flag for this NPM (see my doc.) I'd look at the log before have to do this. If you end up doing this you may want to clean up the log before sending. I wish I did not need this flag but it is what it is.


As an FYI I use:

which makes it easy to see log files and devices directly from the server. I've found that looking via homekit sometimes gets messed up because of homekit cache issues.

@wnaylor
Copy link
Author

wnaylor commented Jan 14, 2020

I set up the homebridge-config to work on a browser. It works but I still can't get home bridge-garagedoor to work. I am including the response I get from opening home bridge on my iMac.

[1/14/2020, 5:08:36 PM] [HB Supervisor] Homebridge Storage Path: /Users/wnaylor/.homebridge
[1/14/2020, 5:08:36 PM] [HB Supervisor] Homebridge Config Path: /Users/wnaylor/.homebridge/config.json
[1/14/2020, 5:08:36 PM] [HB Supervisor] Logging to /Users/wnaylor/.homebridge/homebridge.log
[1/14/2020, 5:08:36 PM] [HB Supervisor] Homebridge Path: /usr/local/lib/node_modules/homebridge/bin/homebridge
[1/14/2020, 5:08:36 PM] [HB Supervisor] UI Path: /usr/local/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js
[1/14/2020, 5:08:36 PM] [HB Supervisor] Started Homebridge with PID: 62650
[1/14/2020, 5:08:36 PM] Loaded config.json with 0 accessories and 3 platforms.
[1/14/2020, 5:08:36 PM] ---
[1/14/2020, 5:08:36 PM] [Config] Homebridge Config UI X v4.7.0 is listening on :: port 8581
[1/14/2020, 5:08:36 PM] Loaded plugin: homebridge-bond
[1/14/2020, 5:08:36 PM] Registering platform 'homebridge-bond.Bond'
[1/14/2020, 5:08:36 PM] ---
[1/14/2020, 5:08:36 PM] Loaded plugin: homebridge-config-ui-x
[1/14/2020, 5:08:36 PM] Registering platform 'homebridge-config-ui-x.config'
[1/14/2020, 5:08:36 PM] ---
[1/14/2020, 5:08:37 PM] [Config] Added new user: admin
[1/14/2020, 5:08:37 PM] [Config] Username and password have been set to default:
[1/14/2020, 5:08:37 PM] [Config] Username: admin
[1/14/2020, 5:08:37 PM] [Config] Password: admin
[1/14/2020, 5:08:37 PM] Loaded plugin: homebridge-garagedoor-ryobi
[1/14/2020, 5:08:37 PM] Registering accessory 'homebridge-garagedoor-ryobi.RyobiGarageCommand'
[1/14/2020, 5:08:37 PM] ---
[1/14/2020, 5:08:37 PM] Loaded plugin: homebridge-sensibo-sky
[1/14/2020, 5:08:37 PM] Registering platform 'homebridge-sensibo-sky.SensiboSky'
[1/14/2020, 5:08:37 PM] ---
[1/14/2020, 5:08:37 PM] Loading 3 platforms...
[1/14/2020, 5:08:37 PM] [Sensibo] Initializing SensiboSky platform...
[1/14/2020, 5:08:37 PM] [Sensibo] Fetching Sensibo devices...
[1/14/2020, 5:08:37 PM] [Bond] Initializing Bond platform...
[1/14/2020, 5:08:37 PM] [Config] Initializing config platform...
[1/14/2020, 5:08:37 PM] [Config] Running in Standalone Mode.
[1/14/2020, 5:08:37 PM] [Bond] 2 cached accessories were loaded
[1/14/2020, 5:08:37 PM] [Bond] Getting devices...
[1/14/2020, 5:08:37 PM] [Bond] 2 devices were found on this Bond.
[1/14/2020, 5:08:37 PM] [Bond] Attempting to add 0 devices that were not previously added.
[1/14/2020, 5:08:37 PM] [Sensibo] Basement AC : AI State: true , RefreshCycle: 5000 , fixedState, AI, hideFan : auto true false
[1/14/2020, 5:08:37 PM] [Sensibo] Device Added (Name: Basement AC, ID: Jwh5gUre, Group: pods)
[1/14/2020, 5:08:37 PM] [Sensibo] Initializing platform accessory 'Basement AC'...
Setup Payload:
X-HM://0023JF42WOB9J
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 041-78-280 │     
└────────────┘     

[1/14/2020, 5:08:37 PM] Homebridge is running on port 51826.
[1/14/2020, 5:08:37 PM] [Bond] Configure Accessory: Master Bedroom CF
[1/14/2020, 5:08:37 PM] [Bond] Configure Accessory: My Room CF
[1/14/2020, 5:13:04 PM] [Bond] got value: true
[1/14/2020, 5:13:04 PM] [Bond] got value: -1
[1/14/2020, 5:13:04 PM] [Bond] got value: 33
[1/14/2020, 5:13:04 PM] [Bond] got value: false
[1/14/2020, 5:13:04 PM] [Bond] got value: false
[1/14/2020, 5:13:04 PM] [Bond] got value: 0
[1/14/2020, 5:13:04 PM] [Bond] got value: false
[1/14/2020, 5:13:07 PM] [Bond] got value: false
[1/14/2020, 5:13:07 PM] [Bond] got value: -1
[1/14/2020, 5:13:07 PM] [Bond] got value: false
[1/14/2020, 5:13:07 PM] [Bond] got value: 0
[1/14/2020, 5:13:07 PM] [Bond] got value: true
[1/14/2020, 5:13:07 PM] [Bond] got value: false
[1/14/2020, 5:13:07 PM] [Bond] got value: 33

As you can see it loaded 3 platforms and 2 accessories associated with the Bond platform but no accessory for garage door.

@knuckleheadsmiff
Copy link
Owner

knuckleheadsmiff commented Jan 14, 2020

After the Platforms loading you should see two lines like:

[1/14/2020, 5:00:20 AM] Loading 1 accessories...
[1/14/2020, 5:00:20 AM] [Garage Door] Initializing RyobiGarageCommand accessory...

What I see is that your accessories are not being loaded which points to a conf file problem. Looking at your conf above I think I see the issue. The section

		"accessories": [
			{
			"accessory": "RyobiGarageCommand",
			"name": "Garage Door Opener",
			"email": "MYRYOBIEMAILADDRESS",
			"password": "MYRYOBIPASSWORD"
		}

is in the wrong place. It needs to be at the same level as

"platforms": [

and NOT nested within platforms. More like this (either above of below the platforms section.):

"accessories": [
	{
		"accessory": "RyobiGarageCommand",
		"name": "Garage Door Opener",
		"email": "MYRYOBIEMAILADDRESS",
		"password": "MYRYOBIPASSWORD"
		}
],
"platforms": [{
		"platform": "SensiboSky",
		"name": "Sensibo",
		"apiKey": "SENSIBOAPIKEY",
		"timeLapse": 5,
		"ai": true,
		"hideFan": false,
		"hideHumidity": true,
		"fixedState": "auto"
	},
	{
		"platform": "Bond",
		"bonds": [{
			"ip_address": "BONDIPADDRESS",
			"token": "BONDTOKEN"
		}],
	}
]



@knuckleheadsmiff
Copy link
Owner

So what is happening ^^^^ is HomeBridge is not reading the accessories section and not calling the homebridge-garagedoor-ryobi plugin for your account. Let me know if this fixes your issue and/or close the issue if it works once you fix this.

@wnaylor
Copy link
Author

wnaylor commented Jan 14, 2020

I rewrote the son like you said putting the accessories on top but I can't it verified in JasonLint. Please help.

{
"bridge": {
"name": "Homebridge",
"username": "C8:28:3D:E9:CE:30",
"port": 51826,
"pin": "041-78-280"
},
"accessories": [{
"accessory": "RyobiGarageCommand",
"name": "Garage Door Opener",
"email": "MYRYOBIEMAILADDRESS",
"password": "MYRYOBIPASSWORD"
}],
"platforms": [{
"platform": "SensiboSky",
"name": "Sensibo",
"apiKey": "SENSIBOAPIKEY",
"timeLapse": 5,
"ai": true,
"hideFan": false,
"hideHumidity": true,
"fixedState": "auto"
},
{
"platform": "Bond",
"bonds": [{
"ip_address": "BONDIPADDRESS",
"token": "BONDTOKEN"
}],
}
]

@knuckleheadsmiff
Copy link
Owner

knuckleheadsmiff commented Jan 14, 2020

This site can help you:

https://jsonformatter.org/json-pretty-print

Looks like you have an extra "," and a missing '}'

You probably want this:

{
  "bridge": {
    "name": "Homebridge",
    "username": "C8:28:3D:E9:CE:30",
    "port": 51826,
    "pin": "041-78-280"
  },
  "accessories": [
    {
      "accessory": "RyobiGarageCommand",
      "name": "Garage Door Opener",
      "email": "MYRYOBIEMAILADDRESS",
      "password": "MYRYOBIPASSWORD"
    }
  ],
  "platforms": [
    {
      "platform": "SensiboSky",
      "name": "Sensibo",
      "apiKey": "SENSIBOAPIKEY",
      "timeLapse": 5,
      "ai": true,
      "hideFan": false,
      "hideHumidity": true,
      "fixedState": "auto"
    },
    {
      "platform": "Bond",
      "bonds": [
        {
          "ip_address": "BONDIPADDRESS",
          "token": "BONDTOKEN"
        }
      ]
    }
  ]
}

@knuckleheadsmiff knuckleheadsmiff self-assigned this Jan 14, 2020
@wnaylor
Copy link
Author

wnaylor commented Jan 15, 2020

It looks like it loaded garage door but now have have other problems. It is telling me that I am using port 8561 and I should change the port. Is this happening because I am using homebridge-cofig or is there something wrong with my son file. Below is the homebridge terminal results.

Last login: Tue Jan 14 18:46:48 on ttys000
Waynes-iMac:~ wnaylor$ homebridge
[1/14/2020, 6:47:52 PM] Loaded config.json with 1 accessories and 3 platforms.
[1/14/2020, 6:47:52 PM] ---
[1/14/2020, 6:47:52 PM] Loaded plugin: homebridge-bond
[1/14/2020, 6:47:52 PM] Registering platform 'homebridge-bond.Bond'
[1/14/2020, 6:47:52 PM] ---
[1/14/2020, 6:47:52 PM] Loaded plugin: homebridge-config-ui-x
[1/14/2020, 6:47:52 PM] Registering platform 'homebridge-config-ui-x.config'
[1/14/2020, 6:47:52 PM] ---
[1/14/2020, 6:47:52 PM] Loaded plugin: homebridge-garagedoor-ryobi
[1/14/2020, 6:47:52 PM] Registering accessory 'homebridge-garagedoor-ryobi.RyobiGarageCommand'
[1/14/2020, 6:47:52 PM] ---
[1/14/2020, 6:47:52 PM] Loaded plugin: homebridge-sensibo-sky
[1/14/2020, 6:47:52 PM] Registering platform 'homebridge-sensibo-sky.SensiboSky'
[1/14/2020, 6:47:52 PM] ---
[1/14/2020, 6:47:52 PM] Loading 3 platforms...
[1/14/2020, 6:47:52 PM] [Sensibo] Initializing SensiboSky platform...
[1/14/2020, 6:47:52 PM] [Sensibo] Fetching Sensibo devices...
[1/14/2020, 6:47:52 PM] [Bond] Initializing Bond platform...
[1/14/2020, 6:47:52 PM] [Config] Initializing config platform...
[1/14/2020, 6:47:52 PM] [Config] Spawning homebridge-config-ui-x with PID 74640
[1/14/2020, 6:47:52 PM] Loading 1 accessories...
[1/14/2020, 6:47:52 PM] [Garage Door Opener] Initializing RyobiGarageCommand accessory...
[1/14/2020, 6:47:52 PM] [Bond] 2 cached accessories were loaded
[1/14/2020, 6:47:52 PM] [Bond] Getting devices...
[1/14/2020, 6:47:52 PM] [Bond] 2 devices were found on this Bond.
[1/14/2020, 6:47:52 PM] [Bond] Attempting to add 0 devices that were not previously added.
[1/14/2020, 6:47:53 PM] [Bond] Configure Accessory: Master Bedroom CF
[1/14/2020, 6:47:53 PM] [Bond] Configure Accessory: My Room CF
[1/14/2020, 6:47:53 PM] [Sensibo] Basement AC : AI State: true , RefreshCycle: 5000 , fixedState, AI, hideFan : auto true false
[1/14/2020, 6:47:53 PM] [Sensibo] Device Added (Name: Basement AC, ID: Jwh5gUre, Group: pods)
[1/14/2020, 6:47:53 PM] [Sensibo] Initializing platform accessory 'Basement AC'...
Setup Payload:
X-HM://0023JF42W3C0L
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
┌────────────┐
│ 041-78-280 │
└────────────┘
[1/14/2020, 6:47:53 PM]

Error: listen EADDRINUSE: address already in use :::51826
at Server.setupListenHandle [as _listen2] (net.js:1306:16)
at listenInCluster (net.js:1354:12)
at Server.listen (net.js:1442:7)
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:616:16)
at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:132:16)
at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:421:14)
at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19
at /usr/local/lib/node_modules/homebridge-sensibo-sky/index.js:88:6
at /usr/local/lib/node_modules/homebridge-sensibo-sky/lib/sensiboapi.js:98:5
at IncomingMessage. (/usr/local/lib/node_modules/homebridge-sensibo-sky/lib/sensiboapi.js:50:21)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21)

[1/14/2020, 6:47:53 PM] Got SIGTERM, shutting down Homebridge...
[1/14/2020, 6:47:54 PM] [Config] Homebridge Config UI X v4.7.0 is listening on :: port 8581
[1/14/2020, 6:47:54 PM] [Config]

Error: listen EADDRINUSE: address already in use :::8581
[1/14/2020, 6:47:54 PM] [Config] Another process or service on this host is using port 8581.
[1/14/2020, 6:47:54 PM] [Config] Please stop the other service or change the port you have assigned to homebridge-config-ui-x.
[1/14/2020, 6:47:54 PM] [Config] Ending process now.
Waynes-iMac:~ wnaylor$
Quotes are in red in terminal

This is my config.json file

{
"bridge": {
"name": "Homebridge",
"username": "C8:28:3D:E9:CE:30",
"port": 51826,
"pin": "041-78-280"
},
"accessories": [{
"accessory": "RyobiGarageCommand",
"name": "Garage Door Opener",
"email": "EMAIL",
"password": "PASSWORD"
}],
"platforms": [{
"platform": "SensiboSky",
"name": "Sensibo",
"apiKey": "APIKEY",
"timeLapse": 5,
"ai": true,
"hideFan": false,
"hideHumidity": true,
"fixedState": "auto"
},
{
"platform": "Bond",
"bonds": [{
"ip_address": "IPADDRESS",
"token": "TOKEN"
}]
},
{
"name": "Config",
"port": 8581,
"auth": "form",
"theme": "auto",
"tempUnits": "f",
"platform": "config"
}
]

}

@knuckleheadsmiff
Copy link
Owner

I can’t help you with that. I’m going to close this bug.

You have two errors, one with SensiboSky and the other with the config UI—both having nothing to do with the ryobi app. The problem could be so many things about your system.

You just might want to reboot your machine and or temporarily remove one or both of the config sections for those devices to narrow down your issues.

Good luck.

@wnaylor
Copy link
Author

wnaylor commented Jan 15, 2020

Thank you for your patience. I research the problem and it seemed that I had more than one homebridge running at the same time. I used sudo killall homebridge to stop homebridge and that was the problem. I have my Ryobi garage door showing up in Homekit. Thank you again for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants