From 758db25a9c15dcfd87c7d66b08b69f35065d6518 Mon Sep 17 00:00:00 2001 From: zbeacon Date: Thu, 30 Sep 2021 12:35:53 +0300 Subject: [PATCH] Added ability to configure parameter maxPayloadSizeBytes in order to limit size from the gateway to ThingsBoard --- thingsboard_gateway/gateway/tb_gateway_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thingsboard_gateway/gateway/tb_gateway_service.py b/thingsboard_gateway/gateway/tb_gateway_service.py index 22a0903e0..fe14cbd07 100644 --- a/thingsboard_gateway/gateway/tb_gateway_service.py +++ b/thingsboard_gateway/gateway/tb_gateway_service.py @@ -416,7 +416,7 @@ def __send_to_storage(self): log.error(e) def check_size(self, size, devices_data_in_event_pack): - if size >= 48000: + if size >= self.__config["thingsboard"].get("maxPayloadSizeBytes", 4096): self.__send_data(devices_data_in_event_pack) size = 0 return size