homebridge-switchbot icon indicating copy to clipboard operation
homebridge-switchbot copied to clipboard

Feature Request: Double Press

Open Cesco117 opened this issue 2 years ago • 6 comments

Problem

Double press option

Solution

It's not particularly a problem, but I have a device that need 1 press to power on, but 2 presses to power off (Xiaomi projector). It would be nice if, for the same SwitchBot, we could have 2 switches : 1st one for single press and 2nd one for double press. It's the only thing missing for my HomeKit scene to be perfect :) Thanks a lot !

Alternatives

No response

Additional context

No response

Cesco117 avatar Dec 01 '21 00:12 Cesco117

I have add this option into the latest beta if you can give it a try. Currently it is for all push changes where it will push the change twice.

donavanbecker avatar Dec 28 '21 06:12 donavanbecker

I have release v1.7.0 with this included.

donavanbecker avatar Jan 06 '22 06:01 donavanbecker

Oh, thanks !

I didn’t make tests yet, but I guess that I have to put “2” into the “do you want to simulate a double press ?” ?

If I want to be able to alternate between single and double, the better is to create a switch with single press, and one with double press, right ?

and 3rd question, is it possible to set the time between the 2 press ?

thanks again for your consideration and your work !

Cesco117 avatar Jan 06 '22 07:01 Cesco117

but I guess that I have to put “2” into the “do you want to simulate a double press ?” ?

That is correct.

If I want to be able to alternate between single and double, the better is to create a switch with single press, and one with double press, right ?

I want to be able to alternate between the two but wasn't able to the right code needed, I can keep trying.

and 3rd question, is it possible to set the time between the 2 press ?

This also was an issue that I was having. Let me keep trying.

donavanbecker avatar Jan 06 '22 10:01 donavanbecker

but I guess that I have to put “2” into the “do you want to simulate a double press ?” ?

That is correct.

👍

If I want to be able to alternate between single and double, the better is to create a switch with single press, and one with double press, right ?

I want to be able to alternate between the two but wasn't able to the right code needed, I can keep trying.

It will be awesome to have 2 switches, to be able to make scenes with single, and other scenes with double.

and 3rd question, is it possible to set the time between the 2 press ?

This also was an issue that I was having. Let me keep trying.

👍

Whatever you succeed to do, thanks A LOT for your effort, your replies and your work 👍

Cesco117 avatar Jan 14 '22 13:01 Cesco117

I use the v1.14.1 and the double press still doesn't work

cs-banane avatar Jul 12 '22 00:07 cs-banane

I have an Optoma projector which requires a double press of the off button to turn it off. I don't see where I can add this in the config file or the plugin configuration?

Also I'd be very happy if you can have separate switches for on/off.

jeroen020 avatar Oct 26 '22 18:10 jeroen020

Can you try the latest beta:

npm version

Click here to find out how to install Beta

donavanbecker avatar Dec 26 '22 22:12 donavanbecker

@alvst has implemented this in a different way with #628

donavanbecker avatar Dec 26 '22 22:12 donavanbecker

Yea, #628 should will accomplish this but you should really have a wrapper Accessory that uses a cURL to call Switchbot-Homebridge. The wrapper can maintain the power state of the accessory and, if it’s on, automatically instruct the bots to press twice times and once when off. This is similar to my use case (a thermostat). Then you can hide the Switchbot switches in the Home/within Homebridge app.

Alternatively, one could develop and add additional functionality onto of this repo that updates that allows for multiple presses in some instances (for example lights), this way you could do a double press when turning lights off. (This is probably the easiest and best path and most worth implementing.)

One problem you may have is it not being able to double press fast enough because you have to wait for the refresh interval which may be too long for the projector to instruct it to turn off. How quickly does the bot need to double press?

alvst avatar Dec 27 '22 00:12 alvst

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jan 26 '23 11:01 github-actions[bot]

This issue has been closed as no further activity has occurred.

github-actions[bot] avatar Feb 01 '23 11:02 github-actions[bot]