Giter VIP home page Giter VIP logo

homebridge-garagedoor-ryobi's People

Contributors

a15lam avatar andyedinborough avatar apexad avatar dependabot[bot] avatar ezzizzle avatar knuckleheadsmiff avatar rsonnens avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

homebridge-garagedoor-ryobi's Issues

App stops responding

I found that after I installed this, about a week later, the app would stop working, and even using the Ryobi app I could not open/close, or turn on/off the light. If I disable the homebridge and wait 4 days, seems to go back to normal. Almost seems like the server side buffere at Ryobi is filling up with requests, and it is working through them slowly. Has anyone else run into this?

homebridge-garagedoor-ryobi

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 [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

  • [email protected]
    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"
		}
	]
	}
]

}

Fetch Error

Anyone else getting a fetch error? I understand this project is no longer updated. Just wondered if anyone else has run into this.
FEB1C4F5-234A-4136-9F87-3ADE08B3FFD4

Setting odd “opening” state in home app

@andyedinborough

I noticed this behavior and I can’t see an obvious error in the code but hope you have an idea. When I close my garage door not using homekit but with my car remote I’ll often see in the home app the state change from open to opening and then eventually to close!?! It’s odd and when it says opening it was already in the closed state for a long 30-90 seconds.

The only difference that I logically see from original code is the right side of the ?? In getState() but that path should never really be taken unless we got an error in getStatus.

Do you ever see this?

I use to never see see this behavior (at least before the restructuring) but I can’t say when in started.

When starting up first poll of state send notification

I’d like to get rid of a notification being send for the first event after startup. This is because I reboot my server once a day (late at night) and I always get a “closed” event sent when the state is detected.

I don’t set the initial state on the accessory when it is created because I don’t want to freeze the home bridge startup process, and want to asynchronously set the state via polling to be a nice homebridge citizen.

I was think to initialize to “closed” and then have polling code reset. I kind don’t like that because if poll g code was failing for some reason then HomeKit would think the door is not n the wrong state for an extended period of time and I don’t like to give false state reports. Just seems wrong. I’d rather have HomeKit keep the device in an “updating...” state.

If someone has advice that would be great.

I can see HomeKit alerts when I open and close the GDO with the Ryobi app, but cannot open or close door within HomeKit

HI KN,

this is the error I get in homebridge - I can open the GDO within the Ryobi app, but not within HomeKit. I do get the alerts in HomeKit that the door is opening or closing (however it will show HomeKit - no response error when I try to open or close within HomeKit) so its at least connected but it mentions error about wrong state exceeded value, any idea how to change or fix?

[4/17/2021, 8:18:16 PM] [Garage Door] State of Garage Door is: OPENING
[4/17/2021, 8:18:16 PM] [homebridge-garagedoor-ryobi] This plugin generated a warning from the characteristic 'Target Door State': characteristic was supplied illegal value: number 2 exceeded maximum of 1. See https://git.io/JtMGR for more info.
[4/17/2021, 8:18:28 PM] [Garage Door] State of Garage Door is: OPEN
[4/17/2021, 8:19:58 PM] [Garage Door] State of Garage Door is: CLOSED
[4/17/2021, 8:29:46 PM] [Garage Door] State of Garage Door is: CLOSING
[4/17/2021, 8:29:46 PM] [homebridge-garagedoor-ryobi] This plugin generated a warning from the characteristic 'Target Door State': characteristic was supplied illegal value: number 3 exceeded maximum of 1. See https://git.io/JtMGR for more info.
[4/17/2021, 8:30:33 PM] [Garage Door] State of Garage Door is: CLOSED

2nd error message - later in the day didn't do anything
4/18/2021, 9:04:22 AM] [Garage Door] Error update 1 - retrieving ryobi GDO status
[4/18/2021, 9:04:22 AM] [Garage Door] Error Message: SyntaxError: Unexpected token < in JSON at position 0
[4/18/2021, 9:05:52 AM] [Garage Door] State of Garage Door is: CLOSED
[4/18/2021, 9:56:28 AM] [homebridge-garagedoor-ryobi] This plugin slows down Homebridge. The read handler for the characteristic 'Target Door State' was slow to respond! See https://git.io/JtMGR for more info.

not really an issue mostly a feature request :)

In the "Target door state", do you think it would be possible to add a third option ie.: Value = "2" that would act as a toggle switch so that when I set the value to "2", if the door is opened it would close it and its opposite if it is already closed ?

The reason for that is that I would like to make some automation from "ios shortcut" directly from the apple watch but conditional shortcuts doesn't seem to work from the watch (it works only from an iphone)

