Closed raomin closed 2 years ago
Hi @raomin,
Please stop the gateway, set logging level from INFO to DEBUG in logs.conf file and run the gateway again. Then please send logs.
Hi @zbeacon, thanks for your feedback. I've put everything in DEBUG and here is what I saw:
tb-gateway_1 | ""2021-12-06 21:49:37" - |DEBUG| - [tb_client.py] - tb_client - run - 124 - connecting to ThingsBoard"
tb-gateway_1 | ""2021-12-06 21:49:38" - |DEBUG| - [tb_client.py] - tb_client - run - 124 - connecting to ThingsBoard"
tb-gateway_1 | ""2021-12-06 21:49:39" - |DEBUG| - [tb_client.py] - tb_client - run - 124 - connecting to ThingsBoard"
tb-gateway_1 | ""2021-12-06 21:49:40" - |DEBUG| - [tb_client.py] - tb_client - run - 124 - connecting to ThingsBoard"
Thing is, tb-gateway is running as docker image, and so is tbio. And my tb-gateway.conf what pointing to:
thingsboard:
host: localhost
port: 1883
... which would not lead to thingsboard but the localhost of the docker namespace... I changed it to the public IP of the host, and voilà!
tb-gateway_1 | ""2021-12-06 21:52:08" - |DEBUG| - [mqtt_connector.py] - mqtt_connector - run - 718 - {'deviceName': 'eui-70b3d57ed00490e5', 'deviceType': '${uplink_message.version_ids.model_id}', 'attributes': [{'brand': '${uplink_message.version_ids.brand_id}'}], 'telemetry': [{'co2': '3003'}, {'eco2': '4053'}, {'rssi': '2039'}, {'snr': '5854'}]}"
tb-gateway_1 | ""2021-12-06 21:52:08" - |DEBUG| - [mqtt_connector.py] - mqtt_connector - _save_converted_msg - 352 - Successfully converted message from topic v3/testairdata@ttn/devices/eui-70b3d57ed00490e5/up"
tb-gateway_1 | ""2021-12-06 21:52:08" - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - __save_persistent_devices - 793 - Saved connected devices."
tb-gateway_1 | ""2021-12-06 21:52:44" - |DEBUG| - [mqtt_connector.py] - mqtt_connector - run - 718 - {'deviceName': 'eui-70b3d57ed00490e5', 'deviceType': '${uplink_message.version_ids.model_id}', 'attributes': [{'brand': '${uplink_message.version_ids.brand_id}'}], 'telemetry': [{'co2': '3003'}, {'eco2': '4053'}, {'rssi': '2039'}, {'snr': '5854'}]}"
tb-gateway_1 | ""2021-12-06 21:52:44" - |DEBUG| - [mqtt_connector.py] - mqtt_connector - _save_converted_msg - 352 - Successfully converted message from topic v3/testairdata@ttn/devices/eui-70b3d57ed00490e5/up"
tb-gateway_1 | ""2021-12-06 21:53:20" - |DEBUG| - [mqtt_connector.py] - mqtt_connector - run - 718 - {'deviceName': 'eui-70b3d57ed00490e5', 'deviceType': '${uplink_message.version_ids.model_id}', 'attributes': [{'brand': '${uplink_message.version_ids.brand_id}'}], 'telemetry': [{'co2': '3003'}, {'eco2': '4053'}, {'rssi': '2039'}, {'snr': '5854'}]}"
tb-gateway_1 | ""2021-12-06 21:53:20" - |DEBUG| - [mqtt_connector.py] - mqtt_connector - _save_converted_msg - 352 - Successfully converted message from topic v3/testairdata@ttn/devices/eui-70b3d57ed00490e5/up"
Thanks for this @zbeacon.
Describe the issue
I configured the iot-gateway to receive and publish messages from the TTN MQTT broker. While the connection is OK, the messages arriving on the MQTT broker (and confirmed with
mosquitto_sub
on the same topic) don't seem to be processed by the gateway and do not reach thingsboard.Configuration (mqtt.json)
No errors in logs:
In the meantime:
Versions (please complete the following information):
I'm certainly missing something... but what?