New openHab2 EnOcean binding

openhab2-addons
enocean
binding
Tags: #<Tag:0x00007f0145c97b90> #<Tag:0x00007f0145c97a00> #<Tag:0x00007f0145c97898>

(Frank) #422

Ok, brought the whole thing down to just the enocean bridge and one discovered physical rocker switch as a thing, controlling two unidrectional Peha actuators, one on channel A, the other on channel B.

Now I added manually a classic device using PaperUI, where I have now the field SenderID, choosed EPP F6-02-01 and gave it a proper name. After that I linked the Rocker Switch of the Classic Device to a item type switch, giving it a proper name and define “Enforce an auto update”. This item is then visible in PaperUI’s Control Panel showing a little switch.

Then I set my Peha actuator to learn mode and toggled the software switch of my new item in Control Panel. But the actuator did not signal it learned or deleted something, according to the log openhab2 doesn’t send rocker messages, I just see status messages of the defined item.

But after that my physical rocker switch channel A did switch both actuators all over sudden, channel B just the one what has been defined since years. The channel A switches of the physical rocker has not (!) been pressed while the actuator has been in learning mode. I needed to delete channel A from that actuator manually.

After that I delete everything again, except EnOcean bridge and defined a again a classic device, linking the switch item of it. Actuator still doesn’t learn it, albeit it shows a proper EnoceanID in PaperUI. But that time it doesn’t struggle the programming of my physical rocker switch …

Is it general possible to switch unidirectional actuators from a virtual (software) switch in Openhab2?

Thanks so far.


(Daniel Weber) #423

Hi Christoph (@sepp99),

thanks for the hint, I will change the documentation :+1:

Do you have any further problems now or is everything solved?

Best regards
Daniel


(Daniel Weber) #424

Hi Patrick (@Novize),

glad to hear that it works now.

Best regards
Daniel


(Daniel Weber) #425

Hi Ralf (@shotte),

do you use the snapshot version of the binding. There is currently a bug in the 2.4 version of the binding. However you can use the snapshot 2.5 version of my binding wtith the stable 2.4 version of openHAB.
I am using a Permundo switch for my christmas tree lights and do not have such problems otherwise I would have big troubles with my better half :wink:

Best regards
Daniel


(Daniel Weber) #426

Hi Tino (@flynux),

  1. I would use two classicDevices. One for each light (side note: I know that this is not the intended way openHAB sees devices and channels, however it makes the implementation for you much easier). You do not need to imitate your FT55, it is ok if you use for both classicDevices Channel A for switching. Maybe your FMS61NP just sends back that it switched any light but not which one. Could you post the debug messages when you switch light1 and light2 of your FMS61NP. In case it tells us just that it switched, you have to listen to your FT55 instead.
  2. There should be a restriction how many FMS61NP are usable (if there is no more bug in the binding :roll_eyes:). So when do you get ID 00000000.

Best regards
Daniel


(Daniel Weber) #427

HI Frank (@fnu),

tried to follow New openHab2 EnOcean binding, but I’m struggeling with the input fields

This method was only possible in a very old version of the binding. Currently you have to use a classicDevice as you did. However the 2.4 version of this binding has a bug which prevents sending messages for channelA. So you have to use the 2.5 version of my binding. You find it in my repo.Therefore it is really strange that the virtual openHAB switch should mess up your phyisical configuration :thinking:

Is it general possible to switch unidirectional actuators from a virtual (software) switch in Openhab2?

Sure this is possible. A lot of people could get it to work. I know that @martink2 uses a very similar setup (unidirectional actuators). However you have to use the 2.5 version of the binding.

Best regards
Daniel


(Dennis Dittrich) #428

Hi Daniel, @fruggy83 again.

I did not respond your last message but i wanted to say thank you and i want you to know that my configuration works fine now with the stable release.

best regards
Dennis


(Frank) #429

Hi Daniel (@fruggy83),

ok, good to hear that I’m not on a complete wrong way, albeit I need to learn openhab from scratch in these few days …

