fruggy83 / openocean

27 stars 11 forks source link

Problem with Virtual Rocker Switch #25

Closed kirscheGIT closed 5 years ago

kirscheGIT commented 5 years ago

Hi Daniel, (@fruggy83 ) thank you so much for the new Enocean binding. At the moment I'm running into some issues using the "Virtual Rocker Switch" for my PEHA EasyClick 452 FU-EBIM JR UP Rollershutter device, as this device is not directly supported at the moment. The system I use: A Rasbperry 3B with openHabian, version openHAB 2.3.0-1, a TCM300 USB stick and the OpenOcean version I use is this one here: https://github.com/fruggy83/openocean/raw/master/precompiled/org.openhab.binding.openocean-2.4.0-SNAPSHOT.jar

It seems that the Openocean Binding is up and running. In the log file I get the following output:

2018-11-18 16:46:16.538 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte 2018-11-18 16:46:16.542 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 10 optional length 7 packet type 1 2018-11-18 16:46:16.548 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RADIO_ERP1 with RORG _4BS for FFEDB980 payload A500001108FFEDB9800001FFFFFFFF2E00

So then I tried to teach in the device using the "Virtual Rocker Switch".

I was reading the issue here https://github.com/fruggy83/openocean/issues/18 . First of all I run into the same issue, that I couldn't select a profile during item linking. So I tried the way of creating a manual configuration like in the issue but had the problem, that I couldn't activate the switch. After a little bit back and forth I suddenly could link an item to the thing over the PaperUI. Don't ask me why and what I exactly did. So now I have switch in the UI which is toggeling in the UI, but I'm not able to pair OH2 with the PEHA. There are no log messages which would indicate that there are any messages send by OH2.

Do you have any suggestions? Is this a bug or is it a user problem?

Thanks,

Christian

fruggy83 commented 5 years ago

Hi Christian (@kirscheGIT),

sorry for my late answer, I am a little busy getting this binding into openHab as an official binding.

I am not sure if I understand the docs of your PEHA rollershutter correctly, but I think this rollershutter should be fully supported by this binding. You even do not need the VirtualRockerSwitches, you can use specific messages (EEP) to set your rollershutter to a certain percentage level.

So first of all you could try to send an "UTE teach in" request from your rollershutter like it is described in the "Easyclickpro-Anlernen_an_Gateway.pdf" document and send me the resulting trace log entries.

Best regards Daniel

kirscheGIT commented 5 years ago

Hi Daniel (@fruggy83 ), no need to be sorry. I'm glad that you take the time for developing the addon and supporting it. Thanks! First of all I'm now at the point, where the RockerSwitch is working for the PEHA. I had to install the current development version of OpenHab. Attached the logs from Teach In and Out and the Rocker switch

Teach In:

2018-11-22 21:05:54.551 [nt.ItemStatePredictedEvent] - Virtual_Rocker_RockerSwitch predicted to become ON

2018-11-22 21:05:54.557 [vent.ItemStateChangedEvent] - Virtual_Rocker_RockerSwitch changed from OFF to ON

==> /var/log/openhab2/openhab.log <==

2018-11-22 21:05:54.558 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF670FFF85C833001FFFFFFFFFF00F3

2018-11-22 21:05:54.580 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:05:54.584 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:05:54.588 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:05:54.592 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

2018-11-22 21:05:54.723 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:05:54.728 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 10 optional length 7 packet type 1

2018-11-22 21:05:54.735 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RADIO_ERP1 with RORG _4BS for FFEDB980 payload A5441801F0FFEDB9800001FFFFFFFF3100

2018-11-22 21:05:54.830 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback

2018-11-22 21:05:55.079 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF600FFF85C832001FFFFFFFFFF00BE

2018-11-22 21:05:55.091 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:05:55.095 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:05:55.101 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:05:55.105 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

2018-11-22 21:06:03.512 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:06:03.520 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 10 optional length 7 packet type 1

2018-11-22 21:06:03.524 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RADIO_ERP1 with RORG _4BS for FFEDB980 payload A500001108FFEDB9800001FFFFFFFF3100

Teach Out:

2018-11-22 21:02:57.795 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:02:57.800 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 10 optional length 7 packet type 1

2018-11-22 21:02:57.807 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RADIO_ERP1 with RORG _4BS for FFEDB980 payload A500001108FFEDB9800001FFFFFFFF3400 

Rocker Switch:

018-11-22 21:12:42.386 [ome.event.ItemCommandEvent] - Item 'Virtual_Rocker_RockerSwitch' received command OFF

2018-11-22 21:12:42.402 [nt.ItemStatePredictedEvent] - Virtual_Rocker_RockerSwitch predicted to become OFF

==> /var/log/openhab2/openhab.log <==

2018-11-22 21:12:42.402 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback

2018-11-22 21:12:42.406 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF610FFF85C833001FFFFFFFFFF00F6

==> /var/log/openhab2/events.log <==

2018-11-22 21:12:42.416 [vent.ItemStateChangedEvent] - Virtual_Rocker_RockerSwitch changed from ON to OFF

==> /var/log/openhab2/openhab.log <==

2018-11-22 21:12:42.431 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:42.430 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback

2018-11-22 21:12:42.434 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:12:42.438 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:12:42.440 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

2018-11-22 21:12:42.680 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback

2018-11-22 21:12:42.685 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback

2018-11-22 21:12:42.928 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF650FFF85C833001FFFFFFFFFF000D

2018-11-22 21:12:42.942 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:42.945 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:12:42.949 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:12:42.951 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

