- Platform information:
- Hardware: Main:VM 4 core/ 3GB mem/ 50GB storage | RPI: PI 3B with aeotec gen5 zstick connected via eventbus (mqtt1 binding)
- OS: Debian 9
- Java Runtime Environment: Oracle 1.8.0_201"
- openHAB version: 2.5.8 / 2.5.8
My setup with RPI being an OH 2.5.8 instance with Z-stick passing Z-wave items on to the main instance OH 2.5.8 in a VM, due to location issues wrt z-wave connectivity.
This has been running great for 2 years or so.
I added a new Fibaro Button to my setup as a scenecontroller and as a first trial used a rule found here on the forum.
Now when I press the button the rule triggers on the update correctly on the RPI by only triggering once, the update is sent via eventbus only once to the main instance, however there it triggers twice.
Iāve searched for other posts on the forum if this is a known side-effect of using mqtt-eventbus, but havenāt seen proof that other people have run into this before.
When using the trigger as changed, the trigger is correctly only triggered once. But that misses the flow of pressing the same options 2 times in a row(ie. single press 2 times with 5 sec interval)
Iām sure this can be mitigated using a locking mechanism, but I think itās weird this only happens over mqtt1-plugin and not directly on the RPI directly.
Questions:
Anyone else encountered this issue before?
Seeing several topics regarding triggers on the mqtt-addon(v2), am I right to assume this issue doesnāt occur there? That would make biting the bullet regarding mqttv2 setup easier.
- Items:
RPI:
Number Hobbyroombutton_SceneNumber "Scene number" {channel="zwave:device:512:node46:scene_number"}
Main:
Number Hobbyroombutton_SceneNumber "Scene number [%s]" {mqtt="<[mosquitto:domopi/Hobbyroombutton_SceneNumber/state:state:default]"}
- Rules code related to the issue
rule "Fibaro Hobbyroom Button Pushing"
when
Item Hobbyroombutton_SceneNumber received update
// Item Hobbyroombutton_SceneNumber changed
then
logInfo("FB01", "<" + Hobbyroombutton_SceneNumber.state + ">")
if (Hobbyroombutton_SceneNumber.state == 1.0) {
logInfo("FB01", "FB01 1x pushed")
}
if (Hobbyroombutton_SceneNumber.state == 1.1) {
logInfo("FB01", "FB01 let go")
}
end//shortened for brevity and enough to show issue.
- Services configuration related to the issue
RPI:
mqtt:
broker.qos=2
mqtt-eventbus:
broker=broker
statePublishTopic=domopi/${item}/state
commandSubscribeTopic=domopi/${item}/command
Main:
mqtt:
broker.qos=2
mqtt-eventbus:
broker=broker
commandPublishTopic=domopi/${item}/command
stateSubscribeTopic=domopi/${item}/state
Log from RPI:
2020-09-12 18:05:36.704 [INFO ] [.eclipse.smarthome.model.script.FB01] - <1.0>
2020-09-12 18:05:36.714 [INFO ] [.eclipse.smarthome.model.script.FB01] - FB01 1x pushed
2020-09-12 18:05:48.684 [INFO ] [.eclipse.smarthome.model.script.FB01] - <1.3>
2020-09-12 18:05:48.711 [INFO ] [.eclipse.smarthome.model.script.FB01] - FB01 2x pushed
Log from Main:
2020-09-12 18:05:36.906 [INFO ] [.eclipse.smarthome.model.script.FB01] - <1.0>
2020-09-12 18:05:36.906 [INFO ] [.eclipse.smarthome.model.script.FB01] - <1.0>
2020-09-12 18:05:36.907 [INFO ] [.eclipse.smarthome.model.script.FB01] - FB01 1x pushed
2020-09-12 18:05:36.907 [INFO ] [.eclipse.smarthome.model.script.FB01] - FB01 1x pushed
2020-09-12 18:05:48.824 [INFO ] [.eclipse.smarthome.model.script.FB01] - <1.3>
2020-09-12 18:05:48.824 [INFO ] [.eclipse.smarthome.model.script.FB01] - <1.3>
2020-09-12 18:05:48.826 [INFO ] [.eclipse.smarthome.model.script.FB01] - FB01 2x pushed
2020-09-12 18:05:48.827 [INFO ] [.eclipse.smarthome.model.script.FB01] - FB01 2x pushed
Mosquitto:
1599926736: Received PUBLISH from domopi (d0, q2, r0, m63082, 'domopi/Hobbyroombutton_SceneNumber/state', ... (3 bytes))
1599926736: Sending PUBLISH to openHAB2 (d0, q2, r0, m2301, 'domopi/Hobbyroombutton_SceneNumber/state', ... (3 bytes))
1599926748: Received PUBLISH from domopi (d0, q2, r0, m63086, 'domopi/Hobbyroombutton_SceneNumber/state', ... (3 bytes))
1599926748: Sending PUBLISH to openHAB2 (d0, q2, r0, m2309, 'domopi/Hobbyroombutton_SceneNumber/state', ... (3 bytes))