G-Two / subarulink

A python package for interacting with Subaru STARLINK remote vehicle services.
Apache License 2.0
84 stars 14 forks source link

[Feature] Add ability to stop the current request (Horn / Lights) #26

Closed i814u2 closed 3 years ago

i814u2 commented 3 years ago

In the MySubaru app, you can sound the horn, and then stop it, as well. When sounding, it honks every couple of seconds.

With this, you just send a command to request the event and it keeps going. I haven't fully tested if there's a timeout, or not, on their side, but it would be nice to be able to send a stop command, if that's possible.

I'm not sure what else to provide, but if I can help with any info, just let me know.

Otherwise, thanks for this, it's awesome.

stboch commented 3 years ago

3 things

  1. What model and year car
  2. What country are you in
  3. Can you provide the debug output you see when you send the request for the horn
i814u2 commented 3 years ago

Yeah, probably should have guessed that some vehicle info might be helpful. Sorry about that one, here you go: Ascent 2020 United States

Attached debug (went a little wild redacting things, so if I went too far, let me know): hornDebug.txt

stboch commented 3 years ago

Hmm it seems like this should be an easy add @G-Two here are the two services for stopping lights and horn, personally I didn't notice the stop button in the UI always just let it go for the full minute I think...

app.remoteServiceG2HornLightsStop = new RemoteService("Stop Horn & Lights", "/service/g2/hornLights/stop.json","/service/g2/remoteService/status.json");
app.remoteServiceG2LightsStop = new RemoteService("Stop Lights", "/service/g2/hornLights/stop.json","/service/g2/remoteService/status.json");
G-Two commented 3 years ago

Feature added in #27 with a corresponding update in the custom_component, https://github.com/G-Two/homeassistant-subaru/pull/6

G-Two commented 3 years ago

@i814u2 feature addition complete. Thanks for the suggestion.