2018-11-22 21:12:43.006 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:43.010 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 10 optional length 7 packet type 1

2018-11-22 21:12:43.015 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RADIO_ERP1 with RORG _4BS for FFEDB980 payload A500001708FFEDB9800001FFFFFFFF3A00

2018-11-22 21:12:43.450 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF600FFF85C832001FFFFFFFFFF00BE

2018-11-22 21:12:43.469 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:43.473 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:12:43.478 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:12:43.482 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

2018-11-22 21:12:43.549 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:43.565 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 10 optional length 7 packet type 1

2018-11-22 21:12:43.572 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RADIO_ERP1 with RORG _4BS for FFEDB980 payload A500001508FFEDB9800001FFFFFFFF3D00

2018-11-22 21:12:43.969 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF600FFF85C832001FFFFFFFFFF00BE

2018-11-22 21:12:43.980 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:43.985 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:12:43.989 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:12:43.993 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

==> /var/log/openhab2/events.log <==

2018-11-22 21:12:47.051 [ome.event.ItemCommandEvent] - Item 'Virtual_Rocker_RockerSwitch' received command ON

2018-11-22 21:12:47.064 [nt.ItemStatePredictedEvent] - Virtual_Rocker_RockerSwitch predicted to become ON

==> /var/log/openhab2/openhab.log <==

2018-11-22 21:12:47.072 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback

==> /var/log/openhab2/events.log <==

2018-11-22 21:12:47.072 [vent.ItemStateChangedEvent] - Virtual_Rocker_RockerSwitch changed from OFF to ON

==> /var/log/openhab2/openhab.log <==

2018-11-22 21:12:47.076 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF630FFF85C833001FFFFFFFFFF0008

2018-11-22 21:12:47.097 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:47.101 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:12:47.100 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback

2018-11-22 21:12:47.108 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:12:47.112 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

2018-11-22 21:12:47.349 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback

2018-11-22 21:12:47.354 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback

2018-11-22 21:12:47.598 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF670FFF85C833001FFFFFFFFFF00F3

2018-11-22 21:12:47.610 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:47.625 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:12:47.627 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:12:47.630 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

2018-11-22 21:12:47.656 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:47.659 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 10 optional length 7 packet type 1

2018-11-22 21:12:47.663 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RADIO_ERP1 with RORG _4BS for FFEDB980 payload A500001608FFEDB9800001FFFFFFFF3700

2018-11-22 21:12:48.118 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF600FFF85C832001FFFFFFFFFF00BE

2018-11-22 21:12:48.136 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:48.141 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:12:48.145 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:12:48.149 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

2018-11-22 21:12:48.328 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:48.332 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 10 optional length 7 packet type 1

2018-11-22 21:12:48.339 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RADIO_ERP1 with RORG _4BS for FFEDB980 payload A500001908FFEDB9800001FFFFFFFF3D00

2018-11-22 21:12:48.638 [TRACE] [nal.transceiver.OpenOceanTransceiver] - << Sending data, type RADIO_ERP1, payload 55000707017AF600FFF85C832001FFFFFFFFFF00BE

2018-11-22 21:12:48.664 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Received Sync Byte

2018-11-22 21:12:48.669 [TRACE] [nal.transceiver.OpenOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2

2018-11-22 21:12:48.673 [DEBUG] [nal.transceiver.OpenOceanTransceiver] - RESPONSE with code RET_OK payload 00

2018-11-22 21:12:48.677 [TRACE] [nal.transceiver.OpenOceanTransceiver] - Response without listener

Funny thing is that the documentation you linked, is not matching my device. The paper document coming with my "PEHA 452-FU EBIM JR UP o.A." is different from your linked document

The command in the paper document to my device doesn't mention the UTE command. I have to uswe the LRN button for sending a teach in command.

After the RockerSwithc worked, I'd tried to use the Rollershutter. But I was not able to get it working

kirscheGIT commented 5 years ago

Hi Daniel (@fruggy83)

here is the EEP Table from the paper document:

EEP Description Function Mode
F6-02-01 Light Control 2 Rocker 01 01
F6-03-01 Light Control 4 Rocker 01 01
F6-10-00 Mechanical Handle 05 03
D5-00-01 Single Input / Window Contact 05 03
A5-06-01 Light Sensor 300lx to 60000lx 08 07
A5-06-02 Light Sensor 0lx to 1020lx 08 08
A5-08-01 Light (0lx to 510lx), Occupancy and PIR 08 08
A5-08-02 Light (0lx to 1020lx), Occupancy and PIR 08 08
A5-13-01 Weather Station 08 06
A5-30-02 Window Visualization 05 03
A5-38-08 Gateway - -
32-02-01 Secure light and blind control 01 01
A5-3F-00 RLT Radio Link Test (slave) - -

And here the status response table

EEP Status Response
A5-11-03 Blind / Shutter control status -status of the motor (position)
A5-30-02 Window visualisation - status message: window closed / open

@fruggy83 : Update, I found the PDF for the device here

fruggy83 commented 5 years ago

Hi Christian (@kirscheGIT),

sorry again for my late answer and glad to hear that you can control your rollershutter at least with the virtual rocker switch. However if you have time, I think we should try to get the A5-38-08 EEP (gateway) running with your rollershutter. With this EEP you are able to set your rollershutter to a certain percentage value. In this case you have to do the following steps:

I hope this works 🤞

Best regards Daniel

kirscheGIT commented 5 years ago

Hi Daniel (@fruggy83 ) sending now works. Thank you so much.

So only thing I have to do now, is figuring out how to display the current position.

Thanks!

Christian