So that way, if you could implement that sort of "value=2" I could make a simple curl query from shortcut on the apple watch :)

Would it be hard to do ?

query:

curl -X PUT --header "Content-Type:Application/json" --header "authorization: XXX-XX-XXX" http://IPAddress/characteristics --data '{"characteristics":[{"aid":27,"iid":10,"value":2}]}'

{
"format" : "uint8",
"iid" : 10,
"perms" : [
"ev",
"pr",
"pw"
],
"maxValue" : 1,
"minValue" : 0,
"value" : 1,
"type" : "32",
"description" : "Target Door State",
"minStep" : 1,

Notification Issues

I’m not sure if I’m the only one, but my open/close notifications only work about 25% of the time. I’ve made sure that it’s set to receive notifications any time, so it’s not a location issue. My plug-in is up-to-date. I am running the plug-in through Hoobs, which is also up-to-date. Functionality of the opener works fine, opens and closes through the app and via Siri.

garagedoor_id no longer work in 0.2.7

I have 2 garage doors in my account. I was using the garagedoor_id to make use of 2 doors. After updating to 0.2.7 it no longer works.

[9/1/2020, 9:06:58 PM] [Garage 1] Error update 1 - retrieving ryobi GDO status
[9/1/2020, 9:06:58 PM] [Garage 1] Error Message: TypeError: Cannot convert undefined or null to object
[9/1/2020, 9:06:58 PM] [Dads Garage 2] Error update 1 - retrieving ryobi GDO status
[9/1/2020, 9:06:58 PM] [Dads Garage 2] Error Message: TypeError: Cannot convert undefined or null to object

When I use garagedoor_name both instances seem to control the same door.

Logging suggestion for polling state in new code

The logs are getting verbose with two lines, the “polling state” and then the actual state. If not in debug mode it would be better to only log the state when it is different from what was last logged. In debug mode what you have is OK. Anyway just a suggestion to reduce log noise.

TypeError: Cannot read property 'at' of undefined

Getting this error after updating to Homebridge 1.3.4, so I downgraded to 1.2.5 to fix for now.
Node.js Version v14.16.1
Npm Version v7.9.0

Any Ideas?

[14/04/2021, 13:06:26] [Prius] Error update 1 - retrieving ryobi GDO status
[14/04/2021, 13:06:27] [Prius] Error Message: TypeError: Cannot read property 'at' of undefined
[14/04/2021, 13:06:28] [Highlander] Error update 1 - retrieving ryobi GDO status
[14/04/2021, 13:06:28] [Highlander] Error Message: TypeError: Cannot read property 'at' of undefined

Config is :
{
"accessory": "RyobiGarageCommand",
"name": "Prius",
"email": "[email protected]",
"password": "xxxxxxx",
"garagedoor_name": "His",
"poll_short_delay": "15",
"poll_long_delay": "90",
"serial_number": "001"
},
{
"accessory": "RyobiGarageCommand",
"name": "Highlander",
"email": "[email protected]",
"password": "xxxxxxx",
"garagedoor_name": "Hers",
"poll_short_delay": "15",
"poll_long_delay": "90",
"serial_number": "002"
}

Homebridge logs showing: This plugin slows down Homebridge The read handler for the characteristic 'Current Door State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

Hello,

I wanted to pass on that I am receiving the following in my logs, after updating to HomeBridge 1.3.2 (first of the 1.3 versions that I have updated to).

Could you please take a look at this?
Thank you,
Mike

[3/15/2021, 9:43:50 AM] [homebridge-garagedoor-ryobi] This plugin slows down Homebridge. The read handler for the characteristic 'Current Door State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[3/15/2021, 9:43:50 AM] [homebridge-garagedoor-ryobi] This plugin slows down Homebridge. The read handler for the characteristic 'Target Door State' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

Listen for websocket events instead of polling

Polling is inefficient and slow. Instead, the Ryobi GDO API supports listening for events:

    public static String subscribeNotifications(String str) {
        return "{\"jsonrpc\":\"2.0\",\"method\":\"wskSubscribe\",\"params\":{\"topic\":\"" + str + ".wskAttributeUpdateNtfy\"}}";
    }

    public static String unsubscribeNotifications(String str) {
        return "{\"jsonrpc\":\"2.0\",\"method\":\"wskUnsubscribe\",\"params\":{\"topic\":\"" + str + ".wskAttributeUpdateNtfy\"}}";
    }

We should update the code to open the websocket on start and keep it open with periodic pings.

Missing JSON in return results! Need to debug to determine is OK or if a real problem.

I am seeing more transient errors in the logs I've noticed but Im not sure if it is something flaky with the ryobi website. I'm getting responses with invalid JSON but then it works after retrying a few times.

I should fix the logging to show the HTTP return code and debug this more. This seems to only be an issue with Andy's change to use cookies to maintain auth.

I do minimal work on this so if someone else wants to take a look than great!

here is what I am seeing in the logs a lot:

May 25 14:45:24 raspberrypi homebridge[2413]: [5/25/2020, 2:45:24 PM] [Garage Door] State of Garage Door is: CLOSED
May 25 14:47:55 raspberrypi homebridge[2413]: [5/25/2020, 2:47:55 PM] [Garage Door] Error update 1 - retrieving ryobi GDO status
May 25 14:47:55 raspberrypi homebridge[2413]: [5/25/2020, 2:47:55 PM] [Garage Door] Error Message: SyntaxError: Unexpected token < in JSON at position 0
May 25 14:49:41 raspberrypi homebridge[2413]: [5/25/2020, 2:49:41 PM] [Garage Door] State of Garage Door is: CLOSED
May 25 14:52:11 raspberrypi homebridge[2413]: [5/25/2020, 2:52:11 PM] [Garage Door] Error update 1 - retrieving ryobi GDO status
May 25 14:52:11 raspberrypi homebridge[2413]: [5/25/2020, 2:52:11 PM] [Garage Door] Error Message: SyntaxError: Unexpected token < in JSON at position 0
May 25 14:54:42 raspberrypi homebridge[2413]: [5/25/2020, 2:54:42 PM] [Garage Door] Error update 1 - retrieving ryobi GDO status
May 25 14:54:42 raspberrypi homebridge[2413]: [5/25/2020, 2:54:42 PM] [Garage Door] Error Message: SyntaxError: Unexpected token < in JSON at position 0
May 25 14:56:12 raspberrypi homebridge[2413]: [5/25/2020, 2:56:12 PM] [Garage Door] State of Garage Door is: CLOSED

Log Error - UnhandledPromiseRejectionWarning

Since the 0.3.2 update, I'm getting an UnhandledPromiseRejectionWarning. I can uninstall the plugin and reinstall it and it'll work fora little bit, but then goes back to the error. Attached is a screenshot of the log. I am running the plugin using Hoobs on a RPi.

Screen Shot 2021-04-24 at 1 43 44 PM

Error trying to publish on Npmjs

Sorry, all this is new to me so I'm not sure the best way to fix. I think it things /tests should bee in the /src directory. Seems like tests should be "../tests/" in the include line. I'll fix.

russ@russ-air homebridge-garagedoor-ryobi % npm publish

[email protected] prepublishOnly .
npm run lint && npm run build

[email protected] lint /Users/russ/Documents/GitHub/homebridge-garagedoor-ryobi
eslint src/**.ts --max-warnings=0

[email protected] build /Users/russ/Documents/GitHub/homebridge-garagedoor-ryobi
rimraf ./dist && tsc

error TS6059: File '/Users/russ/Documents/GitHub/homebridge-garagedoor-ryobi/tests/RyobiGDOApi.test.ts' is not under 'rootDir' '/Users/russ/Documents/GitHub/homebridge-garagedoor-ryobi/src'. 'rootDir' is expected to contain all source files.
The file is in the program because:
Matched by include pattern 'tests/' in '/Users/russ/Documents/GitHub/homebridge-garagedoor-ryobi/tsconfig.json'

tsconfig.json:16:23
16 "include": ["src/", "tests/"],
~~~~~~~~
File is matched by include pattern specified here.

error TS6059: File '/Users/russ/Documents/GitHub/homebridge-garagedoor-ryobi/tests/integration.ts' is not under 'rootDir' '/Users/russ/Documents/GitHub/homebridge-garagedoor-ryobi/src'. 'rootDir' is expected to contain all source files.
The file is in the program because:
Matched by include pattern 'tests/' in '/Users/russ/Documents/GitHub/homebridge-garagedoor-ryobi/tsconfig.json'

tsconfig.json:16:23
16 "include": ["src/", "tests/"],
~~~~~~~~
File is matched by include pattern specified here.

Found 2 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: rimraf ./dist && tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/russ/.npm/_logs/2021-04-25T19_17_07_230Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] prepublishOnly: npm run lint && npm run build
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] prepublishOnly script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/russ/.npm/_logs/2021-04-25T19_17_07_272Z-debug.log

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.