edwardtfn / TX-Ultimate-Easy

ESPHome based custom firmware for Sonoff TX Ultimate. Easy to setup.
MIT License
8 stars 3 forks source link

Request: Long Press on each button and multi-touch? #22

Open TeDeVPrime opened 3 weeks ago

TeDeVPrime commented 3 weeks ago

Is it me or did i see a double click / long click event in your code?

From the sensors i can see that you know if the button is being pressed or not so i am guessing it can be done?

that way i can have some actions run without mistakes.

for example Button 3 toggles the cover in the room.... i don't want to toggle the cover by accident so... if we had a long-click event that would make sure that i don't "touch" or "multi-touch" it by mistake

if i had a long-click on multi-touch, i could toggle the lights on the TX Ultimate in case that i don't want them at that time

edwardtfn commented 3 weeks ago

Yes, I currently have events for click, double click and long click, but as I've set those as normal binary sensors we can use any of the automations available: https://esphome.io/components/binary_sensor/index.html#binary-sensor-automation

I have, however, to solve the issue with a click being detected on swipe or multi-fingers touch.

edwardtfn commented 3 weeks ago

By the way, the click, double-click and long-press events are sent to Home Assistant as events. You can monitor those on your Developer Tools / Events area and can use in your automations.

edwardtfn commented 3 weeks ago

I'm not sure I can detect a long multi-touch. Will have to look deeper on this. Most likely we can.

Shach01 commented 2 weeks ago

Hi Edward, thank you very much for the work. I am trying to decrypt the serial between the ESP32 and the touch controller. do you need to send a JSon or initilisation to the controller on boot? we are getting a constant generic stream over serial that does not change with touch inputs. any guidance would be much appreciated. Have a great day