Hi everyone,
first of all: I’m taking my very first steps with the binding, the whole EnOcean ecosystem in general and the used hardware. I’m struggling to setup an EnOcean gateway with an ESP8266 and the EnOcean Pi module.
I guess this is most likely not an issue with the binding but probably my own inability somewhere along the way… Please let me know if this question is therefore inappropriate in this thread, I will create a new one then.
Since I might be completely on the wrong path so some help would be really appreciated.
This is my current setup:
Board: https://www.az-delivery.de/products/nodemcu with EnOcean Pi from element14
I use the library from: GitHub - Techserv-krY/EnOcean_ESP8266_Gateway: Enocean Gateway 1to1 Telegram to TCP over WiFi, inkl OTA and Wifi Manager / Node-Red
I use the following path: rfc2217://10.9.0.195:9999
The problem:
When I try to connect to the bridge I see that messages to retrieve base id and version are sent out in the 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
When connected to the diag port on the esp8266 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 then nothing until the binding runs into a timeout apparently.
This is the output of tcpdump -i bond0 -nn -s0 -v host 10.9.0.195
(10.9.0.195 is my gateway and 10.9.0.101 is my openhab instance):
tcpdump: listening on bond0, link-type EN10MB (Ethernet), capture size 262144 bytes
22:24:58.327600 IP (tos 0x0, ttl 64, id 3661, offset 0, flags [DF], proto TCP (6), length 60)
10.9.0.101.39508 > 10.9.0.195.9999: Flags [S], cksum 0x1568 (incorrect -> 0x43e8), seq 2315558440, win 64240, options [mss 1460,sackOK,TS val 3526047793 ecr 0,nop,wscale 7], length 0
22:24:58.434140 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.9.0.101 tell 10.9.0.195, length 46
22:24:58.434192 ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.9.0.101 is-at e6:ef:7c:b2:63:9e, length 28
22:24:58.435897 IP (tos 0x0, ttl 255, id 2350, offset 0, flags [none], proto TCP (6), length 48)
10.9.0.195.9999 > 10.9.0.101.39508: Flags [S.], cksum 0x6575 (correct), seq 6667, ack 2315558441, win 2144, options [mss 536,nop,nop,sackOK], length 0
22:24:58.435978 IP (tos 0x0, ttl 64, id 3662, offset 0, flags [DF], proto TCP (6), length 40)
10.9.0.101.39508 > 10.9.0.195.9999: Flags [.], cksum 0x1554 (incorrect -> 0x9c0c), ack 1, win 64240, length 0
22:24:58.436294 IP (tos 0x0, ttl 64, id 3663, offset 0, flags [DF], proto TCP (6), length 43)
10.9.0.101.39508 > 10.9.0.195.9999: Flags [P.], cksum 0x1557 (incorrect -> 0x9c05), seq 1:4, ack 1, win 64240, length 3
22:24:58.688913 IP (tos 0x0, ttl 255, id 2351, offset 0, flags [none], proto TCP (6), length 40)
10.9.0.195.9999 > 10.9.0.101.39508: Flags [.], cksum 0x8e9d (correct), ack 4, win 2141, length 0
22:24:58.689001 IP (tos 0x0, ttl 64, id 3664, offset 0, flags [DF], proto TCP (6), length 60)
10.9.0.101.39508 > 10.9.0.195.9999: Flags [P.], cksum 0x1568 (incorrect -> 0x3d1a), seq 4:24, ack 1, win 64240, length 20
22:24:58.939192 IP (tos 0x0, ttl 255, id 2352, offset 0, flags [none], proto TCP (6), length 40)
10.9.0.195.9999 > 10.9.0.101.39508: Flags [.], cksum 0x8e9d (correct), ack 24, win 2121, length 0
22:24:58.939261 IP (tos 0x0, ttl 64, id 3665, offset 0, flags [DF], proto TCP (6), length 48)
10.9.0.101.39508 > 10.9.0.195.9999: Flags [P.], cksum 0x155c (incorrect -> 0x3d6c), seq 24:32, ack 1, win 64240, length 8
22:24:59.188998 IP (tos 0x0, ttl 255, id 2353, offset 0, flags [none], proto TCP (6), length 40)
10.9.0.195.9999 > 10.9.0.101.39508: Flags [.], cksum 0x8e9d (correct), ack 32, win 2113, length 0
22:25:58.442132 IP (tos 0x0, ttl 64, id 3666, offset 0, flags [DF], proto TCP (6), length 40)
10.9.0.101.39508 > 10.9.0.195.9999: Flags [F.], cksum 0x1554 (incorrect -> 0x9bec), seq 32, ack 1, win 64240, length 0
22:25:58.503090 IP (tos 0x0, ttl 255, id 2354, offset 0, flags [none], proto TCP (6), length 40)
10.9.0.195.9999 > 10.9.0.101.39508: Flags [R.], cksum 0x36d1 (correct), seq 1, ack 33, win 24584, length 0
22:26:03.541689 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.9.0.195 tell 10.9.0.101, length 28
22:26:03.622344 ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.9.0.195 is-at 3c:61:05:d4:f6:2c, length 46
My guess is that the code I’m using is just not compatible/broken or whatever. The author advertised his code here a while ago but there was no discussion about it so I’m not sure if anyone ever tried it. Any other suggestions (software or hardware related) are also very welcome!