New openHab2 EnOcean binding

Hi Daniel (@fruggy83) ,

I am also Interested in the RS485 option. Actually I use a FAM with FGW14-USB and some FSB14 Actuators. If you need some help for testing or implementing let me know.

Regards
Frank

Hey Daniel (@fruggy83),

some weeks ago you showed us your work regarding two receiving EEPs in one thing. I am super excited to use this to get better measurement results from my permundo things. So may I ask you, even if you have not finished it yet, would you share the current working state of this feature? Maybe I can lend you a helping hand to finish it :slight_smile:

Another question, do you go to the Smart Home Day in Ludwigsburg? :yum:

Cheers,
Dominik

Hi,

I’m trying to integrate a NODON Smart Plugs. I used the D2-01 Energy measurement switch binding, it works fine but only for switching ON/OFF. I’m not able to get energy and power data. The corresponding channels (Total Usage & Instant Power) are not visible on the configuration page, only Switch and “Receiving status” are available (see attached picture). What am I doing wrong ?

Best regards,
Franck

Hi Franck (@fgaultier),

which “Sending EEP” have you configured? This option defines which channels are available. You have to choose the EEP your device utilizes.

Do you have a NodOn ASP-2-1-01 Metering Smart Plug? This one uses EEP D2-01-0B, which is, as far as I can see, not yet supported by this binding.

Dominik

Hi Dominik,

Thanks for the tip. I switched to D2-01-09 and now it works fine, I can read energy and power.

I have a NodOn micro smart plug with EEP D2-01-0E.

Franck

Hello Dominik (@dominikkv),

sorry for my late answer, I was on vacation the last few weeks. I already pushed my work into my new repo. Currently I am merging your changes into my develop branch 2261-enocean_binding.

Best regards
Daniel

Hi Daniel (@fruggy83),

this is great news, I have already forked your openhab2-addons repo and merged my changes myself. Unfortunately, I can not build the binding with maven, because maven throws an Internal error: org.eclipse.core.runtime.AssertionFailedException: null argument. This error occurs even when I freshly checkout directly from your repo and mvn clean your binding. Does that also happen to you?

And I saw you opened an issue regarding multiple EEPs in the config file :slight_smile:

Best regards,
Dominik

Hi everybody,

I am struggling a bit with the configuration of my lights.

Installing the binding and teaching a window contact worked without any problems. Now i added a rocker switch by paperUI and tried to switch my actuators with the corresponding item, but this does not work.

.item file:

Switch Schalter_Braun_5640A   "Braun_A" {channel="openocean:rockerSwitch:FT1M2J09:001B2B50:rockerswitchA"}
Switch Schalter_Braun_5640B   "Braun_B" {channel="openocean:rockerSwitch:FT1M2J09:001B2B50:rockerswitchB"}

.-f tail

2018-10-13 17:34:58.512 [vent.ItemStateChangedEvent] - Schalter_Braun_5640A changed from OFF to ON
2018-10-13 17:35:00.720 [ome.event.ItemCommandEvent] - Item 'Schalter_Braun_5640A' received command OFF

But if I press my rocker switch manually, I receive the follow outcome in -f tail:

2018-10-13 17:27:19.132 [vent.ChannelTriggeredEvent] - openocean:rockerSwitch:FT1M2J09:001B2B50:rockerswitchA triggered DIR1_PRESSED
2018-10-13 17:27:19.339 [vent.ChannelTriggeredEvent] - openocean:rockerSwitch:FT1M2J09:001B2B50:rockerswitchA triggered DIR1_RELEASED

Due to my understanding of the discussion in here I have expected that switching the button would trigger the channel. My question is, do I need to configure a map or sth. like that to enable my bridge to send out the command to switch the actuator?

Edit: additional info: all rockers are paired to the actuators

Thank you for a short reply.

Good morning Martin (@Woogi)

and very welcome. I have to say that the biniding is not very clear at this point. I try to solve these issues with the next version I am working on. You can image a RockerSwitch thing as a sensor which detects the press/release of your physical switches. However it is not intended (and technical not possible) for emitting switch messages to your actuators. To do this you have to use a VirtualRockerSwitch. This one acts as a virtual rocker switch :wink:

However in most cases it is the best to not use this “old way” of defining things. It is better to use the specific EEPs of your actuator. So the question is which actuators do you want to controll?

Best regards
Daniel

Hi Dominik (@dominikkv),

Unfortunately, I can not build the binding with maven

I am facing the same problem. I already installed a new eclipse instance and did a fresh checkout (without my repo). In this case I even cannot perform the setup task, some other wierd problems. So I currently seeting up a Linux VM. I also need this because of the gnu.io/nrjavaserial issues on windows os.

By the way I am not going to the Smart Home Day in Ludwigsburg. I am living near to cologne. So it is a little bit to far away for me. However I wish you a nice day.

Best regards
Daniel

Good morning Daniel @fruggy83,

