fruggy83 / openocean

27 stars 11 forks source link

Remote FAM4PI not working #59

Closed 0xE282B0 closed 5 years ago

0xE282B0 commented 5 years ago

Hi,

I played around with Openhab2 over the weekend and tried connecting the Enocean binding to the FAM4PI (TCM-310) on a remote RPI. So I made /dev/ttyAMA0 accessible to my local network via ser2net. Unfortunately, the URL rfc2217://pi-enocean:22100 can't connect. But in a Telnet session I see incoming telegrams.

However, the next attempt was to connect to my remote RPI tty via socat, like this tutorial. I created a local device named /dev/tty.enocean. Et voila! The binding attempts to retrieve the base ID. But it never succeeds.

The following output is the Openhab log with DEBUG loglevel and filtered by grep enocean. (I removed my base ID and chip ID)

2019-01-19 23:12:00.456 [DEBUG] [transceiver.EnOceanSerialTransceiver] - shutting down transceiver
2019-01-19 23:12:00.464 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Interrupt rx Thread
2019-01-19 23:12:00.470 [DEBUG] [transceiver.EnOceanSerialTransceiver] - Closing serial output stream
2019-01-19 23:12:00.477 [DEBUG] [transceiver.EnOceanSerialTransceiver] - Closeing serial input stream
2019-01-19 23:12:00.480 [DEBUG] [transceiver.EnOceanSerialTransceiver] - Closing serial port
2019-01-19 23:12:00.503 [INFO ] [transceiver.EnOceanSerialTransceiver] - Transceiver shutdown
2019-01-19 23:12:00.537 [INFO ] [transceiver.EnOceanSerialTransceiver] - EnOceanSerialTransceiver initialized
2019-01-19 23:12:00.561 [DEBUG] [nternal.handler.EnOceanBridgeHandler] - request base id
2019-01-19 23:12:00.583 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type COMMON_COMMAND with callback
2019-01-19 23:12:00.591 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Sending data, type COMMON_COMMAND, payload 08
2019-01-19 23:12:00.606 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type COMMON_COMMAND with callback
2019-01-19 23:12:00.646 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - RESPONSE with code RET_OK payload 00FF [<BASE-ID>] received
2019-01-19 23:12:00.654 [DEBUG] [nternal.handler.EnOceanBridgeHandler] - received response for base id
2019-01-19 23:12:00.864 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - Sending data, type COMMON_COMMAND, payload 03
2019-01-19 23:12:00.909 [DEBUG] [ernal.transceiver.EnOceanTransceiver] - RESPONSE with code RET_OK payload 00020A000002050000[<CHIP-ID>]454F0103474154455741594354524C0000000000 received

Can someone confirm that the rfc2217:// connection works? Have you seeing something like this before?

fruggy83 commented 5 years ago

Hi @0xE282B0,

did you use the current release or the version directly installed from openHAB2? The version from openHAB has a bug in the rfc connection.

Best regards Daniel

0xE282B0 commented 5 years ago

Maybe that would have saved me a lot of time. I will try later.

0xE282B0 commented 5 years ago

After upgrading Openhab2, openocean and the serial driver everything works fine. Thank you for the quick response!