I’m trying/I tried to install your 2.5.0-snapshot already, putting the .jar it into the $OPENHAB_HOME/addons folder, but OH2 doesn’t install it by itself.

Must the 2.4.0 Version of EnOcean binding be installed or not to be able to use your 2.5.0-snapshot? Do I need to create a checksum file for it in the addons folder?

Cheers and thanks so far.


(Ralf) #430

Hi Daniel (@fruggy83),

thank you for your tip, but it does not help. I followed exactly all your suggestions:

  1. ENO 2.5 binding is up and running
  2. Ser2Net on my Raspi ist up an running with your settings
TRACEFILE:tr1:/var/log/ser2net.enocean.tr.log
TRACEFILE:tb1:/var/log/ser2net.enocean.tb.log
3001:telnet:600:/dev/ttyENO1:57600 8DATABITS NONE 1STOPBIT remctl max-connections=5 tr=tr1 tb=tb1 tb-hexdump timestamp
  1. Brdige config is up and seems ok
Bridge enocean:bridge:usb300 "ENO Gateway" @ "EnOcean" [ path="rfc2217://192.168.8.222:3001" ] {
   Thing measurementSwitch 0509BFEC "ENO PP01"  @ "EnOcean" [enoceanId="0509BFEC", senderIdOffset=1, sendingEEPId="D2_01_09_PERMUNDO", receivingEEPId="D2_01_09_PERMUNDO", broadcastMessages=false, suppressRepeating=false, pollingInterval=300]
}

OH produces now the following log:

2018-12-22 22:34:55.747 [INFO ] [transceiver.EnOceanSerialTransceiver] - Transceiver shutdown
2018-12-22 22:34:55.752 [hingStatusInfoChangedEvent] - 'enocean:bridge:usb300' changed from OFFLINE (CONFIGURATION_ERROR): Port could not be initialized to OFFLINE (CONFIGURATION_PENDING): opening serial port...
2018-12-22 22:34:55.754 [hingStatusInfoChangedEvent] - 'enocean:bridge:usb300' changed from OFFLINE (CONFIGURATION_PENDING): opening serial port... to OFFLINE (CONFIGURATION_ERROR): Port could not be initialized

When I now open the ser2net log I see only rubbish:

2018/12/22 22:30:55 CLOSE port (All network connections free)
2018/12/22 22:30:55 OPEN (::ffff:192.168.8.10:49344)

which looks in tail -f like:

^g^a^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`
^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`
^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`^`

Any further tips for me? I currently help me by transforming everything to mqtt, but this should be only a temporary solution.

Regards,
Ralf


(Martin Klein) #431

Hi all,

i have a strange problem in my openhab installation, i have dimmers
that report state to openhab. This works properly until i restart opehab
after which it stops updating when dimmers are changed by using wall
switches.

Does anyone else running OH2.4 have the same or similar problems,
all other things except dimmers are not affected?

For details, please see https://github.com/fruggy83/openocean/issues/36.

I would be very greatfull if someone could confirm the issue or even
tell me he is not seeing it so i can compare differences in setup.

Thanks

Martin


(Tino) #432

Hi Daniel (@fruggy83), Many Thanks!
Slowly I get crazy. I followed your instructions and created a second Classic Device with Switch on Channel A and a new Listener on Channel B. But then both lights switched on and off. But to deliver you clean logs from a clean setup I switched back to an earlier VM snapshot, where just the bridge was setup successfully.

But now I get Errors in the log when I teach in the Upper Left switch on the FMS61NP (UT1). See below. The switch is now turning on both lights. I will reset my FMS61NP now, because this was working 12 hours ago.

Many Thanks, Tino

2018-12-23 09:55:52.112 [ERROR] [ernal.transceiver.EnOceanTransceiver] - Exception in informListeners
java.lang.NumberFormatException: For input string: “”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
at java.lang.Long.parseLong(Long.java:601) ~[?:?]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.informListeners(EnOceanTransceiver.java:411) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.processMessage(EnOceanTransceiver.java:300) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.receivePackets(EnOceanTransceiver.java:187) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.access$2(EnOceanTransceiver.java:179) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver$1.run(EnOceanTransceiver.java:155) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

