Help needed with bindings for Elro devices

I am trying to set up a binding with Elro switches, but it is not working. Following the recommendations in https://github.com/openhab/openhab/wiki/RFXCOM-Binding I have created following item:

Switch ElroB “Lichten voor het raam” (Lights, gWoonkamer {rfxcom=">552653.315:LIGHTING4.PT2262:Command"}

Before I added ‘.315’ nothing was send to the rfxcom device, so from the sample in earlier mentioned reference I added it and then saw the following in the log:

015-12-28 14:54:07.425 [DEBUG] [.rfxcom.internal.RFXComBinding] - Received command (item=‘ElroB’, state=‘OFF’, class=‘class org.openhab.core.library.types.OnOffType’)
2015-12-28 14:54:07.427 [DEBUG] [.rfxcom.internal.RFXComBinding] - Transmitting data: 09130008086EEC013B0000
2015-12-28 14:54:07.828 [DEBUG] [.b.r.internal.RFXComConnection] - Data received:
Raw data = 0402010800

  • Packet type = TRANSMITTER_MESSAGE
  • Seq number = 8
  • Sub type = UNKNOWN
  • Response = ACK
    2015-12-28 14:54:07.831 [DEBUG] [rfxcom.internal.ResultRegistry] - Transmitter response received:
    Raw data = 0402010800
  • Packet type = TRANSMITTER_MESSAGE
  • Seq number = 8
  • Sub type = UNKNOWN
  • Response = ACK
    2015-12-28 14:54:07.833 [DEBUG] [.rfxcom.internal.RFXComBinding] - Command succesfully transmitted, ‘ACK’ received

But noting happened, when I use the control (and it works) I see this:

2015-12-28 14:54:21.941 [DEBUG] [.b.r.internal.RFXComConnection] - Data received:
Raw data = 0913000B545451014B70

  • Packet type = LIGHTING4
  • Seq number = 11
  • Sub type = PT2262
  • Id = 5526533
  • Command = ON
  • Pulse = 331
    2015-12-28 14:54:22.152 [DEBUG] [.b.r.internal.RFXComConnection] - Data received:
    Raw data = 0913000C54555F014970
  • Packet type = LIGHTING4
  • Seq number = 12
  • Sub type = PT2262
  • Id = 5526789
  • Command = UNKNOWN
  • Pulse = 329

As you can see the raw data send from openhab : Transmitting data: 09130008086EEC013B0000 is quite different from what the remote send: 0913000B545451014B70. But I haven’t got a clue on how to fix this, any suggestions are welcome

Hi pensionado,

I compiled a new version which should fix the problem with lighting4 devices : http://dr-petelot-marion.chirurgiens-dentistes.fr/temp/org.openhab.binding.rfxcom_1.9.0.201601221259.jar .
For your sensor, it should work with : {rfxcom=">SensorId.PulseLength:LIGHTING4.PT2262:Command"}
In order to define SensorId and PulseLength (often 350), you can use the RFXMngr from RFXCOM.
Can you test it and give me your feedback ? If it doesn’t work, can you send me logs from RFXMngr when you click on ON and OFF.

Thanks

Hi Speeder,

Hi Speeder,

Thanks for putting in the effort.

I tried but in vane, I have attached the rfxmngr trace (

) and the openhab log (part) with debug.openhab_trc.pdf (18.4 KB)

Hi @pensionado, sorry for the late answer, I missed your message…
In the meantime, I have continued to work on the lighting4 binding : cf https://github.com/openhab/openhab/issues/3858 . A final binding version was compiled :
http://dr-petelot-marion.chirurgiens-dentistes.fr/temp/org.openhab.binding.rfxcom_1.9.0.201601301041.jar .

According to your RFXMngr logs, your sensorId is 345429 (S1-S20 in decimal). Can you test with the new binding and {rfxcom=">345429.315:LIGHTING4.PT2262:Command"} ? If it doesn’t work please send me your openhab.log.

Hi @Speeder,

 I have tested your supplied library without luck. I have attached 

my openhab.log and made notes in the log on what I did and the results.
I did 3 runs:

  1. With your supplied library, it appeared it created problems for one
    of my rule files, didn’t think it was important so I ignored it. NO LUCK

  2. With your recommended item settings and the 1.8.1 rfxcom jar, NO LUCK

  3. With my previous item settings
    (rfxcom=">5522769.350:LIGHTING4.PT2262:Command"}) and the 1.8.1 rfxcom
    jar, PARTIAL luck, ON worked, OFF didn’t.

    Hope this might help solving it.

    Best regards

Gerard Dirkse

Hi @pensionado, nothing is attached !

Hi @Speeder, it was attached to the mail I sent, must have been lost somewhere, here it is. Oops, format is not accepted, here it is converted to pdf.openhablog.pdf (58.0 KB)

Hi @pensionado ,

This binding version worked without problem for https://github.com/openhab/openhab/issues/3858 . Thus the anomaly with your rule file is probably not directly linked to it. Perhaps it is due to a bad timing during file loading.
This update was recently merged into Openhab, Can you use the official file : https://openhab.ci.cloudbees.com/job/openHAB1-Addons/ and then select the latest build, openHAB RFXCOM Binding and download the .jar

Can you test with a longer pulse : {rfxcom=">345429.350:LIGHTING4.PT2262:Command"}

According to your this new binding generate the correct message : 09130001545551013B00 for ON and 09130002545554013B00 for OFF.

Hi @Speeder,

Am still testing, have got 1 of 3 switches working so am trying to get a as complete as possible test (or discover why they don’t work). Am a bit distracted at the moment with the DSMR binding. As soon as I have exhausted my testing with logs, I will get back to you.

Hi @Speeder,

Finished my analysis (attached). In short the new binding does not work at all for any of the switches, the official 1.8.1 binding works for 1 of 3 switches. According to my analysis you are sending it to the wrong ID to the other 2:elroanalysis.pdf (29.7 KB)1 digit is different, with the new binging all the digits are different.

Let me know if you need more traces / tests.

Hi @pensionado,
You don’t use the correct ID with the new binding. With the new one, you have to use only the 20 first bits of the RfxMngr code. For ElroA it gives 544551 as code and 345173 as Openhab ID. It explains why you got the wrong Openhab message with 1.9-snapshot binding.

Hi @Speeder,
Thanks for the hint on changing ID’s, I now have all three switches working. Thanks for fixing this and your help of courses