thank you for the quick reply.

I am using such actuators: [https://www.sensocasa.de/Aktoren/Universal/Auslaufmodell-OPUS-greenNet-Schaltaktor-2-fach-UP-Multifunktio::513.html](picture of “2-Fach-Schaltaktor”). I have no idea how to identify the EEP. Even the ID is not printed on the device (its one of the first enocean devices).

Based on what you wrote it is not necessary to define items for physical RockerSwitches. As per my understanding I should define the thing and based on rules an can sniff the signal and change light status when pressing physical buttons (which is working):

.rule (basic draft):

rule "Enocean Braun Empfang An"
  when
    Channel 'openocean:rockerSwitch:FT1M2J09:001B2B50:rockerswitchA' triggered DIR2_PRESSED
  then
     Schalter_Braun_5640A.sendCommand(ON)
end

Might you could provide a hint how to control my actuators? Is my understanding right, that receiving status I can use rules (like I wrote) to change the status in my OH and if I want to control the actuators by OH I need to implement a virtual rockerSwitch to emit the correct signal (with EEP info - I don’t know at the moment - and parameter to the actuator)?

Kindly,
Woogi

Hello Martin (@Woogi),

hm
 forget everything I said. Your actuator are inded

one of the first enocean devices

So this actuator does only accept rocker switch messages and no other EEP. However the biggest drawback is that this actuator does not send its current status back when you switched it. So we have to setup your actuator in the following way:

  1. Create a VirtualRockerSwitch => this thing is used to controll your actuator. As it acts as a rocker switch, you have to teach it into your actuator. Maybe this can be avoided if you are coming from a fhem installation?
  2. Create a RockerSwitch thing for each physical rocker switch, which can controll your actuator. These things are needed to react to your physical rocker switches and sync the status of your actuator with your openhab item.

I hope this helps you helps you and gives you an idea. If I am not wrong I think that @Casshern has a similar setup (same actuators Opus 561.312 and also 561.314 rollershutter actuator). Maybe he can help you further with a running example of one of his actuators.

Best regards
Daniel

Hi Martin (@Woogi),

i have the same rollershutter-actuators. After long tests, problems and thanks to @fruggy83, i got them to work. I will write you a setup guide (maybe today or tomorrow). The key thing is, you have to use a “Virtual Rocker Switch” and another rollershutter-item to control the actuator via a rule.

To get a feedback from unidirectional actuators, you have to teach in your wall-rockers into openhab, as Daniel said. Than you have to link the Sensor-Channel of that rocker-switch to your virtual-rocker-switch. This is easily done via the .items-file, which i absolutely recommend using. It should look like this:

Switch EG_Licht_Bad_1 "EG Bad Licht 1" <Light> (EG-Lichter) [ "Lighting" ] {channel="openocean:virtualRockerSwitch:ddeee1f3:virtualRockerswitchA", channel="openocean:rockerSwitch:f5ba27f9:XXXXXXXX:rockerswitchA"}

Best regards,
Alex

Hi Dominik (@dominikkv),

I fixed the problem and pushed my changes. Be careful the last changes are not tested very well. Furthermore the current version does not longer use the thingId for the EnOceanId. Instead I introduced an independent property for this Id. I also signed the last commit with your name as it contains your last changes now. I hope you agree with my merge of your changes. Send me a PM if you find any problem.

Best regards
Daniel

1 Like

Hey @dominikkv, hey @Casshern,

thank you both for you tipps. I solved the issue now and I assume I found a good way to switch the plugs.

  1. I setup the virtual wall switch by adding over the gateway,
  2. I setup a virtual item with the channel
Switch Licht_Virtual_Rocker_Leseecke &lt;lightbulb&gt; {channel="openocean:virtualRockerSwitch:XXXXXXX:virtualRockerswitchA"}
  1. I setup a physical rocker switch item including channel (sniffed by gateway and added then same as point 2)
  2. I setup some rules, that the sitemap item (which is the virtual switch) is changing is as well, if physical switch is pressed
rule "Leseecke AN"
  when
    Channel 'openocean:rockerSwitch:XXXXXX:XXXXXXXX:rockerswitchB' triggered DIR2_PRESSED
  then
     Licht_Virtual_Rocker_Leseecke.sendCommand(ON)
      
      logInfo("Leseecke", "Results are: \n" + Licht_Virtual_Rocker_Leseecke.state )
end

Now i will integrate all the other actuators in the same way and create groups to see general information about the overall status of “all lights” if they are on or off.

Thank you both, that helped a lot.

Hey Daniel (@fruggy83),

thanks, again, for your time and your work! Yesterday in the evening I made the transition from org.openhab.binding.openocean to org.openhab.binding.enocean. There were some issues I had to solve, so I want to share my experience with all :crazy_face:

  • There is a new parameter “enoceanId” you have to provide in your Thing declaration. Does this replace the Thing UID completely, and you can set the UID to whatever you want?
  • humidityTemperatureSensor is renamed to temperatureHumiditySensor, but on my dev setup, the old thing xml still existed, resulting in no error / log entry, and no thing creation. It drove me crazy and cost me some hours to recognise this :wink:. I think I did something wrong with merging

  • The EEPType Rollershutter_A5 with EEP A5-11-03 is missing, I did a PR.
  • Parameter EEPId does no longer exist, instead use sendingEEPId and receivingEEPId
  • You can give multiple EEPs in receivingEEPId, seperated by , and I see you have found a workaround for #6146, nice!
  • I combine the two EEPs D2-01-09 and A5-12-01 for power measurements, and it seems the two profiles have different number precision, resulting in some jumps down here and there in total power consumption :stuck_out_tongue_closed_eyes:
  • You have changed the SerialPort implementation, does that mean we no longer need to install openhab-transport-serial? I run OpenHAB2 in a docker container, the first time I tried the new binding everything went fine, but after a container restart the binding was not able anymore to connect to the serial port. After some search I added the env var EXTRA_JAVA_OPTS: "-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0" to my container, now it works again. I have to keep an eye on the stability of this.
  • The bridge is now called bridge (and not serialbridge) and has a parameter path (not port). And, of course, all openocean declarations have changed to enocean in .things and .items files.

That’s it! I also had some fun updating to OpenHAB 2.4.0.M4 because of the karaf console bug with SSH, but now I have a working system with the updated version of your binding. Next steps are integration of Eltako FUD61NPN and Eltako FWZ12, but that’s another story :sunglasses:

Cheers
Dominik

Hey Martin (@Woogi),

it is also possible to bind an item to two channels like @Casshern demonstrated. In this case you do not need your rule. However if you want to stay with your rule, I would suggest to use a “postCommand” instead of a “sendCommand”. Using a “sendCommand” will trigger the virtual rocker switch to send an ON/OFF command when it is updated by the rocker switch.

Best regards
Daniel

Hey Dominik (@dominikkv),

thanks a lot for your explanations. This will help a lot for the transition to the new binding. However be aware that the new binding is still in developement and under review by Kai Kreuzer. So further breaking changes could occur.

Does this [enoceanId] replace the Thing UID completely, and you can set the UID to whatever you want?

Yes the enoceanId replaces the Thing UID completely. You can now choose your UID to whatever you want. Background: Kai told me that the thing UID should be meaningless as it could be defined in various ways.

It drove me crazy and cost me some hours to recognise this

Sorry for these problems. I just wanted to use the chance to fix up some names.

The EEPType Rollershutter_A5 with EEP A5-11-03 is missing, I did a PR.

My fault. Manual merging is always a bad idea :wink:

it seems the two profiles have different number precision

I have also seen this behaviour on my NodOn switches. Do you think this is a problem?

You have changed the SerialPort implementation

Yes I changed the implementation as Kai wants to get rid of the gnu.io dependency. Furthermore a generic serial port manager is already implemented in the ESH project which also supports ser2net connections. So I switched over. We do not need to install openhab-transport-serial any longer. The required features should now be installed automatically.

Next steps are integration of Eltako FUD61NPN and Eltako FWZ12

The FUD61NPN should work out of the box as it uses the same EEP as my FUD14. The FWZ12 sounds very interesting. Please keep me in the loop with your integration of your FWZ12.

Best regards
Daniel

Sorry to disturb but i have some questions:
I have 4 NodeOn D2-01 relays Switch (2 input each) that were working ok but now one stops to send RSSI information. In the logs i can see openhab sees the packets when i switch on or off a light from the button on the wall but it doesnt update the status on habpanel or habmin. And if i push the button on my panel sometimes the lights doesnt turn on or off. Other relays are working well. Where i need to look to resolve this?

Second question: The UTE packet. In the README on github i see that i can discovery the relay. For the node on is this working? becouse this is what i’va done to register them in openhab:
1)Pressing the button on the releys three times (channel1) and the light start to blink
2)Launching discovery in habpanel
3)Waiting to show up the device: but it doesnt show up

I need to send a speciale UTE packet from openhab? is right to say that the Tech-in button in my nodeon D02-01 Wall Switch is the black button on the actouator? And i have to repeat the procedure 2 times becouse the Wall Switch have 2 channel?

Thank you a lot

Federico

Hello Frederico (@execcr),

do you know what you have done since your relay is not worling anymore? Did you updated the binding? Maybe it has something to do with weak signal strength? However if you have entries about the packets in your log, everything should be ok. Maybe you should try to place your receiver next to your relay and watch what happens.

Regarding UTE teachin: The discovery of your NodOn relays should work. However as the UTE teachin response has to be send within 700 ms after the UTE request, you have to switch step 1 and 2. First activate the discovery in habpanel and then press your button on your relay. This has to be done just one time per relay.

Best regards
Daniel