SwitchBot-MQTT-BLE-ESP32 icon indicating copy to clipboard operation
SwitchBot-MQTT-BLE-ESP32 copied to clipboard

Multiple push patterns

Open mclever opened this issue 3 years ago • 1 comments

Is there a way to send two different on and off push sequences?

For example I have a button that when pushed 3 times it means on, 2 times means auto and then the off command is either 2 or 3 pushes depending on what the first on sequence was.

Thanks

mclever avatar Sep 06 '22 15:09 mclever

I think the latest bot firmware supports 3 modes. I haven't tried the new 'custom' mode yet though or how it interact with my code

modes : switch, press, custom

if you set the mode to custom you can define a number of pushes for on and a number of pushes for off.... I think

If you want to try that out and let me know if the esp32 shows a bot with setting 'custom' if it shows as press mode or switch mode from the esp32. If it shows as 'switch', then it should just work I think. If it shows as 'press' then I'll need to make a minor change in the esp32 code do that custom and switch are both seen as switch

I think that would be the easiest way to support it and would save more battery. only one command would be sent to the bot instead of multiple

devWaves avatar Sep 08 '22 01:09 devWaves