New openHab2 EnOcean binding

Hi @fruggy83,

Nice to see you back :slight_smile:

I tried the “generic”-approach - i did not get it to work. I used this map-file (I have no idea, which data i have to use):

ChannelId|OpenhabCommand=EnoceanData(Hex)
genericDimmer|ON=01000009
genericDimmer|OFF=0100000E
genericDimmer|50=01000009
genericTeachInCMD|ON=01000000
genericTeachInCMD|OFF=01000000

The Teach-in was recogniced, but i couldn´t do anything with it.

BUT, i did not give up and tried the “A5-38 - Central command” and it now works flawlessly with my dimmers :smiley:. Of course i can´t retrieve the actual state (actor → unidirectional), but that is ok for me.
I also tested using the “Eltako rollershutter”-Thing and they are are working aswell. The only problem i have, only “up”, “down” and “stop” are working. When i try to set a value (e.g.: 50%), it does not work. No enocean-command gets send by the binding:

17:28:44.275 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Rollo_Schlafzimmer' received command 50
17:28:44.285 [INFO ] [smarthome.event.ItemStateChangedEvent] - Rollo_Schlafzimmer changed from 0 to 50
17:28:44.285 [DEBUG] [rnal.transceiver.OpenOceanTransceiver] - new request arrived

Best regards,
Alex

EDIT:
Oh my enocean-controlls are not working at all at the moment. I think setting the shutter to 50 killed it somehow. But there are no error-messages - nothing. Only with each command → “[DEBUG] [rnal.transceiver.OpenOceanTransceiver] - new request arrived”. Time to restart openhabian.

Hi @tailor

I implemented the EEP class A5-04, which is used by your temperature and humidity sensor. You just have to search for new things and push the teach in button of your sensor.
It would be nice if you could give me a feedback about your tests. I am thinking about a wikipage where I collect all supported and tested EEPs/devices including their teach in method.

Best regards
Daniel

Hi @Casshern

maybe I should revise the documentation about the generic things and give more explanations and further examples. There is far too many information missing.
However the most important test for me went well =>

the teach in was recogniced

Good to know that the A5-38 EEP works with your dimmers. So I can add your dimmer actuator to the supported device list (see my last post).

I also tested using the “Eltako rollershutter”-Thing

Rollershutters are poorly implemented by Eltako (and therefore Opus as well). It is not possible to directly set your rollershutter to a certain percentage value, instead you have to tell it how long it has to drive in which direction :disappointed: To be able to set a percentage value I remember the last driving time (which is send by the actuator) and calculate how long and in which direction it has to drive to reach the percentage value. To do this calculation I need the driving time from up to completely down. This information can be set on channel level.
However as I cannot retrieve the current position of your rollershutter, I first have to move completely up and afterwards down to the percentage value. But let me think about it, maybe I find another solution for your unidirectional actuators. Did this work in fhem?

I think setting the shutter to 50 killed it somehow

You are absolutely right. As the binding could not retrieve a message with the current position or driving time, it was not able to do the driving calculation, so it tried to send a NULL message => fail. I fixed this, so it is no longer a problem if you set a percentage value.

Best regards
Daniel

Hi @fruggy83,

Not really. It was also time-based. So i made it easy for me and just had these buttons: UP, DOWN, 50%, STOP. This should also be working now via rules. So i personaly can live with that.

Thank you.

Best regards,
Alex

Hi @fruggy83

Thank you very much. I used the new jar file and discovered the new thing:

So in Paper UI everything looks perfect. I also created the folowing items:

Number dim_enocean_temp01_temp 			"Enocean 01 Temperature"	 	{channel="openocean:humidityTemperatureSensor:70040895:050c4f7e:temperature"}
Number swi_enocean_temp01_humidity 		"Enocean 01 Humidity"	 		{channel="openocean:humidityTemperatureSensor:70040895:050c4f7e:humidity"}
String swi_enocean_temp01_string		"Enocean 01 Status"	 			{channel="openocean:humidityTemperatureSensor:70040895:050c4f7e:receivingState"}

Unfortunatelly the values don’t get updated (2h since initial discovery):
2

Any hints?

Hi @tailor

sorry my fault, the calculation of the temperatur was wrong (division by zero). In all other temperature telegrams (A5-02, A5-10, …) the min temperature is represented by 0xff and max temp by 0x0. However in this EEP it is the other way around :crazy_face:

Best regards
Daniel

Hi @peter.boehm

glad to hear that everything works well.

