aarons22 / homebridge-bond

Homebridge plugin for Bond
MIT License
64 stars 31 forks source link

possible to run IR command twice for "power off"? #148

Closed iogitio closed 3 years ago

iogitio commented 3 years ago

hello again :)

I programmed the OFF button on my IR remote into the Bond Bridge.

Unfortunately, my projector requires that the OFF button is pressed twice (the 2nd time is to confirm that I want to turn off the projector). Is it possible (via this plugin) to have the 'power off' function in Bond to trigger twice behind the scenes?

chrismerck commented 3 years ago

A thought: You could possibly fix this at the Bond API level by increasing the reps argument in devices/<dev_id>/commands/<command_id>/signal endpoint. (See docs: http://docs-local.appbond.com/#tag/Device-Command-Signal). It is currently 1, you could try PATCHing it to 2.

aarons22 commented 3 years ago

@chrismerck is that something @iogitio can do one-off for their device?

chrismerck commented 3 years ago

Absolutely. There's no interface for it in the app, but here's a video guide I made a while back:

https://www.youtube.com/watch?v=RWOH2WqzNOU

iogitio commented 3 years ago

Very intriguing @chrismerck , will watch the video and try to figure this out! Do you happen to know if there’s a way to space a few seconds between each command in the duplicate sequence?

chrismerck commented 3 years ago

if there’s a way to space a few seconds between each command

A few seconds? That would require a script inside the Bond Bridge with a callback. Something we can do with our internal device templates but not exposed for users at this time.

If just a few 100 ms is enough, maybe you could accomplish this by adding zero padding at the end of the signal.data field. Depending on signal.encoding there's two ways to do it. You could paste the signal response on the Bond Home Forums and we could try to support you in adding the padding there, since it's decidedly not a HomeBridge thing at that point.

iogitio commented 3 years ago

thanks for the tip @chrismerck ... I'm gonna attempt to increase the reps to something high like "20" and see if that'll get my projector IR hex to turn off... I'm hoping the projector will register one of the last 19 commands as the 2nd "press".

If not, I'll drop it on the Bond Forum and see what happens :) Will report back here regardless...!

iogitio commented 3 years ago

Absolutely. There's no interface for it in the app, but here's a video guide I made a while back:

https://www.youtube.com/watch?v=RWOH2WqzNOU

This worked out PERFECTLY in my case!!! Tried 30 reps, then tried again down at 10 reps so there's less blue blinking lights when Bond runs the commands. amazing, thank you infinitely!!!