New openHab2 EnOcean binding

Hi @ohash Josef,

we should pin your post, as it describes the setup steps really really well. May I add your post to my openocean wiki in github?

Best regards
Daniel

Hi @flynux Tino,

glad to know that you found a solution. If it still annoyes you, I could try to implement a more robust sending queue. The disconnection is already handled automatically with a reconnect. However the message which could not be send is lost. I already implemented a feature which resends a message if the binding did not received an answer in a certain configurable time. This should solve your problems too.

Best regards
Daniel

Hi @fruggy83,

Thanks for the reply, actual i want to close the blinds completely with a daily routine. Actually they go down and then the angel will be set and then they are more or less open.

So, I’ll wait for the angle feature. The other feature i’ll wait for it is the long press of the rockers
 The old version with the numeric states (representing pressed / released) was a little bit easier to script an action for long pressed


the rocker with 4 channels are actually very limited with the actual implementation. I would be great to have an option to use the A_ON / A_OFF / B_ON / B_OFF as 4 Toggle separated Toggle Switches and with the Shot/Long-Press differentiation to have 8 “Toggle” Switches to bind with functions would be fantastic. Actuall without “tricks” you have just 2 Toggle Switches instead of 8 possibilites.

Best Regards,
Yves

Hi @reykj Yves,

thanks a lot for your description and feedback regarding the rocker switch implementation. If you want to make your hands dirty you could already do all that. The classic device already provides String channels which react on commands “DIR1_PRESSED”, “DIR1_RELEASED”, “DIR2_PRESSED” and “DIR2_RELEASED”. If you want to do a long press you should do a timed “DIR1_RELEASED”.

However I am not sure if a long press could be easily implemented for paperui. As far as I know it does not provide a user control for doing a long press.

Best regards
Daniel

thanks for your quick response. But as I said my knowledge here is very limited
 so i took the code you provided and created a “XXX.js” file in my transform folder and pasted it.
But honestly i dont understand the part you descriped after giving the js code.

do you mean this? (found it in documentation)

created an item:

Number VOC_SensorVOC_data { channel=“enocean:genericThing:e1c9e48a:VOC_Sensor:genericNumber”[profile=“transform:JS”, function=“VOC.js”]}

but where in the function do i add what?

i dont really get this part:

The input for the transform is build by ChannelId + ‘|’ + payload
The output of the transform has to be StateType + ‘|’ + value

If you want you could add a test for Data_byte0 = 0x0A to ensure that only data messages are transformed into values. You have to be aware that the order of the bytes is inverted Data_byte3 => b[0], Data_byte2 => b[1], Data_byte1 => b[2], Data_byte0 => b[3]

sry but as you see my knowledge here is verrrryyyy limited :stuck_out_tongue:

Hi @fruggy83 Daniel.

Perhaps you know the standard hue app in combination with friends of hue. There you can define, for each channel an action for normal and long pressed
 that would be great too.

The other direction to send a long pressed would solve my main problem with the angle
 the omnio rollershutter actors would close completely after a long press, but the angle implementation is the better option.

Best regards,
Yves

Hi @FLXM Felix,

first of all you have to install the javascript transformation. PaperUI => Addons => Transformations => Javascript transformation.
The transformation for the generic things is configured directly in the thing. So your thing config should look like

Thing genericThing VOC_Sensor “VOC Sensor (EEP A5_09_0C)” @ “Zimmer4” [ 
      enoceanId=“FFEE7E80”,
sendingEEPId=“A5_FF_FF”,
broadcastMessages=false,
receivingEEPId=“A5_FF_FF”,
suppressRepeating=false] {
      
        Channels: 
            Type genericNumber : genericNumber [transformationType="JS", transformationFunction="VOC.js"]            
      }

Then just connect a NumberItem to your genericNumber channel and wait for an update of your VOC_Sensor.

Best regards
Daniel

The last part of my post provides some background info if you (or anybody else) want to implement another transformation on your own :wink: You can just ignore it.

1 Like

Hi @reykj,

sorry I did not understand you correctly :man_facepalming: It is to late

You just want to react to a long/short press with different actions? This should be easy to implement, I just have to emit some more events depending on the duration of press/release. Afterwards you could react on these events in your rules.
I did just a quick research, but I could just find “LONG_PRESSED”, “SHORT_PRESSED” and “DOUBLE_PRESSED” TriggerEvents already implemented in openhab. So I have to emit custom events like DIR1_LONG_PRESSED and also custom profiles to directly link these events to SwitchItems
 :thinking:

Best regards
Daniel

