Python MQTT message lag

Python and python framework

Moderator: leecollings

Post Reply
User avatar
heggink
Posts: 994
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Python MQTT message lag

Post by heggink »

I am a user of the zigbee2mqtt plugin as well as the recently developed zwavejs2mqtt beta plugin. Both use mosquitto onMessage to create and update devices. Plugins have been created by different developers. Both function really well except for 1 issue that I run into: on occasion, there is a multi-second delay between a message being sent from domoticz and the plugin framework handling it with onMessage.

I did some testing using 2 test door-window sensors, one zwave and one zigbee. opening/closing often results in immediate updates but ever so often, takes multiple seconds and I can't for the life of me, figure out why that is. Over the past year, I made changes to all dzvents scripts to be as effective as possible so they don't block the system. Same with other python plugins.

When still using the built-in OZW, changes were instantly as well. It's like the python framework tasks are suffering from some sort of scheduling wait before onMessage gets called...

Anyone any thoughts?
Docker in Truenas scale, close to latest beta
RFXCOM 433 and 868, zigbee2mqtt,
P1 meter & solar panel
Post Reply