woozar / node-red-contrib-time-based-dimmer

MIT License
4 stars 4 forks source link

No Issue, but question #13

Closed HBO2 closed 3 years ago

HBO2 commented 3 years ago

Is there an option to set an off command when there is no message. I mean I have a button which can send long push, but it's sending noting when release.

thx

sphanley commented 3 years ago

I'm not affiliated with this project, but I hope this helps: If your device sends a "long push" event repeatedly until it's released, you don't need this node - you could just trigger your dimming by adjusting a small amount each time the event is fired. But if it sends a "long push" event only once after a minimum amount of time that distinguishes it from a short push, and no event is sent when you release, then there's no way to use that device as a dimmer, because there'd be no way to determine the duration of the press.

woozar commented 3 years ago

I am sorry for my late answer. The notification of your question just slipped through my email account somehow. @sphanley is absolutely right, so thanks for helping out. If you have one event "long press" and no further events, you may only use something like e.g. "short press is +- x and long press is +-y", but this is not "time based", so this node will not help you.