I have to test the temperature in the eveneing sensor

Could you test your temperature sensor? Does the binding show the correct values? Could you please tell me which sensor you use? I am working on a compat list. Thanks a lot in advance.

Best regards
Daniel

Good Morning @fruggy83,

I am switching from PaperUI-Items to the .items-config, because i need to use tags.
Could you tell me, how i can link 2 items in config-form as i do i do it via paper-ui (item “Rockerswitch channel B (Sensor)” to “Switch channel B (Actuator)” of another item -> Wallrocker <-> Virtual-Rocker) ?
It is probably very easy, but i don´t get it at the moment.

Here is my sample .items entry:

Switch Licht "Licht" <Light> (EG-Lichter) [ "Lighting" ] {channel="openocean:rockerSwitch:693bb67a:generalSwitchB"}
Switch Licht_Wallrocker "Licht Wandschalter" <Light> (EG-Lichter) {channel="openocean:rockerSwitch:XXXXXXXX:XXXXXXXX:rockerswitchB"}

Best regards,
Alex

EDIT :
I have solved my problem. The solution is discribed here: Openhab Manual

This is how it looks now:

Switch Licht "Licht" <Light> (EG-Lichter) [ "Lighting" ] {channel="openocean:rockerSwitch:693bb67a:generalSwitchB", channel="openocean:rockerSwitch:XXXXXXXX:XXXXXXXX:rockerswitchB"

Thanks. Temperature looks good. Humidity shows an error.

HI @Casshern,

sorry for my late answer, but fortunately you found the solution by yourself. Could you do me a favor and tell me which openhab version you are using. Furthermore it would be interessting what happens when you hit the wall rocker. I would suggest that your openhab rocker switch send a message, too. That should not be problem in this case. I would do it by myself, but I am currently on vacation. Many thanks in advance.

Best regards
Daniel

Hi @tailor,

sorry for my late answer, I am currently on vacation. Following definition works for me:

Item:

Number HumiditySensor "Humidity [%.2f %%]" {channel="openocean:humidityTemperatureSensor:018c1d41:humidity"}

Sitemap:

Text item=HumiditySensor label="Humidity [%.2f %%]"

How did you defined your item/sitemap?

Best regards
Daniel

Hi @fruggy83,

i am using openhabian with “openHAB 2.2.0-1”. I installed everything 13 days ago and never did an update since (do not know if there is one). That is one aspect, i have not read about enough. I want to be sure und informed before i do my first update. Especially the backup-situation.

Exactly what happens. I tried using the fact and cleared my wallrocker from my actuator - so when i press the wallrocker, it sends a message to openhab and openhab to my actuator. But this was not really reliable. Only every second / third click worked.
After teaching in my wallrocker (to the actuator) again, everything works like a charme. Now the actuator does get send 2 signals, but as you said, this is not a problem. The fact that i can use my old unidirectional actuators in a semi-bidirectional way is good enough for me.

Best regards and have a great vacation,
Alex

Hi everybody,

I tested the new binding and discovery works very good but unfortunately not for my rocker ELTAKO FTKE.
The openocean-binding discovered it as a „F6-02 - Rocker Switch“ (as ist should be), so far so good. But when I toggle the switch there is a message in the log, but no action for the item.

Here is the item:

    Switch  Contact3   "Window3"  {channel="openocean:rockerSwitch:8aa89f2e:fefa77a4:generalSwitchB"}

…and the log after toggleing:

14:22:27.531 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received Sync Byte
14:22:27.631 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - Received header, data length 7 optional length 7 packet type 1
14:22:27.933 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - publish event for: fefa77a4
14:22:27.945 [TRACE] [rnal.transceiver.OpenOceanTransceiver] - f6f0fefa77a42001ffffffff4400
14:22:27.970 [DEBUG] [ean.handler.OpenOceanBaseThingHandler] - ESP Packet f6f0fefa77a420 for fefa77a4 received
14:22:27.982 [DEBUG] [ean.handler.OpenOceanBaseThingHandler] - ESP Packet f6f0fefa77a420 for fefa77a4 received
14:22:27.992 [DEBUG] [ean.handler.OpenOceanBaseThingHandler] - ESP Packet f6f0fefa77a420 for fefa77a4 received

btw:
I use the new jar file, definded the OpenOcean Bridge as discribed and discovered the new thing.
My Hardware is a USB300 running on a Raspberry Pi3 gateway and the obenhab-server is connected to this gateway over tcp (socat).

Any idea where the problem could be?
Thanks in advance.

Hi @rainer300,

the problem here is, that your FTKE and a rocker switch use the same EEP group F6. This EEP group does not know a teach in telegram like a 4BS message. So I have do guess which type of thing send such a F6 message. To make it easy for me, I create always a rocker switch thing when I receive a F6 message during discovery. However I already have an idea how I can differentiate between a rocker switch message and an FTKE message. Maybe I find some time to implement this idea tomorrow.
Meanwhile you can just create a F6-10 mechanicle handle manually (thing id: fefa77a4). This thing uses the same telegrams for Open and Close.
What worries me is, that I can only find F6F0 (closed) messages in your log and no F6E0 (open). Or do you find such messages later in your log?

Best regards
Daniel

Hi @fruggy83

thanks for your quick response.
Yes, there is a closed message later in the log.
I’m trying now to add it manually and waiting for your new implementation :grinning:.

Best regards
Rainer

Thanks, now it works!

Hi @fruggy83,

when you are back from vacation, i would appreciate if you could help me again.
I can´t teach-in this rollershutter-actuator: Opus 561.314.
I probably need to use the generic-thing, but i have no idea, what to put into the mapping-file.

Best regards,
Alex

For everyone who is interested in using unidirectional rollershutters with alexa, here is my setup:

home.items:

Rollershutter Rollo "Rollo" <Blinds> (Rollos) {channel="openocean:eltakoFSB:XXXXXXXX:rollershutter"}
Rollershutter Rollo_Alexa "Rollo Alexa" [ "Switchable" ] // Alexa Dummy Item

home.rules:

// Alexa Voice-Control of Rollershutter "Rollo" 
rule "Rollo Voice-Control"
	when
		Item Rollo_Alexa received command
	then
    if (receivedCommand == 0) {
      sendCommand(Rollo, 100)
    } else {
      sendCommand(Rollo, 0)
    }
end

With this rule you can use these alexa commands (i only tested the german ones), instead of 0% and 100%:
“Alexa, Rollo runter” (Alexa, Rollo down)
“Alexa, Rollo hoch” (Alexa, Rollo up)

To elaborate on that: If you tell Alexa “Rollo runter” it sends the command “0” to openhab. With “Rollo hoch” it is “25”.

Best regards,
Alex

1 Like

Hi @rainer300,

I improved the discovery of F6 devices. I do not automatically create a rocker switch during discovery any longer, when I receive a F6 message. Instead I first analyse the payload and decide which thing type should be created. However as a FHF (classical window handle with tilted state) and a FTKE nearly send identical messages, I treat them as the same thing type.
So you should now be able to auto discover your FTKE device. Could you do me favor and send me a picture of your FTKE? I am interested in such a device too, but I cannot image how to integrate this sensor in a door or window :thinking: Thanks a lot in advance.

Best regards
Daniel

Today i implemented an autonomous setup for my Rollershutters via the “Astro Binding”. This means the rollershutters automatically go up at sunrise (or later - you can change the time) and down on sunset.

Here is my setup-guide:

  1. Install “Astro Binding”

  2. Manually add the thing “Astro sun data” via PaperUI (it does not get discovered on its own)

  3. Go to this website: mapcoordinates.net to get your exact geolocation (latitude, longitude and altitude)

  4. Open the “Astro sun date” Thing configuration and put in your location-information.

  5. Change the time-settings in the channels Sunrise-“Range event” and Sunset-“Range event” to your liking as discribed here: Openhab Guide

  6. home.items (only needed if you want to see the sunrise / sunset time on your sitemap):

// Astro Time
DateTime Sunrise "Sunrise [%1$tH:%1$tM]" {channel="astro:sun:XXXXXXXX:rise#start"}
DateTime Sunset "Sunset [%1$tH:%1$tM]" {channel="astro:sun:XXXXXXXX:set#start"}
  1. home.rules:
// Autonomous Rollershutters via Astro-Time

rule "Rollershutter_Sunrise"
	when Channel 'astro:sun:XXXXXXXX:rise#event' triggered START
		then
			sendCommand(Rollershutter_1, 0)
			sendCommand(Rollershutter_2, 0)
end

rule "Rollerhutter_Sunset"
	when Channel 'astro:sun:XXXXXXXX:set#event' triggered START
		then
			sendCommand(Rollershutter_1, 100)
			sendCommand(Rollershutter_2, 100)
end
  1. Enjoy :slight_smile:

Best regards,
Alex