Hi,
I have been developing a measurement system where data from RuuviTAGs is sent to Azure via Ruuvi Gateway. Connection has been working well except two times when MQTT messaging has been stopped without any reason. First time I solved the situation by resetting the gateway but now even reset didnāt work. I have checked the debug log and there is not much MQTT related at all, I donāt know should there be more than messages than just after boot, see below. I can see that HTTP messaging to Ruuvi Cloud is working so the problem is not with Wifi.
I was thinking could it be because the gateway tries to send status message before MQTT connection is valid causing MQTT to stop at all?
I (4920) MQTT: [wifi_manager] mqtt_app_start
I (4925) MQTT: [wifi_manager] Using server: xx.xx.xx.xx, client id: āRuuviGatewayā, topic prefix: ādevices/RuuviGatewayXXXX/messages/events/ā, port: 8883, user: āAzureā¦/?api-version=2018-06-30ā, password: ā******ā
I (4951) MQTT: [mqtt_task] MQTT_EVENT_BEFORE_CONNECT
I (4950) LEDS: [wifi_manager] leds_indication_on_network_ok
I (4964) LEDS: [wifi_manager] LED: OFF
I (4968) ADV_POST_TASK: [adv_post_task] Handle event: NETWORK_CONNECTED
I (4969) TIME: [time_task] Activate SNTP time synchronization
I (4981) http: [adv_post_task] HTTP POST to URL=https://network.ruuvi.com/status, DATA:
{
āDEVICE_ADDRā: āAB:AB:BB:35:2ā:FF",
āESP_FWā: āv1.9.2ā,
āNRF_FWā: āv0.7.2ā,
āUPTIMEā: ā1ā,
āNONCEā: ā1082287059ā,
āCONNECTIONā: āWIFIā,
āNUM_CONN_LOSTā: ā0ā,
āSENSORS_SEENā: ā9ā,
āACTIVE_SENSORSā: [{
āMACā: āDA:FE:0E:8A:52:22ā,
āCOUNTERā: ā2ā
}, {
āMACā: āDA:FE:0E:8A:52:23ā,
āCOUNTERā: ā2ā
}, {
āMACā: āDA:FE:0E:8A:52:24ā,
āCOUNTERā: ā2ā
}],
āINACTIVE_SENSORSā: [āFA:AC:A5:89:79:2Aā]
}
W (5753) ADV_POST_TASK: [rx_parse_task] Canāt send, MQTT is not connected yet
W (5755) ADV_POST_TASK: [rx_parse_task] Canāt send, MQTT is not connected yet
W (5761) ADV_POST_TASK: [rx_parse_task] Canāt send, MQTT is not connected yet
W (5768) ADV_POST_TASK: [rx_parse_task] Canāt send, MQTT is not connected yet
W (5786) ADV_POST_TASK: [rx_parse_task] Canāt send, MQTT is not connected yet
W (5853) ADV_POST_TASK: [rx_parse_task] Canāt send, MQTT is not connected yet
I (5983) MQTT: [mqtt_task] MQTT_EVENT_CONNECTED
I (5984) MQTT: [mqtt_task] esp_mqtt_client_publish: topic:ādevices/RuuviGateway/messages/events/gw_statusā, message:ā{āstateā: āonlineā}ā
I (5995) MQTT: [mqtt_task] esp_mqtt_client_publish: message_id=6804
I (5998) LEDS: [mqtt_task] leds_indication_on_network_ok
I (6004) LEDS: [mqtt_task] LED: OFF
ā¦
I (560784) http: [adv_post_task] HTTP POST to URL=https://network.ruuvi.com/record, DATA:
I (562152) http: [adv_post_task] HTTP POST to URL=https://network.ruuvi.com/record: STATUS=200
I (562156) LEDS: [adv_post_task] leds_indication_on_network_ok
I (562157) LEDS: [adv_post_task] LED: OFF