knuckleheadsmiff / homebridge-garagedoor-ryobi

Homebridge plugin for Ryobi GDO (Garage Door Opener)
4 stars 4 forks source link

not really an issue mostly a feature request :) #25

Open Mrdindon opened 3 years ago

Mrdindon commented 3 years ago

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,

knuckleheadsmiff commented 3 years ago

It's not trivial (for me) because of the way the code is structured and for the fact that it may not have the correct current door state. Ideally to make it work I'd send a 'toggle' command to ryobi backend and it would return the new door state.

You might try looking into scripting a shortcut to the ryobi app to see if you can do what you need to do.

I'm also not really doing active development because i'm not set up for it currently (I could do small bug fixes if needed but not new features.)

Worse, I can't test currently because my garage door (not the opener) is busted and because of supply chain issues my new door is not expected to be installed until December (a 5 month wait for what pre-pandemic would have been 2 weeks!) I also may be upgrading my opener when I get the new door although I have not made that decision yet-- If I do that I'll be looking for someone to take ownership of this.

I'll leave this request as open for now.

Mrdindon commented 3 years ago

I totally understand ! I'm also thinking of replacing the opener... so many issues with it... even the car remotes are not reliable !