Check zwave device online

This morning I have a trouble bringing behaviour. My working room stays cold, cause by heating is not working.
In the morning with a calendar event the thermostat changes from night to heat.

So what happens. In the the the calendar event appears the zwave device seems to be offline.
So error was, see attached picture, could not communicate.
30 mins later, I reconize that it is to cold, I switch manual to heat and everything works.

Is there a way to check if a command is successful?

Have a look at the logreader binding: Log Reader - Bindings | openHAB
With e.g. custom pattern search you should be able to identify such kind of messages and trigger a rule.

Interesting thoughts. I did not know that there is a way to read the logs.
But I’m still in a rule to set the heat mode. The rule was triggerd from the cal entry.
My wish was to query the state of the device, online or not after or before sending the heat mode state.

But I will try this

From within the rule you can try to run executeCommandLine and execute shell/perl/python/whatever-language and return a value to be used in the the rule.

You might want to consider what you really want to achieve. Finding out if a zwave Thing is on- or off-line is one thing, although not very reliable (battery devices may sleep for days, ignoring commands, yet be online).
And the device can be online but incapable of carrying out the command, anyway.

Some variation of allowing a time, and then making a check.
Essentially, when you issue a command, start a short timer.
Check if the Item state is as expected, else ring bells or whatever.

Beware the interference of autoupdate feature giving your Item optimistic predicted states.
You might need to review your device’s poll-after-command period to get reliablestatus reports.

I my case it was simple. I want to archive that it is not getting cold in my working room.
joke away. I just want to be shure that my device receives the command and that it it really changes the state.

I will try to use you’re suggestion with the time delay and query the status.

In my special case I found the device offline in the the log. The question is what a zwave device gives back as a status if it is offline.