Emit Enocean long press from a domoticz switch device

Moderator: leecollings

Post Reply
lolle
Posts: 1
Joined: Saturday 11 November 2017 22:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Emit Enocean long press from a domoticz switch device

Post by lolle »

I am wondering if there is a way to emit an Enocean long press from a domoticz switch device.

In my case I would like it to implement the full open/close feature for a blinds actor. Per default this actor (PEHA 452 FU-EBI JR o.T) behaves as follows when connected to a switch:
- short press on/off -> move blinds up/down while the button is pressed
- long press on/off -> fully open/close blinds (to the open/close end position)
In domoticz I didn't find a way to make a switch type "Blinds" (or any other switch type) to emit a long press. Can anyone point me to the solution how to achieve this?
(The actor has many other EEPs (Enocean equipment profiles) but none of the seems to implement the "fully open/close" on short press.)

AFAIK, the Enocean switch information is always transmitted via two Enocean messages, one on button down ("press") and one on button up ("release"). Thus for a long press the time distance between these messages is more than a certain "long press threshold". It would be very nice if this time distance could be configured for a domoticz switch, but I didn't figure out how to do it.

Maybe there is a way to do that with some complicated scripting (which I didn't take a look at yet), but the "long press" seems quite essential to me and might be usefull for other devices as well, so I fell like I miss something here, right?

Thanks a lot in advance for any help!

Lorenz
lazaruss72
Posts: 17
Joined: Thursday 14 December 2017 23:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Emit Enocean long press from a domoticz switch device

Post by lazaruss72 »

Hello,

i have the same problem with my blinds.
i also need the feature of a "long" press.

Is there anyone who know the right way or a workaround?

thanks a lot
best regards

marco
loedeman
Posts: 1
Joined: Monday 15 May 2017 23:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Emit Enocean long press from a domoticz switch device

Post by loedeman »

Hi,

I also had the same request with my Jung Enocean 4-channel switch. The problem in my scenario appeared to be the Open/Close behavior of the Enocean switches: when opening, a normal 'Open' is being issued. However, on 'Close', a close command is sent for the entire group (thus, 4 channels). This fails proper long pressing.

I think I found a way to circumvent this using dzVents and historical data. On 'Open', I save the open event for the respective switches. On group close, I look up every device's historical data to check 1) if there is an 'Open' in history (otherwise, the close did not originate from this switch), 2) whether or not this command is longer ago than two seconds (which is my definition of a long press) and 3) I clear the historical data to prevent 'hanging long presses'.

I attached the script for your understanding. I hope this helps you as it seems to help me ;) ...

Cheers, Bert

Jung Enocean Long Press.txt
(5.06 KiB) Downloaded 112 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest