Techserv-krY / EnOcean_ESP8266_Gateway

Enocean Gateway 1to1 Telegram to TCP over WiFi, inkl OTA and Wifi Manager / Node-Red
16 stars 3 forks source link

No response from Serial #2

Closed DrRSatzteil closed 3 years ago

DrRSatzteil commented 3 years ago

Hi,

sorry for being a noob but I can't get your code to work with the OpenHab EnOcean binding but I'm not sure where to go from here...

When I'm trying to connect to the gateway from Openhab I see the following TRACE log:

2021-03-09 19:46:02.987 [INFO ] [ernal.transceiver.EnOceanTransceiver] - EnOceanSerialTransceiver initialized
2021-03-09 19:46:02.989 [DEBUG] [nternal.handler.EnOceanBridgeHandler] - request base id
2021-03-09 19:46:02.993 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type COMMON_COMMAND with callback
2021-03-09 19:46:02.995 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Sending data, type COMMON_COMMAND, payload 08
2021-03-09 19:46:02.998 [TRACE] [ernal.transceiver.EnOceanTransceiver] - Sending raw data: 5500010005700838
2021-03-09 19:46:02.999 [DEBUG] [nternal.handler.EnOceanBridgeHandler] - request version info
2021-03-09 19:46:03.001 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type COMMON_COMMAND with callback
2021-03-09 19:46:03.250 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Sending data, type COMMON_COMMAND, payload 03
2021-03-09 19:46:03.252 [TRACE] [ernal.transceiver.EnOceanTransceiver] - Sending raw data: 5500010005700309
2021-03-09 19:47:03.002 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - shutting down transceiver
2021-03-09 19:47:03.004 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Interrupt rx Thread
2021-03-09 19:47:03.007 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Closing serial output stream
2021-03-09 19:47:03.009 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Closeing serial input stream
2021-03-09 19:47:03.011 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Closing serial port

On the diag port I see:

Client connected
Net > Ser:: FF FB 00 
Net > Ser:: FF FD 00 FF FB 03 FF FD 03 FF FB 2C 55 00 01 00 05 70 08 38 
Net > Ser:: 55 00 01 00 05 70 03 09

and nothing else until the OpenHab binding times out. Could you maybe give me a hint as to where I could go from here in terms of debugging? Thank you!

DrRSatzteil commented 3 years ago

Ooops... wired RX and TX the wrong way...

Now I get a "ESP3Packet malformed: 0084800AAA55" from the OpenHab binding. Still trying to figure out what the problem is...

Does not really seem to make any sense since the sent packet looks good when compared to the ESP3 Specs: Ser > Net:: 0x55 0x00 0x05 0x01 0x02 0xDB 0x00 0xFF 0xF8 0x84 0x80 0x0A 0xAA

DrRSatzteil commented 3 years ago

Turned out that there problems where related to the RFC2217 protocol used by the OpenHab enocean binding. I now use socat to fake a serial port on the client. Without the RFC2217 overhead everything seems to work fine!