Skip to content

TBGatewayMqttClient device attribute subscription is unreliable #74

@sacot41

Description

@sacot41

Hi,

I use a InHand IG502 device has a gateway for other sensors. I use TBGatewayMqttClient class to communicate with Thingsboard. Sensor send telemetry to Thingsboard at different rate, varying between 1 second to 1 hour.

Attributes subscribe made with subscribe_to_all_attributes function for the InHand IG502 attributes work perfectly.
Attributes subscribe made with gw_subscribe_to_all_device_attributes function for sensor devices is unreliable. Sometime is work perfectly, sometime, it never receives update from Thingsboard when attributes change is made. I was not able to identify the cause of the issue. When the subscription is broken, it recovers autonomously after some minute.

I add logging to _on_message function in TBGatewayMqttClient. When the problem appears, attribute subscribed by subscribe_to_all_attributes fire the function, but attribute subscribed by gw_subscribe_to_all_device_attributes never fire.

I have difficulty to understand how TBGatewayMqttClient subscribe to device attribute, so I have difficulty to find the root of the problem or a workaround. How can I make device attribute subscription more reliable ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions