thingsboard-gateway 3.7.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. thingsboard_gateway/__init__.py +0 -0
  2. thingsboard_gateway/config/1.json +222 -0
  3. thingsboard_gateway/config/356T.json +71 -0
  4. thingsboard_gateway/config/4T.json +71 -0
  5. thingsboard_gateway/config/5.json +58 -0
  6. thingsboard_gateway/config/EDE.csv +23 -0
  7. thingsboard_gateway/config/as.json +73 -0
  8. thingsboard_gateway/config/b.json +78 -0
  9. thingsboard_gateway/config/backup/1.backup.1753355774.json +232 -0
  10. thingsboard_gateway/config/backup/356T.backup.1753355972.json +81 -0
  11. thingsboard_gateway/config/backup/356T.backup.1753355980.json +71 -0
  12. thingsboard_gateway/config/backup/4T.backup.1753355991.json +81 -0
  13. thingsboard_gateway/config/backup/5.backup.1753355909.json +68 -0
  14. thingsboard_gateway/config/backup/5.backup.1753355947.json +68 -0
  15. thingsboard_gateway/config/backup/5.backup.1753355960.json +68 -0
  16. thingsboard_gateway/config/backup/b.backup.1753355798.json +88 -0
  17. thingsboard_gateway/config/backup/bacnet.backup.1761122955.json +66 -0
  18. thingsboard_gateway/config/backup/bacnet.backup.1761123037.json +66 -0
  19. thingsboard_gateway/config/backup/bacnet.backup.1761123073.json +66 -0
  20. thingsboard_gateway/config/backup/bacnet.backup.1761123092.json +63 -0
  21. thingsboard_gateway/config/backup/bacnet.backup.1761123101.json +63 -0
  22. thingsboard_gateway/config/backup/bacnet.backup.1761123130.json +63 -0
  23. thingsboard_gateway/config/backup/bacnet.backup.1761123137.json +63 -0
  24. thingsboard_gateway/config/backup/bacnet.backup.1761123165.json +66 -0
  25. thingsboard_gateway/config/backup/bacnet.backup.1761123186.json +69 -0
  26. thingsboard_gateway/config/backup/bacnet.backup.1761651011.json +73 -0
  27. thingsboard_gateway/config/backup/c.backup.1753355825.json +104 -0
  28. thingsboard_gateway/config/backup/g.backup.1753355855.json +73 -0
  29. thingsboard_gateway/config/backup/gh.backup.1753355891.json +153 -0
  30. thingsboard_gateway/config/backup/modbus.backup.1760523436.json +107 -0
  31. thingsboard_gateway/config/backup/modbus.backup.1760523491.json +107 -0
  32. thingsboard_gateway/config/backup/modbus.backup.1760523511.json +107 -0
  33. thingsboard_gateway/config/backup/modbus.backup.1760531683.json +92 -0
  34. thingsboard_gateway/config/backup/modbus.backup.1760531694.json +82 -0
  35. thingsboard_gateway/config/backup/modbus.backup.1760532282.json +82 -0
  36. thingsboard_gateway/config/backup/modbus.backup.1760532312.json +82 -0
  37. thingsboard_gateway/config/backup/modbus.backup.1760945580.json +86 -0
  38. thingsboard_gateway/config/backup/modbus.backup.1760954240.json +86 -0
  39. thingsboard_gateway/config/backup/modbus.backup.1761044322.json +95 -0
  40. thingsboard_gateway/config/backup/opcua.backup.1760012341.json +82 -0
  41. thingsboard_gateway/config/backup/opcua.backup.1760012516.json +82 -0
  42. thingsboard_gateway/config/backup/opcua.backup.1760013006.json +82 -0
  43. thingsboard_gateway/config/backup/opcua.backup.1760013048.json +82 -0
  44. thingsboard_gateway/config/backup/opcua.backup.1760014218.json +82 -0
  45. thingsboard_gateway/config/backup/opcua.backup.1760014257.json +76 -0
  46. thingsboard_gateway/config/backup/opcua.backup.1760082847.json +82 -0
  47. thingsboard_gateway/config/backup/opcua.backup.1761651032.json +83 -0
  48. thingsboard_gateway/config/backup/opcua.backup.1761651043.json +73 -0
  49. thingsboard_gateway/config/backup/opcua.backup.1761651399.json +79 -0
  50. thingsboard_gateway/config/backup/r.backup.1753355815.json +184 -0
  51. thingsboard_gateway/config/backup/rf.backup.1753355869.json +219 -0
  52. thingsboard_gateway/config/backup/s.backup.1753355844.json +81 -0
  53. thingsboard_gateway/config/backup/superOpc.backup.1753184904.json +106 -0
  54. thingsboard_gateway/config/backup/superOpc.backup.1753185060.json +97 -0
  55. thingsboard_gateway/config/backup/superOpc.backup.1753185158.json +97 -0
  56. thingsboard_gateway/config/backup/superOpc.backup.1753185328.json +97 -0
  57. thingsboard_gateway/config/backup/superOpc.backup.1753185338.json +107 -0
  58. thingsboard_gateway/config/backup/superOpc.backup.1753355736.json +97 -0
  59. thingsboard_gateway/config/backup/tb_gateway.backup.1761123037.json +75 -0
  60. thingsboard_gateway/config/backup/tb_gateway.backup.1761123073.json +75 -0
  61. thingsboard_gateway/config/backup/tb_gateway.backup.1761123092.json +75 -0
  62. thingsboard_gateway/config/backup/tb_gateway.backup.1761123101.json +75 -0
  63. thingsboard_gateway/config/backup/tb_gateway.backup.1761123130.json +75 -0
  64. thingsboard_gateway/config/backup/tb_gateway.backup.1761123137.json +75 -0
  65. thingsboard_gateway/config/backup/tb_gateway.backup.1761123165.json +75 -0
  66. thingsboard_gateway/config/backup/tb_gateway.backup.1761123186.json +75 -0
  67. thingsboard_gateway/config/backup/tb_gateway.backup.1761651010.json +65 -0
  68. thingsboard_gateway/config/backup/tb_gateway.backup.1761651399.json +71 -0
  69. thingsboard_gateway/config/bacnet.json +77 -0
  70. thingsboard_gateway/config/bacnet1.json +64 -0
  71. thingsboard_gateway/config/ble.json +74 -0
  72. thingsboard_gateway/config/c.json +94 -0
  73. thingsboard_gateway/config/ca.pem +25 -0
  74. thingsboard_gateway/config/can.json +89 -0
  75. thingsboard_gateway/config/connected_devices.json +9 -0
  76. thingsboard_gateway/config/credentials/ca-root.pem +25 -0
  77. thingsboard_gateway/config/credentials/cert.pem +31 -0
  78. thingsboard_gateway/config/credentials/key.pem +52 -0
  79. thingsboard_gateway/config/custom_serial.json +51 -0
  80. thingsboard_gateway/config/ftp.json +65 -0
  81. thingsboard_gateway/config/g.json +63 -0
  82. thingsboard_gateway/config/gatewayConnector.json +895 -0
  83. thingsboard_gateway/config/gh.json +143 -0
  84. thingsboard_gateway/config/knx.json +71 -0
  85. thingsboard_gateway/config/list.json +16 -0
  86. thingsboard_gateway/config/logs.json +150 -0
  87. thingsboard_gateway/config/m.json +261 -0
  88. thingsboard_gateway/config/modbus.json +229 -0
  89. thingsboard_gateway/config/modbusD.json +247 -0
  90. thingsboard_gateway/config/modbus_async.json +84 -0
  91. thingsboard_gateway/config/modbus_energy.json +1014 -0
  92. thingsboard_gateway/config/modbus_serial.json +77 -0
  93. thingsboard_gateway/config/mqtt.json +221 -0
  94. thingsboard_gateway/config/ocpp.json +66 -0
  95. thingsboard_gateway/config/odbc/b9901f217be78dac091476bed1bdcd6d01cb248b.json +5 -0
  96. thingsboard_gateway/config/odbc.json +57 -0
  97. thingsboard_gateway/config/opcOld.json +49 -0
  98. thingsboard_gateway/config/opcua.json +74 -0
  99. thingsboard_gateway/config/opcua10K.json +36309 -0
  100. thingsboard_gateway/config/opcuaBAsic.json +58 -0
  101. thingsboard_gateway/config/opcuaNewAdvanced.json +58 -0
  102. thingsboard_gateway/config/r.json +174 -0
  103. thingsboard_gateway/config/request.json +226 -0
  104. thingsboard_gateway/config/rest.json +241 -0
  105. thingsboard_gateway/config/rf.json +209 -0
  106. thingsboard_gateway/config/s.json +71 -0
  107. thingsboard_gateway/config/sdf.json +77 -0
  108. thingsboard_gateway/config/sdg43.json +261 -0
  109. thingsboard_gateway/config/snmp.json +138 -0
  110. thingsboard_gateway/config/socket.json +61 -0
  111. thingsboard_gateway/config/statistics/statistics_linux.json +32 -0
  112. thingsboard_gateway/config/statistics/statistics_macos.json +32 -0
  113. thingsboard_gateway/config/statistics/statistics_windows.json +32 -0
  114. thingsboard_gateway/config/statistics.json +50 -0
  115. thingsboard_gateway/config/superOpc.json +97 -0
  116. thingsboard_gateway/config/tb_gateway.json +65 -0
  117. thingsboard_gateway/config/xmpp.json +53 -0
  118. thingsboard_gateway/connectors/__init__.py +13 -0
  119. thingsboard_gateway/connectors/bacnet/__init__.py +13 -0
  120. thingsboard_gateway/connectors/bacnet/application.py +429 -0
  121. thingsboard_gateway/connectors/bacnet/application_service_access_point.py +38 -0
  122. thingsboard_gateway/connectors/bacnet/backward_compatibility_adapter.py +89 -0
  123. thingsboard_gateway/connectors/bacnet/bacnet_connector.py +1019 -0
  124. thingsboard_gateway/connectors/bacnet/bacnet_converter.py +22 -0
  125. thingsboard_gateway/connectors/bacnet/bacnet_uplink_converter.py +167 -0
  126. thingsboard_gateway/connectors/bacnet/constants.py +34 -0
  127. thingsboard_gateway/connectors/bacnet/device.py +480 -0
  128. thingsboard_gateway/connectors/bacnet/ede_parser.py +118 -0
  129. thingsboard_gateway/connectors/bacnet/entities/__init__.py +0 -0
  130. thingsboard_gateway/connectors/bacnet/entities/bacnet_device_details.py +104 -0
  131. thingsboard_gateway/connectors/bacnet/entities/device_info.py +46 -0
  132. thingsboard_gateway/connectors/bacnet/entities/device_object_config.py +61 -0
  133. thingsboard_gateway/connectors/bacnet/entities/ede_connector_config.py +67 -0
  134. thingsboard_gateway/connectors/bacnet/entities/routers.py +36 -0
  135. thingsboard_gateway/connectors/bacnet/entities/uplink_converter_config.py +49 -0
  136. thingsboard_gateway/connectors/ble/__init__.py +13 -0
  137. thingsboard_gateway/connectors/ble/ble_connector.py +396 -0
  138. thingsboard_gateway/connectors/ble/ble_uplink_converter.py +22 -0
  139. thingsboard_gateway/connectors/ble/bytes_ble_uplink_converter.py +105 -0
  140. thingsboard_gateway/connectors/ble/device.py +345 -0
  141. thingsboard_gateway/connectors/ble/error_handler.py +21 -0
  142. thingsboard_gateway/connectors/ble/hex_bytes_ble_uplink_converter.py +75 -0
  143. thingsboard_gateway/connectors/can/__init__.py +13 -0
  144. thingsboard_gateway/connectors/can/bytes_can_downlink_converter.py +73 -0
  145. thingsboard_gateway/connectors/can/bytes_can_uplink_converter.py +97 -0
  146. thingsboard_gateway/connectors/can/can_connector.py +718 -0
  147. thingsboard_gateway/connectors/can/can_converter.py +21 -0
  148. thingsboard_gateway/connectors/connector.py +58 -0
  149. thingsboard_gateway/connectors/converter.py +25 -0
  150. thingsboard_gateway/connectors/ftp/__init__.py +14 -0
  151. thingsboard_gateway/connectors/ftp/backward_compatibility_adapter.py +102 -0
  152. thingsboard_gateway/connectors/ftp/file.py +71 -0
  153. thingsboard_gateway/connectors/ftp/ftp_connector.py +449 -0
  154. thingsboard_gateway/connectors/ftp/ftp_converter.py +21 -0
  155. thingsboard_gateway/connectors/ftp/ftp_uplink_converter.py +340 -0
  156. thingsboard_gateway/connectors/ftp/path.py +176 -0
  157. thingsboard_gateway/connectors/knx/__init__.py +13 -0
  158. thingsboard_gateway/connectors/knx/entities/__init__.py +13 -0
  159. thingsboard_gateway/connectors/knx/entities/client_config.py +75 -0
  160. thingsboard_gateway/connectors/knx/entities/device.py +152 -0
  161. thingsboard_gateway/connectors/knx/entities/gateways_scanner.py +80 -0
  162. thingsboard_gateway/connectors/knx/knx_connector.py +429 -0
  163. thingsboard_gateway/connectors/knx/knx_converter.py +21 -0
  164. thingsboard_gateway/connectors/knx/knx_uplink_converter.py +103 -0
  165. thingsboard_gateway/connectors/modbus/__init__.py +0 -0
  166. thingsboard_gateway/connectors/modbus/backward_compatibility_adapter.py +121 -0
  167. thingsboard_gateway/connectors/modbus/bytes_modbus_downlink_converter.py +120 -0
  168. thingsboard_gateway/connectors/modbus/bytes_modbus_uplink_converter.py +290 -0
  169. thingsboard_gateway/connectors/modbus/constants.py +133 -0
  170. thingsboard_gateway/connectors/modbus/entities/__init__.py +0 -0
  171. thingsboard_gateway/connectors/modbus/entities/bytes_downlink_converter_config.py +13 -0
  172. thingsboard_gateway/connectors/modbus/entities/bytes_uplink_converter_config.py +30 -0
  173. thingsboard_gateway/connectors/modbus/entities/clients.py +21 -0
  174. thingsboard_gateway/connectors/modbus/entities/master.py +179 -0
  175. thingsboard_gateway/connectors/modbus/entities/rpc_request.py +161 -0
  176. thingsboard_gateway/connectors/modbus/entities/slave_context.py +31 -0
  177. thingsboard_gateway/connectors/modbus/modbus_connector.py +779 -0
  178. thingsboard_gateway/connectors/modbus/modbus_converter.py +21 -0
  179. thingsboard_gateway/connectors/modbus/server.py +238 -0
  180. thingsboard_gateway/connectors/modbus/slave.py +353 -0
  181. thingsboard_gateway/connectors/modbus/utils.py +62 -0
  182. thingsboard_gateway/connectors/mqtt/__init__.py +13 -0
  183. thingsboard_gateway/connectors/mqtt/backward_compatibility_adapter.py +117 -0
  184. thingsboard_gateway/connectors/mqtt/bytes_mqtt_uplink_converter.py +100 -0
  185. thingsboard_gateway/connectors/mqtt/json_mqtt_uplink_converter.py +184 -0
  186. thingsboard_gateway/connectors/mqtt/mqtt_connector.py +1135 -0
  187. thingsboard_gateway/connectors/mqtt/mqtt_decorators.py +15 -0
  188. thingsboard_gateway/connectors/mqtt/mqtt_uplink_converter.py +22 -0
  189. thingsboard_gateway/connectors/ocpp/__init__.py +13 -0
  190. thingsboard_gateway/connectors/ocpp/charge_point.py +115 -0
  191. thingsboard_gateway/connectors/ocpp/ocpp_connector.py +370 -0
  192. thingsboard_gateway/connectors/ocpp/ocpp_converter.py +21 -0
  193. thingsboard_gateway/connectors/ocpp/ocpp_uplink_converter.py +140 -0
  194. thingsboard_gateway/connectors/odbc/__init__.py +13 -0
  195. thingsboard_gateway/connectors/odbc/odbc_connector.py +552 -0
  196. thingsboard_gateway/connectors/odbc/odbc_converter.py +21 -0
  197. thingsboard_gateway/connectors/odbc/odbc_uplink_converter.py +115 -0
  198. thingsboard_gateway/connectors/opcua/__init__.py +14 -0
  199. thingsboard_gateway/connectors/opcua/backward_compatibility_adapter.py +158 -0
  200. thingsboard_gateway/connectors/opcua/device.py +174 -0
  201. thingsboard_gateway/connectors/opcua/entities/__init__.py +13 -0
  202. thingsboard_gateway/connectors/opcua/entities/rpc_request.py +149 -0
  203. thingsboard_gateway/connectors/opcua/opcua_connector.py +1590 -0
  204. thingsboard_gateway/connectors/opcua/opcua_converter.py +24 -0
  205. thingsboard_gateway/connectors/opcua/opcua_uplink_converter.py +141 -0
  206. thingsboard_gateway/connectors/request/__init__.py +13 -0
  207. thingsboard_gateway/connectors/request/json_request_downlink_converter.py +72 -0
  208. thingsboard_gateway/connectors/request/json_request_uplink_converter.py +134 -0
  209. thingsboard_gateway/connectors/request/request_connector.py +466 -0
  210. thingsboard_gateway/connectors/request/request_converter.py +21 -0
  211. thingsboard_gateway/connectors/request/request_uplink_converter.py +22 -0
  212. thingsboard_gateway/connectors/rest/__init__.py +13 -0
  213. thingsboard_gateway/connectors/rest/backward_compatibility_adapter.py +75 -0
  214. thingsboard_gateway/connectors/rest/json_rest_downlink_converter.py +73 -0
  215. thingsboard_gateway/connectors/rest/json_rest_uplink_converter.py +139 -0
  216. thingsboard_gateway/connectors/rest/rest_connector.py +709 -0
  217. thingsboard_gateway/connectors/rest/rest_converter.py +21 -0
  218. thingsboard_gateway/connectors/rest/ssl_generator.py +69 -0
  219. thingsboard_gateway/connectors/snmp/__init__.py +13 -0
  220. thingsboard_gateway/connectors/snmp/snmp_connector.py +343 -0
  221. thingsboard_gateway/connectors/snmp/snmp_downlink_converter.py +26 -0
  222. thingsboard_gateway/connectors/snmp/snmp_uplink_converter.py +88 -0
  223. thingsboard_gateway/connectors/socket/__init__.py +13 -0
  224. thingsboard_gateway/connectors/socket/backward_compatibility_adapter.py +34 -0
  225. thingsboard_gateway/connectors/socket/bytes_socket_uplink_converter.py +84 -0
  226. thingsboard_gateway/connectors/socket/socket_connector.py +489 -0
  227. thingsboard_gateway/connectors/socket/socket_decorators.py +15 -0
  228. thingsboard_gateway/connectors/socket/socket_uplink_converter.py +22 -0
  229. thingsboard_gateway/connectors/xmpp/__init__.py +13 -0
  230. thingsboard_gateway/connectors/xmpp/device.py +17 -0
  231. thingsboard_gateway/connectors/xmpp/xmpp_connector.py +354 -0
  232. thingsboard_gateway/connectors/xmpp/xmpp_converter.py +21 -0
  233. thingsboard_gateway/connectors/xmpp/xmpp_uplink_converter.py +190 -0
  234. thingsboard_gateway/extensions/__init__.py +13 -0
  235. thingsboard_gateway/extensions/bacnet/__init__.py +0 -0
  236. thingsboard_gateway/extensions/ble/__init__.py +13 -0
  237. thingsboard_gateway/extensions/can/__init__.py +13 -0
  238. thingsboard_gateway/extensions/ftp/__init__.py +0 -0
  239. thingsboard_gateway/extensions/knx/__init__.py +13 -0
  240. thingsboard_gateway/extensions/modbus/__init__.py +13 -0
  241. thingsboard_gateway/extensions/mqtt/__init__.py +13 -0
  242. thingsboard_gateway/extensions/mqtt/custom_mqtt_uplink_converter.py +59 -0
  243. thingsboard_gateway/extensions/ocpp/__init__.py +13 -0
  244. thingsboard_gateway/extensions/odbc/__init__.py +13 -0
  245. thingsboard_gateway/extensions/opcua/__init__.py +13 -0
  246. thingsboard_gateway/extensions/request/__init__.py +13 -0
  247. thingsboard_gateway/extensions/rest/__init__.py +13 -0
  248. thingsboard_gateway/extensions/serial/__init__.py +13 -0
  249. thingsboard_gateway/extensions/serial/custom_serial_connector.py +440 -0
  250. thingsboard_gateway/extensions/serial/custom_serial_downlink_converter.py +52 -0
  251. thingsboard_gateway/extensions/serial/custom_serial_uplink_converter.py +141 -0
  252. thingsboard_gateway/extensions/snmp/__init__.py +14 -0
  253. thingsboard_gateway/extensions/socket/__init__.py +13 -0
  254. thingsboard_gateway/extensions/xmpp/__init__.py +13 -0
  255. thingsboard_gateway/gateway/__init__.py +13 -0
  256. thingsboard_gateway/gateway/constant_enums.py +39 -0
  257. thingsboard_gateway/gateway/constants.py +161 -0
  258. thingsboard_gateway/gateway/device_filter.py +31 -0
  259. thingsboard_gateway/gateway/entities/__init__.py +0 -0
  260. thingsboard_gateway/gateway/entities/attributes.py +49 -0
  261. thingsboard_gateway/gateway/entities/converted_data.py +241 -0
  262. thingsboard_gateway/gateway/entities/datapoint_key.py +38 -0
  263. thingsboard_gateway/gateway/entities/device_event_pack.py +0 -0
  264. thingsboard_gateway/gateway/entities/report_strategy_config.py +96 -0
  265. thingsboard_gateway/gateway/entities/telemetry_entry.py +63 -0
  266. thingsboard_gateway/gateway/grpc_service/__init__.py +0 -0
  267. thingsboard_gateway/gateway/grpc_service/grpc_connector.py +62 -0
  268. thingsboard_gateway/gateway/grpc_service/grpc_downlink_converter.py +169 -0
  269. thingsboard_gateway/gateway/grpc_service/grpc_uplink_converter.py +106 -0
  270. thingsboard_gateway/gateway/grpc_service/tb_grpc_manager.py +259 -0
  271. thingsboard_gateway/gateway/grpc_service/tb_grpc_server.py +63 -0
  272. thingsboard_gateway/gateway/hot_reloader.py +62 -0
  273. thingsboard_gateway/gateway/proto/__init__.py +24 -0
  274. thingsboard_gateway/gateway/proto/messages_pb2.py +100 -0
  275. thingsboard_gateway/gateway/proto/messages_pb2_grpc.py +66 -0
  276. thingsboard_gateway/gateway/report_strategy/__init__.py +0 -0
  277. thingsboard_gateway/gateway/report_strategy/report_strategy_data_cache.py +168 -0
  278. thingsboard_gateway/gateway/report_strategy/report_strategy_service.py +291 -0
  279. thingsboard_gateway/gateway/shell/__init__.py +0 -0
  280. thingsboard_gateway/gateway/shell/proxy.py +79 -0
  281. thingsboard_gateway/gateway/shell/shell.py +223 -0
  282. thingsboard_gateway/gateway/statistics/__init__.py +13 -0
  283. thingsboard_gateway/gateway/statistics/configs.py +92 -0
  284. thingsboard_gateway/gateway/statistics/decorators.py +100 -0
  285. thingsboard_gateway/gateway/statistics/service_functions.py +110 -0
  286. thingsboard_gateway/gateway/statistics/statistics_service.py +287 -0
  287. thingsboard_gateway/gateway/tb_client.py +549 -0
  288. thingsboard_gateway/gateway/tb_gateway_service.py +2384 -0
  289. thingsboard_gateway/storage/__init__.py +13 -0
  290. thingsboard_gateway/storage/event_storage.py +52 -0
  291. thingsboard_gateway/storage/file/__init__.py +0 -0
  292. thingsboard_gateway/storage/file/event_storage_files.py +42 -0
  293. thingsboard_gateway/storage/file/event_storage_reader.py +220 -0
  294. thingsboard_gateway/storage/file/event_storage_reader_pointer.py +37 -0
  295. thingsboard_gateway/storage/file/event_storage_writer.py +122 -0
  296. thingsboard_gateway/storage/file/file_event_storage.py +113 -0
  297. thingsboard_gateway/storage/file/file_event_storage_settings.py +37 -0
  298. thingsboard_gateway/storage/memory/__init__.py +0 -0
  299. thingsboard_gateway/storage/memory/memory_event_storage.py +64 -0
  300. thingsboard_gateway/storage/sqlite/__init__.py +13 -0
  301. thingsboard_gateway/storage/sqlite/database.py +379 -0
  302. thingsboard_gateway/storage/sqlite/database_connector.py +261 -0
  303. thingsboard_gateway/storage/sqlite/sqlite_event_storage.py +499 -0
  304. thingsboard_gateway/storage/sqlite/sqlite_event_storage_pointer.py +34 -0
  305. thingsboard_gateway/storage/sqlite/storage_settings.py +50 -0
  306. thingsboard_gateway/tb_gateway.py +75 -0
  307. thingsboard_gateway/tb_utility/__init__.py +13 -0
  308. thingsboard_gateway/tb_utility/tb_gateway_remote_configurator.py +1101 -0
  309. thingsboard_gateway/tb_utility/tb_handler.py +178 -0
  310. thingsboard_gateway/tb_utility/tb_loader.py +83 -0
  311. thingsboard_gateway/tb_utility/tb_logger.py +278 -0
  312. thingsboard_gateway/tb_utility/tb_remote_shell.py +113 -0
  313. thingsboard_gateway/tb_utility/tb_rotating_file_handler.py +117 -0
  314. thingsboard_gateway/tb_utility/tb_updater.py +120 -0
  315. thingsboard_gateway/tb_utility/tb_utility.py +515 -0
  316. thingsboard_gateway/version.py +15 -0
  317. thingsboard_gateway-3.7.9.dist-info/METADATA +161 -0
  318. thingsboard_gateway-3.7.9.dist-info/RECORD +322 -0
  319. thingsboard_gateway-3.7.9.dist-info/WHEEL +5 -0
  320. thingsboard_gateway-3.7.9.dist-info/entry_points.txt +3 -0
  321. thingsboard_gateway-3.7.9.dist-info/licenses/LICENSE +201 -0
  322. thingsboard_gateway-3.7.9.dist-info/top_level.txt +1 -0
File without changes
@@ -0,0 +1,222 @@
1
+ {
2
+ "broker": {
3
+ "host": "127.0.0.1",
4
+ "port": 1883,
5
+ "clientId": "ThingsBoard_gateway",
6
+ "version": 5,
7
+ "maxMessageNumberPerWorker": 10,
8
+ "maxNumberOfWorkers": 100,
9
+ "sendDataOnlyOnChange": false,
10
+ "security": {
11
+ "type": "anonymous"
12
+ }
13
+ },
14
+ "mapping": [
15
+ {
16
+ "topicFilter": "sensor/data",
17
+ "subscriptionQos": 1,
18
+ "converter": {
19
+ "type": "json",
20
+ "deviceInfo": {
21
+ "deviceNameExpressionSource": "message",
22
+ "deviceNameExpression": "${serialNumber}",
23
+ "deviceProfileExpressionSource": "message",
24
+ "deviceProfileExpression": "${sensorType}"
25
+ },
26
+ "sendDataOnlyOnChange": false,
27
+ "timeout": 60000,
28
+ "attributes": [
29
+ {
30
+ "type": "string",
31
+ "key": "model",
32
+ "value": "${sensorModel}"
33
+ },
34
+ {
35
+ "type": "string",
36
+ "key": "${sensorModel}",
37
+ "value": "on"
38
+ }
39
+ ],
40
+ "timeseries": [
41
+ {
42
+ "type": "string",
43
+ "key": "temperature",
44
+ "value": "${temp}"
45
+ },
46
+ {
47
+ "type": "double",
48
+ "key": "humidity",
49
+ "value": "${hum}"
50
+ },
51
+ {
52
+ "type": "string",
53
+ "key": "combine",
54
+ "value": "${hum}:${temp}"
55
+ }
56
+ ]
57
+ }
58
+ },
59
+ {
60
+ "topicFilter": "sensor/+/data",
61
+ "subscriptionQos": 1,
62
+ "converter": {
63
+ "type": "json",
64
+ "deviceInfo": {
65
+ "deviceNameExpressionSource": "topic",
66
+ "deviceNameExpression": "(?<=sensor/)(.*?)(?=/data)",
67
+ "deviceProfileExpressionSource": "constant",
68
+ "deviceProfileExpression": "Thermometer"
69
+ },
70
+ "sendDataOnlyOnChange": false,
71
+ "timeout": 60000,
72
+ "attributes": [
73
+ {
74
+ "type": "string",
75
+ "key": "model",
76
+ "value": "${sensorModel}"
77
+ }
78
+ ],
79
+ "timeseries": [
80
+ {
81
+ "type": "double",
82
+ "key": "temperature",
83
+ "value": "${temp}"
84
+ },
85
+ {
86
+ "type": "string",
87
+ "key": "humidity",
88
+ "value": "${hum}"
89
+ }
90
+ ]
91
+ }
92
+ },
93
+ {
94
+ "topicFilter": "sensor/raw_data",
95
+ "subscriptionQos": 1,
96
+ "converter": {
97
+ "type": "bytes",
98
+ "deviceInfo": {
99
+ "deviceNameExpressionSource": "message",
100
+ "deviceNameExpression": "[0:4]",
101
+ "deviceProfileExpressionSource": "constant",
102
+ "deviceProfileExpression": "default"
103
+ },
104
+ "sendDataOnlyOnChange": false,
105
+ "timeout": 60000,
106
+ "attributes": [
107
+ {
108
+ "type": "raw",
109
+ "key": "rawData",
110
+ "value": "[:]"
111
+ }
112
+ ],
113
+ "timeseries": [
114
+ {
115
+ "type": "raw",
116
+ "key": "temp",
117
+ "value": "[4:]"
118
+ }
119
+ ]
120
+ }
121
+ },
122
+ {
123
+ "topicFilter": "custom/sensors/+",
124
+ "subscriptionQos": 1,
125
+ "converter": {
126
+ "type": "custom",
127
+ "extension": "CustomMqttUplinkConverter",
128
+ "cached": true,
129
+ "extensionConfig": {
130
+ "temperature": 2,
131
+ "humidity": 2,
132
+ "batteryLevel": 1
133
+ }
134
+ }
135
+ }
136
+ ],
137
+ "requestsMapping": {
138
+ "connectRequests": [
139
+ {
140
+ "topicFilter": "sensor/connect",
141
+ "deviceInfo": {
142
+ "deviceNameExpressionSource": "message",
143
+ "deviceNameExpression": "${serialNumber}",
144
+ "deviceProfileExpressionSource": "constant",
145
+ "deviceProfileExpression": "Thermometer"
146
+ }
147
+ },
148
+ {
149
+ "topicFilter": "sensor/+/connect",
150
+ "deviceInfo": {
151
+ "deviceNameExpressionSource": "topic",
152
+ "deviceNameExpression": "(?<=sensor/)(.*?)(?=/connect)",
153
+ "deviceProfileExpressionSource": "constant",
154
+ "deviceProfileExpression": "Thermometer"
155
+ }
156
+ }
157
+ ],
158
+ "disconnectRequests": [
159
+ {
160
+ "topicFilter": "sensor/disconnect",
161
+ "deviceInfo": {
162
+ "deviceNameExpressionSource": "message",
163
+ "deviceNameExpression": "${serialNumber}"
164
+ }
165
+ },
166
+ {
167
+ "topicFilter": "sensor/+/disconnect",
168
+ "deviceInfo": {
169
+ "deviceNameExpressionSource": "topic",
170
+ "deviceNameExpression": "(?<=sensor/)(.*?)(?=/connect)"
171
+ }
172
+ }
173
+ ],
174
+ "attributeRequests": [
175
+ {
176
+ "retain": false,
177
+ "topicFilter": "v1/devices/me/attributes/request",
178
+ "deviceInfo": {
179
+ "deviceNameExpressionSource": "message",
180
+ "deviceNameExpression": "${serialNumber}"
181
+ },
182
+ "attributeNameExpressionSource": "message",
183
+ "attributeNameExpression": "${versionAttribute}, ${pduAttribute}",
184
+ "topicExpression": "devices/${deviceName}/attrs",
185
+ "valueExpression": "${attributeKey}: ${attributeValue}"
186
+ }
187
+ ],
188
+ "attributeUpdates": [
189
+ {
190
+ "retain": true,
191
+ "deviceNameFilter": ".*",
192
+ "attributeFilter": "firmwareVersion",
193
+ "topicExpression": "sensor/${deviceName}/${attributeKey}",
194
+ "valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}"
195
+ }
196
+ ],
197
+ "serverSideRpc": [
198
+ {
199
+ "type": "twoWay",
200
+ "deviceNameFilter": ".*",
201
+ "methodFilter": "echo",
202
+ "requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}",
203
+ "responseTopicExpression": "sensor/${deviceName}/response/${methodName}/${requestId}",
204
+ "responseTopicQoS": 1,
205
+ "responseTimeout": 10000,
206
+ "valueExpression": "${params}"
207
+ },
208
+ {
209
+ "type": "oneWay",
210
+ "deviceNameFilter": ".*",
211
+ "methodFilter": "no-reply",
212
+ "requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}",
213
+ "valueExpression": "${params}"
214
+ }
215
+ ]
216
+ },
217
+ "logLevel": "INFO",
218
+ "name": "1",
219
+ "enableRemoteLogging": false,
220
+ "id": "824e8d21-bb30-4bc6-9a12-f9b0f9e61181",
221
+ "configVersion": "3.7.6"
222
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "centralSystem": {
3
+ "name": "Central System",
4
+ "host": "127.0.0.1",
5
+ "port": 9000,
6
+ "connection": {
7
+ "type": "insecure"
8
+ },
9
+ "security": [
10
+ {
11
+ "type": "token",
12
+ "tokens": [
13
+ "Bearer ACCESS_TOKEN"
14
+ ]
15
+ },
16
+ {
17
+ "type": "basic",
18
+ "credentials": [
19
+ {
20
+ "username": "admin",
21
+ "password": "admin"
22
+ }
23
+ ]
24
+ }
25
+ ]
26
+ },
27
+ "chargePoints": [
28
+ {
29
+ "idRegexpPattern": "bidon/hello/CP_1",
30
+ "deviceNameExpression": "${Vendor} ${Model}",
31
+ "deviceTypeExpression": "default",
32
+ "attributes": [
33
+ {
34
+ "messageTypeFilter": "MeterValues,",
35
+ "key": "temp1",
36
+ "value": "${meter_value[:].sampled_value[:].value}"
37
+ },
38
+ {
39
+ "messageTypeFilter": "MeterValues,",
40
+ "key": "vendorId",
41
+ "value": "${connector_id}"
42
+ }
43
+ ],
44
+ "timeseries": [
45
+ {
46
+ "messageTypeFilter": "DataTransfer,",
47
+ "key": "temp",
48
+ "value": "${data.temp}"
49
+ }
50
+ ],
51
+ "attributeUpdates": [
52
+ {
53
+ "attributeOnThingsBoard": "shared",
54
+ "valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}"
55
+ }
56
+ ],
57
+ "serverSideRpc": [
58
+ {
59
+ "methodRPC": "rpc1",
60
+ "withResponse": true,
61
+ "valueExpression": "${params}"
62
+ }
63
+ ]
64
+ }
65
+ ],
66
+ "logLevel": "INFO",
67
+ "name": "356t",
68
+ "enableRemoteLogging": false,
69
+ "id": "8a893c99-0d78-4447-b0ce-4b532451cdaf",
70
+ "configVersion": "3.7.6"
71
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "logLevel": "INFO",
3
+ "client": {
4
+ "type": "AUTOMATIC",
5
+ "addressFormat": "LONG",
6
+ "gatewayIP": "127.0.0.1",
7
+ "gatewayPort": 3671,
8
+ "autoReconnect": true,
9
+ "autoReconnectWait": 3,
10
+ "gatewaysScanner": {
11
+ "enabled": true,
12
+ "scanPeriod": 3,
13
+ "stopOnFound": false
14
+ }
15
+ },
16
+ "devices": [
17
+ {
18
+ "deviceInfo": {
19
+ "deviceNameDataType": "string",
20
+ "deviceNameExpressionSource": "expression",
21
+ "deviceNameExpression": "Device ${1/0/5}",
22
+ "deviceProfileDataType": "none",
23
+ "deviceProfileExpressionSource": "constant",
24
+ "deviceProfileNameExpression": "default"
25
+ },
26
+ "pollPeriod": 5000,
27
+ "attributes": [
28
+ {
29
+ "type": "temperature",
30
+ "key": "temperature",
31
+ "groupAddress": "1/0/6"
32
+ }
33
+ ],
34
+ "timeseries": [
35
+ {
36
+ "type": "humidity",
37
+ "key": "humidity",
38
+ "groupAddress": "1/0/7"
39
+ }
40
+ ]
41
+ }
42
+ ],
43
+ "attributeUpdates": [
44
+ {
45
+ "deviceNameFilter": ".*",
46
+ "dataType": "precent_U8",
47
+ "groupAddress": "1/0/9",
48
+ "key": "brightness"
49
+ }
50
+ ],
51
+ "serverSideRpc": [
52
+ {
53
+ "requestType": "read",
54
+ "deviceNameFilter": ".*",
55
+ "method": "get_name",
56
+ "dataType": "string",
57
+ "groupAddress": "1/0/5"
58
+ },
59
+ {
60
+ "requestType": "write",
61
+ "deviceNameFilter": ".*",
62
+ "method": "set_name",
63
+ "dataType": "string",
64
+ "groupAddress": "1/0/5"
65
+ }
66
+ ],
67
+ "name": "4t",
68
+ "enableRemoteLogging": false,
69
+ "id": "c6215d4c-91b3-4bec-9fbc-82026b2a509d",
70
+ "configVersion": "3.7.6"
71
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "server": {
3
+ "jid": "gateway@localhost",
4
+ "password": "password",
5
+ "host": "localhost",
6
+ "port": 5222,
7
+ "use_ssl": false,
8
+ "disable_starttls": false,
9
+ "force_starttls": true,
10
+ "timeout": 10000,
11
+ "plugins": [
12
+ "xep_0030",
13
+ "xep_0323",
14
+ "xep_0325"
15
+ ]
16
+ },
17
+ "devices": [
18
+ {
19
+ "jid": "device@localhost/TMP_1101",
20
+ "deviceNameExpression": "${serialNumber}",
21
+ "deviceTypeExpression": "default",
22
+ "attributes": [
23
+ {
24
+ "key": "temperature",
25
+ "value": "${temp}"
26
+ }
27
+ ],
28
+ "timeseries": [
29
+ {
30
+ "key": "humidity",
31
+ "value": "${hum}"
32
+ },
33
+ {
34
+ "key": "combination",
35
+ "value": "${temp}:${hum}"
36
+ }
37
+ ],
38
+ "attributeUpdates": [
39
+ {
40
+ "attributeOnThingsBoard": "shared",
41
+ "valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}"
42
+ }
43
+ ],
44
+ "serverSideRpc": [
45
+ {
46
+ "methodRPC": "rpc1",
47
+ "withResponse": true,
48
+ "valueExpression": "${params}"
49
+ }
50
+ ]
51
+ }
52
+ ],
53
+ "logLevel": "INFO",
54
+ "name": "5",
55
+ "enableRemoteLogging": false,
56
+ "id": "cdd920aa-2fdf-4cd9-9e4a-846d2f5206e0",
57
+ "configVersion": "3.7.6"
58
+ }
@@ -0,0 +1,23 @@
1
+ #Engineering-Data-Exchange - B.I.G.-EU
2
+ PROJECT_NAME
3
+ VERSION_OF_REFERENCEFILE
4
+ TIMESTAMP_OF_LAST_CHANGE;10/9/2025
5
+ AUTHOR_OF_LAST_CHANGE;YABE Yet Another Bacnet Explorer
6
+ VERSION_OF_LAYOUT;2.3
7
+ #mandatory;mandator;mandatory;mandatory;mandatory;optional;optional;optional;optional;optional;optional;optional;optional;optional;optional;optional
8
+ # keyname;device obj.-instance;object-name;object-type;object-instance;description;present-value-default;min-present-value;max-present-value;settable;supports COV;hi-limit;low-limit;state-text-reference;unit-code;vendor-specific-addres
9
+ OBJECT_DEVICE:2343134;2343134;RoomController.Simulator;8;2343134;Free RoomController Simulator, F. Chaxel 2015;;;;;;;;;
10
+ OBJECT_ANALOG_INPUT:0;2343134;Temperature.Indoor;0;0;Indoor Temperature;;;;;;;;;64
11
+ OBJECT_ANALOG_INPUT:1;2343134;Temperature.Water;0;1;Glycol Water Temperature;;;;;;;;;64
12
+ OBJECT_ANALOG_INPUT:2;2343134;Temperature.Outdoor;0;2;Outdoor Temperature;;;;;;;;;64
13
+ OBJECT_ANALOG_VALUE:0;2343134;SetPoint.Value;2;0;Effective SetPoint;;;;;;;;;64
14
+ OBJECT_ANALOG_VALUE:1;2343134;Setpoint.1;2;1;Setoint 1;;;;;;;;;64
15
+ OBJECT_ANALOG_VALUE:2;2343134;Setpoint.2;2;2;Setpoint 2;;;;;;;;;64
16
+ OBJECT_ANALOG_VALUE:3;2343134;Setpoint.3;2;3;Setpoint 3;;;;;;;;;64
17
+ OBJECT_BINARY_VALUE:0;2343134;State.Heater;5;0;Heater Status;;;;;;;;;
18
+ OBJECT_BINARY_VALUE:1;2343134;State.Chiller;5;1;Chiller Status;;;;;;;;;
19
+ OBJECT_MULTI_STATE_VALUE:0;2343134;State;19;0;Controler State Command;;;;;;;;0;
20
+ OBJECT_MULTI_STATE_VALUE:1;2343134;State.VentilationLevel;19;1;Ventilation level;;;;;;;;1;
21
+ OBJECT_CHARACTERSTRING_VALUE:1;2343134;TextSetpoint.1;40;1;Text for Setpoint 1;;;;;;;;;
22
+ OBJECT_CHARACTERSTRING_VALUE:2;2343134;TextSetpoint.2;40;2;Text for Setpoint 2;;;;;;;;;
23
+ OBJECT_CHARACTERSTRING_VALUE:3;2343134;TextSetpoint.3;40;3;Text for Setpoint 3;;;;;;;;;
@@ -0,0 +1,73 @@
1
+ {
2
+ "server": {
3
+ "url": "localhost:4840/freeopcua/server/",
4
+ "timeoutInMillis": 5000,
5
+ "scanPeriodInMillis": 3600000,
6
+ "pollPeriodInMillis": 5000,
7
+ "enableSubscriptions": true,
8
+ "subCheckPeriodInMillis": 100,
9
+ "showMap": false,
10
+ "security": "Basic128Rsa15",
11
+ "identity": {
12
+ "type": "anonymous"
13
+ }
14
+ },
15
+ "mapping": [
16
+ {
17
+ "deviceNodePattern": "Root\\.Objects\\.Device1",
18
+ "deviceNodeSource": "path",
19
+ "deviceInfo": {
20
+ "deviceNameExpression": "Device ${Root\\.Objects\\.Device1\\.serialNumber}",
21
+ "deviceNameExpressionSource": "path",
22
+ "deviceProfileExpression": "Device",
23
+ "deviceProfileExpressionSource": "constant"
24
+ },
25
+ "attributes": [
26
+ {
27
+ "key": "temperature \u00b0C",
28
+ "type": "path",
29
+ "value": "${ns=2;i=5}"
30
+ }
31
+ ],
32
+ "timeseries": [
33
+ {
34
+ "key": "humidity",
35
+ "type": "path",
36
+ "value": "${Root\\.Objects\\.Device1\\.TemperatureAndHumiditySensor\\.Humidity}"
37
+ },
38
+ {
39
+ "key": "batteryLevel",
40
+ "type": "path",
41
+ "value": "${Battery\\.batteryLevel}"
42
+ }
43
+ ],
44
+ "rpc_methods": [
45
+ {
46
+ "method": "multiply",
47
+ "arguments": [
48
+ {
49
+ "type": "integer",
50
+ "value": 2
51
+ },
52
+ {
53
+ "type": "integer",
54
+ "value": 4
55
+ }
56
+ ]
57
+ }
58
+ ],
59
+ "attributes_updates": [
60
+ {
61
+ "key": "deviceName",
62
+ "type": "path",
63
+ "value": "Root\\.Objects\\.Device1\\.serialNumber"
64
+ }
65
+ ]
66
+ }
67
+ ],
68
+ "logLevel": "INFO",
69
+ "name": "as",
70
+ "enableRemoteLogging": false,
71
+ "id": "b0419bd3-28c8-4929-ad6a-8e7dbc656881",
72
+ "configVersion": "3.7.4"
73
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "passiveScanMode": true,
3
+ "showMap": false,
4
+ "scanner": {
5
+ "timeout": 10000,
6
+ "deviceName": "Device name"
7
+ },
8
+ "devices": [
9
+ {
10
+ "name": "Temperature and humidity sensor",
11
+ "MACAddress": "4C:65:A8:DF:85:C0",
12
+ "pollPeriod": 500000,
13
+ "showMap": false,
14
+ "timeout": 10000,
15
+ "connectRetry": 5,
16
+ "connectRetryInSeconds": 0,
17
+ "waitAfterConnectRetries": 10,
18
+ "telemetry": [
19
+ {
20
+ "key": "temperature",
21
+ "method": "notify",
22
+ "characteristicUUID": "226CAA55-6476-4566-7562-66734470666D",
23
+ "valueExpression": "[2]"
24
+ },
25
+ {
26
+ "key": "humidity",
27
+ "method": "notify",
28
+ "characteristicUUID": "226CAA55-6476-4566-7562-66734470666D",
29
+ "valueExpression": "[0]"
30
+ }
31
+ ],
32
+ "attributes": [
33
+ {
34
+ "key": "name",
35
+ "method": "read",
36
+ "characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB",
37
+ "valueExpression": "[0:2]cm [2:]A"
38
+ },
39
+ {
40
+ "key": "values",
41
+ "method": "read",
42
+ "characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB",
43
+ "valueExpression": "All values: [:]"
44
+ }
45
+ ],
46
+ "attributeUpdates": [
47
+ {
48
+ "attributeOnThingsBoard": "sharedName",
49
+ "characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB"
50
+ }
51
+ ],
52
+ "serverSideRpc": [
53
+ {
54
+ "methodRPC": "rpcMethod1",
55
+ "withResponse": true,
56
+ "characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB",
57
+ "methodProcessing": "read"
58
+ },
59
+ {
60
+ "methodRPC": "rpcMethod2",
61
+ "withResponse": true,
62
+ "characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB",
63
+ "methodProcessing": "write"
64
+ },
65
+ {
66
+ "methodRPC": "rpcMethod3",
67
+ "withResponse": true,
68
+ "methodProcessing": "scan"
69
+ }
70
+ ]
71
+ }
72
+ ],
73
+ "logLevel": "INFO",
74
+ "name": "b",
75
+ "enableRemoteLogging": false,
76
+ "id": "ccd357ce-6807-4f5e-89b5-5d915ee8bf80",
77
+ "configVersion": "3.7.6"
78
+ }