OK!! Thank you very much for the fast help!!! most appreciated!!You saved me from sending the sonsors back :)!!! VIELEN DANK.
I am getting numbers now :slight_smile:
But after implementing they exploded up to 120.000
 even 250.000. I have 2 of these sensors in different rooms I just switched the sensors to see if 1 might be vaulty. Now i get on both numbers below 100 (one is =4 the other = 52). I will monitor this further :slight_smile:
THanks again

Just to be sure the implementation i just did is only a 1 way communication?! its just transforming the data it receives into the numbers, right?

Update: Numbers seem to calibrating right now. Instructions says it’ll calibrate for 2 days. so I will post some feedback then :slight_smile:

Hi Daniel,
thanks for your feedback. Pls. use my post wherever it might be useful.

Best regards
Josef

Hi @fruggy Daniel, nice to hear from you. Thanks for asking, but at the moment everything runs fine.
Cheers, Tino

Hi Daniel (@fruggy83),
I would also be interested in setting the angle for a rollershutter using the A5-38-08 command.
As I understand the current implementation of the method convertFromCommandImpl in A5_38_08_Blinds.java always sets the angle to 0 degree when handling the position.

Additionally, the subcase

case CHANNEL_ANGLE:

in the implementation is empty .

I would like to contribute and tried to implement this subcase. However, I do not know how to access the position and angle information at the same time in order to calculate the 4 data bytes for the 4BS Message at once. If I try to keep the angle using an internal class variable, this information is lost till the next call triggered by setting the the position value via Paper UI.

Any suggestions, that would help me to implement this feature?

Best regards
Michael

HI Daniel, (@fruggy83)

so I had the java function running for 2 days now and the behavior is more than odd. It seems not to work. I dont know what values are translated. But they dont seem to be right.
In your function you do b[0] * 256 + b[1] I understand this is due to "Data_byte3 + Data_byte2 = 0 to 65535ppb equivalent to 0x00 to 0xFF" But if this is the case why not (b[0] +b[1])*257 (since 65535/0xFF = 65535/255 =257)?
This is just my observation. Since I have no real clue about the function I cant really troubleshoot the problem myself. So far I have experienced weird numbers.
The highest number recorded was more than 1 million, which I dont understand because the maximum should be 65535.

2020-06-08 10:10:11.420 [vent.ItemStateChangedEvent] - VOCSensorEEPA5_09_0C_Number changed from 102476 to 1024133

*I can provide further logs if anyone wants

And the sensor itself has a LED indicatting different VOC levels:

The LED shines green up to 220 ppb (< 1mg/mÂł) = good room air quality.
The LED shines yellow from 221 ppb to 660 ppb = medium room air quality. We advise occasional airing. The LED flashes red as of 661 ppb (> 3mg/mÂł). Every 3 minutes, a 5-fold alert tone sounds = poor room air quality. Prolonged airing required.

But I have seen values like 202 showing YELLOW and values like 25.000 showing YELLOW at 70.000 i saw the LED being RED.

I dont know what i can do its all guesswork. I now deleted the sensor (except temperatur humidity has its own enoceanID) from my items and things. And will monitor just the LED.

I have the feeling the server (Raspberri Pi 3 with enocen Pi element14 gateway) is somehow sending data to the sensor?! Is this possible? (shouldnt “breodcastMessages=false” prevent this)
Another explenation could be a broken sensor. But I will verify my hypothesis by checking the LEDs while the sensor is not “connected” to the bridge.
Looking forward to your Input.

Hi Felix @FLXM,

sorry for my late answer. First of all sensor things do not send any data to the EnOcean devices, they lack the sending functions.

I dont know what values are translated. But they dont seem to be right.

You are right, actually it is not possible to see how the the values are translated. I will add some debug log messages in one of the next releases.

In your function you do b[0] * 256 + b[1] I understand this is due to "Data_byte3 + Data_byte2 = 0 to 65535ppb equivalent to 0x00 to 0xFF" But if this is the case why not (b[0] +b[1])*257 (since 65535/0xFF = 65535/255 =257)?

The value 65535 is a two byte value, so you have to shift the first byte b[0] by eight bits right and add finally the second byte b[1]. In your formula you are adding both byte values and shift the result.
However JavaScript seems to handle the last add not as expected. First it converts b[0] * 256 to a string and advanced the resulting string with b[1]. Thats why you are getting to high values. You should just add brackets to the conversion formula like

return "DecimalType" + "|" + (b[0] * 256 + b[1]);

Best regards
Daniel

Hi Daniel @fruggy83,

