I have a frustrating problem, I am using the Sonoff RF bridge together with Sonoff DW1’s and Sonoff PIR2 sensors. All communications are working as expected, however, there seems to be a “polling interval” that depending on the exact time that you trigger the sensor, there can be a lag of a few seconds before OH receives the action and responds accordingly - This issue is especially apparent where I have a PIR sensor in my bathroom with turns on the bathroom light when it detects movement. by the time the light turns on you have fumbled about int the dark for some time!
The Question:
Does anyone know of a method to increase the polling interval (assuming that what the issue is of course) so that this lag is reduced?
I am using the OH MQTT binding which is configured like so:
#
# Define your MQTT broker connections here for use in the MQTT Binding or MQTT
# Persistence bundles. Replace <broker> with an ID you choose.
#
# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
broker.url=tcp://localhost:1883
# Optional. Client id (max 23 chars) to use when connecting to the broker.
# If not provided a random default is generated.
#<broker>.clientId=<clientId>
# Optional. True or false. If set to true, allows the use of clientId values
# up to 65535 characters long. Defaults to false.
# NOTE: clientId values longer than 23 characters may not be supported by all
# MQTT servers. Check the server documentation.
#<broker>.allowLongerClientIds=false
# Optional. User id to authenticate with the broker.
broker.user=openhabian
# Optional. Password to authenticate with the broker.
broker.pwd=myPrivatePassword
# Optional. Set the quality of service level for sending messages to this broker.
# Possible values are 0 (Deliver at most once),1 (Deliver at least once) or 2
# (Deliver exactly once). Defaults to 0.
broker.qos=1
# Optional. True or false. Defines if the broker should retain the messages sent to
# it. Defaults to false.
broker.retain=true
# Optional. True or false. Defines if messages are published asynchronously or
# synchronously. Defaults to true.
broker.async=false
# Optional. Defines the last will and testament that is sent when this client goes offline
# Format: topic:message:qos:retained <br/>
#<broker>.lwt=<last will definition>
I am using MQTT for the majority of my items (as you can see from my .items file I do not have any particular issue with lag from my Sonoff Touch’s but appears that something going on with the RF Bridge is causing this. - I can see by looking at the bridge when I trigger any one of the 433mhz sensors that the bridge picks up the transaction quite quickly as the red light acknowledges this for me. however, I will often take a good 5 seconds or so for this information to propagate into my rules or show up in the logs. I have also noted that the same lag is apparent when viewing the console via the Tasmota interface albeit not as pronounced. leading me to think that the issue is a hardware limitation or something within the Tasmona software flashed onto the RF Bridge. Hopefully its the latter so there is more of a chance to make some changes!