2018-12-23 09:56:08.458 [TRACE] [ernal.transceiver.EnOceanTransceiver] - Received Sync Byte
2018-12-23 09:56:08.459 [TRACE] [ernal.transceiver.EnOceanTransceiver] - >> Received header, data length 13 optional length 7 packet type 1
2018-12-23 09:56:08.461 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG MSC for payload D100D0FF000003FC05127F5B0001FFFFFFFF3D00 received

2018-12-23 09:56:08.461 [ERROR] [ernal.transceiver.EnOceanTransceiver] - Exception in informListeners
java.lang.NumberFormatException: For input string: “”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
at java.lang.Long.parseLong(Long.java:601) ~[?:?]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.informListeners(EnOceanTransceiver.java:411) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.processMessage(EnOceanTransceiver.java:300) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.receivePackets(EnOceanTransceiver.java:187) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver.access$2(EnOceanTransceiver.java:179) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at org.openhab.binding.enocean.internal.transceiver.EnOceanTransceiver$1.run(EnOceanTransceiver.java:155) [209:org.openhab.binding.openocean:2.5.0.201812192037]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

==> /var/log/openhab2/events.log <==
2018-12-23 09:56:18.540 [ome.event.ItemCommandEvent] - Item ‘FMS61NP_UpperLeft_Switch’ received command ON
2018-12-23 09:56:18.552 [nt.ItemStatePredictedEvent] - FMS61NP_UpperLeft_Switch predicted to become ON
2018-12-23 09:56:18.560 [vent.ItemStateChangedEvent] - FMS61NP_UpperLeft_Switch changed from NULL to ON