well now the numbers look way more plausible :). Should work now!
Now i just have to analyze if using a VOC sensor makes any sense :frowning: since it measures “good” and “bad” VOC particles. Just for everyone else after some research
 It can give you an indication about the “air” but will not be able to let you know if the VOCs its recording are in fact unhealthy or toxic or just some wood oils coming from the floor or furniture.

Anyway thanks for the great support.

Hi Community,

I noticed some odd behaviour with my Eltako FUD14 (dimming actuator, EEP A5-38-08). Switching the dimmer on with a rocker switch restores the last dimming value, but if I send the command “ON” the light dimms always up to 100%. I opened an issue on github as this is not my expected behaviour. Can this be changed?

Best regards,
Lutz

Hello guys from the openHAB-Community,
i am a newbie and i want to ask you, if it would be possible to communicate with a ventilation unit from Maico? My plan is to buy an EnOcean plug-in module for 170 EUR and hope that this one is the correct interface for an openHAB installed raspberry pi? My project is in the planing and i want to know if it would be possible for me to communicate with the ventilation unit from Maico and a heat pump from NIBE.
Thanks for every answer and help.

Hello together!

Hopefully someone can help me further, I have some problems how to go on with the following case:

  • I have a Dimplex DL WE2 ventilation device with enocean-interface and would like to integrate it to my OH. And what I could find out from the manual, it sends its status every 5 minutes or when a status changes. So sounds quite suitable.
    Moreover concerning the EnOcean interface it is written the following:

  • Furthermore on a Pi4 I have OH2.5 running with a USB300 dongle (seems to work, it is mentioned as online in PaperUI).

  • Now, I could already couple an Enocean “Generic thing” (eepid: D2-FF-FF), which must be the ventilation device:


    As you can see in the screenshot, this thing EEP is not supported. It is mentioned, that a “TRANSFORM to convert things messages” has to be used. At this point I got lost.

  • From another community forum, I found out, that the status from the device must be something like this:

elsif ($st eq “heatRecovery.00”) {
# heat recovery ventilation
# (D2-50-00)
my $msgType = hex(substr($data, 0, 1)) >> 1;
if ($msgType == 2) {
my $ventilation = ‘unknown’;
my %ventilation = (
0 => “off”,
1 => 1,
2 => 2,
3 => 3,
4 => 4,
11 => “auto”,
12 => “demand”,
13 => “supplyAir”,
14 => “exhaustAir”

The bold text above would fit to the displayed states of my ventilation system.

  • So I think, with this information a TRANSFORM must be done. But I don’t have any idea how to start that
 :- :face_with_raised_eyebrow:

  • Furthermore I could “sniff” the enocean communication and could see the data log:


    So for me it looks like the first data byte of the message contains the state of ventilation.

==> Can anyone give me a hint how to proceed?

Thank you!
Berti

Hi Daniel,

First – thank you for the insane amount of awesome work you’ve done here. I posted in another thread, but actually think it probably would be better to ask the question in this thread (and I’ve gone through essentially the entire 800 some posts in this thread).

I have successfully gotten the gateway (an enoceanpi) to set up, and it is showing online. When I press the rocker button a few times, I end up with a “simple push button” being connected. However, when I change the toggle position of the button, it does not appear to be sending a message that the other side of the system (a wireless relay) will read.

I am attempting to create a smart switch for this: https://heatstripusa.com/wp-content/uploads/Cut-Sheet-HUSA05-Relay-Rev-B.pdf. The device getting recognized as a “simple push button” is this: https://heatstripusa.com/wp-content/uploads/Cut-Sheet-HUSA03-Single-Wall-Switch-Rev-B.pdf

I am thinking the reason why it may not be working is that the hardswitch had to be “paired” with the relay during setup. I was hoping that merely mimicking it would be sufficient, but it does not appear to be so simple unfortunately (or I am not properly mimicking it right now with your binding).

Thoughts? Really appreciate your awesome work. If you have a patreon or anything I’d love to donate.

[Update] I can pull a dump of each button press using enoceanspy if helpful to drill down on it. I’m guessing the default button isn’t sending some part of the necessary payload.

[Update #2] This may help provide context (https://heatstripusa.com/Manuals/HEATSTRIP%20USA%20CONTROLLER%20PRODUCT%20MANUAL%20Rev%20C%20MAY15.pdf, see page 7: Only one switch/remote control can be linked at a time.). So I basically have to exactly mirror the switch so both my virtual and hardware switch can both control the relay simultaneously, or I could try to mimic a remote (I just don’t happen to HAVE the remote, because it seemed like a waste of a lot of money).

Cheers,

lordloki