Now my problem is, when the device is offline, I get exceptions all the time:
2019-10-25 21:33:37.350 [ERROR] [org.openhab.io.net.http.HttpUtil ] - Fatal transport error: java.net.NoRouteToHostException: No route to host (Host unreachable)
2019-10-25 21:33:37.353 [ERROR] [ab.binding.http.internal.HttpBinding] - No response received from 'http://192.168.0.55/YamahaExtendedControl/v1/main/getStatus'
I know that in that time the device cannot be reached. Is it possible to disable http checks temporarily?
I do not actively send the request. I just configured the item and http binding is executing the request automatically in background, even if I did not use that item anywhere.
But how can I implement this in a rule? Some of those http items just get values from the device, e.g. power state on/off or current volume. I want to use those values in my HabPanel.
In all rules I built so far I have entries for Items which receive a command or which change their state. How can I build a rule for a getValue-method?
I understand that in a rule I could trigger sending the http request and maybe catch those Exceptions described above but I do not know how to build a rule for a getValue-Method at all.
Oh man, you are right, sorry. Actually I did use that page you linked but did not get the right expression. "3/30 * * ? * * *" is working as expected.
But by using sendHttpGetRequest I am not able to catch the java.net.NoRouteToHostException by myself. It is already caught inside the http action and will also be logged automatically: 2019-10-27 13:34:06.158 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: java.net.NoRouteToHostException: No route to host
So all I have won is that not the complete stack trace is logged but only the non-reachable host. So I do have to ping the host first to avoid any exception in logfile (which is what I want to have, because it is kind of a normal state for me).