==> /var/log/openhab2/openhab.log <==
2018-12-23 09:56:18.564 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback
2018-12-23 09:56:18.565 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Sending data, type RADIO_ERP1, payload F630FF8913013001FFFFFFFFFF00
2018-12-23 09:56:18.577 [TRACE] [ernal.transceiver.EnOceanTransceiver] - Received Sync Byte
2018-12-23 09:56:18.578 [TRACE] [ernal.transceiver.EnOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2
2018-12-23 09:56:18.578 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - RESPONSE with code RET_OK payload 00 received
2018-12-23 09:56:18.578 [TRACE] [ernal.transceiver.EnOceanTransceiver] - Response without listener
2018-12-23 09:56:18.866 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback
2018-12-23 09:56:18.867 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Sending data, type RADIO_ERP1, payload F600FF8913012001FFFFFFFFFF00
2018-12-23 09:56:18.878 [TRACE] [ernal.transceiver.EnOceanTransceiver] - Received Sync Byte
2018-12-23 09:56:18.879 [TRACE] [ernal.transceiver.EnOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2
2018-12-23 09:56:18.879 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - RESPONSE with code RET_OK payload 00 received
2018-12-23 09:56:18.879 [TRACE] [ernal.transceiver.EnOceanTransceiver] - Response without listener


(Tino) #433

Hi Daniel (@fruggy83),

so even with the errors in the log I was able to get it run. For the Upper Right Switch on FMS61NP (UT2) I created a Classic Device with just a Switch on Channel A and no listener. After teaching in it worked :slight_smile:

Erstmal Frohe Weihnachten,
Gruss, Tino


(Frank) #434

Hi Daniel (@fruggy83) & all,

I don’t get the “org.openhab.binding.openocean-2.5.0-SNAPSHOT.jar” installed on openhabian.

I even set it up newly from a pristine image copy, since I got some strange errors after playing around with the old installation …

I copy the .jar to the addon folder and nothing happens, not even any notification in log …

Addon folders on openhabian are all linked, /usr/share/openhabian/addons and the ones in /srv/openhab- …

Thanks so far.

Cheers


(Daniel Weber) #435

Hi Frank (@fnu),

you have to install the feature openhab-transport-serial in the karaf console. Use the following command
feature:install openhab-transport-serial

Best regards
Daniel


(Tino) #436

Hi Frank (@fnu), this is what I did:

The last command installs the enocean snapshot automatically from the addon directory. Be careful that you do not clean the cache. When I did it I had to install the enocean snaptshot again.

Thanks, Tino


(Daniel Weber) #437

Hi all (@mhrnr),

I have implemented EEP family A5-07 for devices like the NodOn PIR-2-1-01. As I do not own such a device yet (order is not delivered yet), I would be glad if someone could test this implementation before I do a PR in the official repo. Auto discovery should work. You find an updated version in issue35 branch.

Thanks for your help
Daniel


(Thorsten Oest) #438

Hi Daniel (@fruggy83),

I have removed all configuration files and the enocean binding but got the following statements in the logging:

2018-12-23 14:04:43.598 [.ItemChannelLinkAddedEvent] - Link 'Thorsten_Sued-openocean:rockerSwitch:20229125:rockerswitchA' has been added.
2018-12-23 14:04:43.619 [.ItemChannelLinkAddedEvent] - Link 'FFC75D25_Switch-openocean:rockerSwitch:704bae75:rockerswitchA' has been added.
2018-12-23 14:04:43.623 [.ItemChannelLinkAddedEvent] - Link 'Schlafzimmer_CH1-openocean:virtualRockerSwitch:FFC75D25:rockerswitchA' has been added.
2018-12-23 14:04:43.625 [.ItemChannelLinkAddedEvent] - Link 'Thorsten_Sued-openocean:genericThing:ca390eea:genericLightSwitch' has been added.
2018-12-23 14:04:43.627 [.ItemChannelLinkAddedEvent] - Link 'Schlafzimmer-openocean:genericThing:FFC75D25:genericLightSwitch' has been added.
2018-12-23 14:04:43.631 [.ItemChannelLinkAddedEvent] - Link 'Thorsten_Nord_Switch-openocean:genericThing:FFC75D08:genericLightSwitch' has been added.
2018-12-23 14:04:43.633 [.ItemChannelLinkAddedEvent] - Link 'LichtThorstenNord_Switch-openocean:genericThing:db4426ad:genericLightSwitch' has been added.
2018-12-23 14:04:43.636 [.ItemChannelLinkAddedEvent] - Link 'Schlafzimmer_CH2-openocean:virtualRockerSwitch:FFC75D25:rockerswitchB' has been added.

I removed the links in in the Karaf shell with
smarthome:links clear

After this the openocean errors are gone.

Thorsten


(Daniel Weber) #439

Hi Thorsten (@ThAO),

yes these channel links are stored in the json db. You should find these links in the file org.eclipse.smarthome.core.thing.link.ItemChannelLink.json in your userdata\json folder. Maybe you should also create an issue in openHAB as I would expect that these links should be deleted as well on item deletion???

Best regards
Daniel


(Frank) #440

Hi Daniel (@fruggy83) & Tino (@flynux),

thanks, I appreciate your support, very good info with “feature:install” … didn’t got that from any doc I read … :wink:

Beneath of that, my link to github I used gave me a file with just 58KB, I was already wondering about the difference to the original 2.4.0 jar … but Tino’s link got me the a file in the size of 230KB, much better.

Now something happens using “feature:install”, but get a bunch of java errors:

it looks like my pristine installation lacks from some dependencies:

  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.usbserial

How to fix that? For usbserial I find with feature:list just “esh-config-discovery-usbserial” for annotation nothing.

[EDIT] I might install original 2.4.0 EnOcean binding to have every dependency in place, than remove the 2.4.0 version and install 2.5.0-SNAPSHOT … ?

Thanks for your great support.

Cheers


(Daniel Weber) #441

Hi Tino (@flynux),

I guess you do not have the log entries just before the first entry you posted? This exception occures if the binding receives an enocean message without a senderId. As this should never ever happen, I did not check for an empty senderId and try to parse it into a long value => NumberFormatException. I will improve this but maybe I solve just a symptom and not the real cause with this fix.

Liebe Grüße und frohe Weihnachten
Daniel