thingsboard / thingsboard-gateway

Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/
Apache License 2.0
1.67k stars 809 forks source link

[HELP] Can't start custom serial connector #1214

Closed song85129 closed 1 month ago

song85129 commented 8 months ago

Describe the issue Create description about your issue, and your actions to solve it. I was following the example to create a custom serial connector. I prepared config files as instructed and when I restart the docker container, it gives me errors

Configuration (Attach your configuration file) Notate: Remove Access token from file if you want to attach a tb_gateway.yaml

Connector name (If you need help with some connector/converter): [e.g. MQTT Connector] Custom serial connector

Error traceback (If it was raised): 2023-11-06 00:03:46 tb-gateway | 2023-11-05 16:03:46 - |INFO| - [tb_loader.py] - tb_loader - import_module - 68 - Import CustomSerialConnector from /thingsboard_gateway/extensions/serial. 2023-11-06 00:03:47 tb-gateway | 2023-11-05 16:03:47 - |ERROR| - [tb_logger.py] - tb_logger - exception - 97 - Can't instantiate abstract class CustomSerialConnector with abstract method get_config 2023-11-06 00:03:47 tb-gateway | Traceback (most recent call last): 2023-11-06 00:03:47 tb-gateway | File "/thingsboard_gateway/gateway/tb_gateway_service.py", line 791, in __connect_with_connectors 2023-11-06 00:03:47 tb-gateway | connector = self._implemented_connectors[connector_type](self, 2023-11-06 00:03:47 tb-gateway | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-11-06 00:03:47 tb-gateway | TypeError: Can't instantiate abstract class CustomSerialConnector with abstract method get_config

Versions (please complete the following information):

imbeacon commented 1 month ago

Hi This logic was completely changed in the latest releases, please try to use them.