Read Z-wave valu and act recording to that

Need help how to set up this.

I have a razberry running Z-Way on a RPi. My Openhab 1.8 is on a virtual ubunto server i.e Z-Wave controller and Openhab is on two different computers.

When a KNX button is pressed i run a rule on Openhab. I would also need to run another KNX command IF a Z-wave value is ON. Can this be accomplished with MQTT? And can I check a MQTT value in a rule?

I’m have not MQTT server setup as it is now but is that the simplest way to accomplish this or is it another, better way?

You can link Z-Way and openhab using MQTT from a OH perspective (i.e. you need to find out how to do it in Z-Way).
You can set item states depending on MQTT messages using MQTT binding - read the Wiki and the forum for examples.

Well, the most simple way would be dispose of Z-Way and to run OH on the RaZberry.

Thanks,
I’ll try as it is right now with mosquito MQTT. I have a lot of dashing configured on the current Ubuntu server so try that first.

OK, now I have the MQTT broker setup and its working like a charm.
I can get Openhab to react on changing MQTT messages but for now just when they change.

I want to read a MQTT value from a rule (A MQTT value changed maybe an hour ago).

What I mean is this.

I have a Z wave sensor on our garage door that tells if its open or not.
The way the garage motor is controlled is by closing a circuit and then break teh circuit agan (I.E I can not tell if the door is open or closed, since you also can open it with different remote controls)

We have a Good Night scene in teh KNX system that locks our doors and turn of the lights and I want to close the garage door if its open so I need to be able to get current state af a MQTT value in a rule and close the garagedoor if its open,

How can I accomplish this, Can I save the MQTT publications value in a openhab variable?