rule "Ping Hue"
when
Item Ping_Hue_Hub changed
then
if(Startup.state != ON){
sendTelegram("Carsten", "Hue Bridge ist jetzt "+Ping_Hue_Hub.state)
}
end
rule "Ping_FritzBox_CMHW_1"
when
Item Ping_FritzBox_CMHW_1 changed
then
if(Startup.state != ON){
sendTelegram("Carsten", "Fritzbox-CMHW-1 ist jetzt "+Ping_FritzBox_CMHW_1.state)
}
end
Now i see that the devices are online according to the sidemap…
But when i un plug my hue bridge now status is changed or any message is send to my telegram bot…
There is a mistake inside your rule.(I think) There is no Item named Ping_Hue. Just an item named Ping_Hue_Hub. ping_hue is a thing.
Telegram send +Ping_Hue.state still a thing?
Also this if(Startup.state != ON) looks strange. Is there and Item named Startup? What is it?
rule "Ping Hue"
when
Item Ping_Hue_Hub changed
then
if(Startup.state != ON){
sendTelegram("Carsten", "Hue Bridge ist jetzt "+ Ping_Hue_Hub.state)
}
end
How long are you waiting for the Network binding to report? You currently have your Things set to only check once a minute and have a timeout of five seconds so you have to wait at up to 65 seconds before Network will report the device as offline.
Also, if you are using a recent snapshot (anything after around build 900 I think) the capabilities and Thing definition syntax changed significantly. See the readme for the Network binding.
Thanks now it is working
I only get this warning…can I ignore that or is there something wrong in my settings!?
2017-11-24 14:02:08.627 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, No such file or directory)
Just upgraded to OH2 2.2, and the network binding is killing two of my IoT devices (ie they hang).
This worked fine in 2.1, but there have been a lot of changes for the 2.2 release, and it’s the arping that kills my two devices.
I’ve renamed arping to stop this happening, but does anyone know how to disable arping in the binding? maybe on a per-device basis (it only affects these two devices).
I’ve looked at the binding readme, and it’s not very clear, it says:
Create a file org.openHAB.binding.network.cfg in your openHAB/etc directory
Now I’m assuming this means /var/lib/openhab2/etc as it’s not clear what the openHAB/etc directory is, but the only option is
allowSystemPings=false
It’s not clear if this is ping, or arping or both?
In addition, it doesn’t work, so I’m assuming the location is wrong, or the file name is wrong. Why the non-standard naming? ie openHAB vs openhab in the file name, and why would this not be in /etc/openhab2/services like all the other binding configurations?
You can set the arpPingToolPath config parameter to /dev/null instead of changing arping on your system which will effectively disable arping for the Network binding. I know of no way to selectively enable/disable arping on a Thing by Thing basis as far as I can tell.
allowSystemPings: Use the external ICMP ping program of the operating system, instead of the Java ping. Useful if the devices cannot be reached by Java ping. Default is true.
allowDHCPlisten: If devices leave and reenter a network, they usually request their last IPv4 address by using DHCP requests. If we listen for those messages, we can make the status update more “real-time” and do not have to wait for the next refresh cycle. Default is true.
arpPingToolPath: If your arp ping tool is not called arping and cannot be found in the PATH environment, you can configure the absolute path here. Default is “arping”.
cacheDeviceStateTimeInMS: The result of a device presence detection is cached for a small amount of time. Set this time here in milliseconds. Be aware that no new pings will be issued within this time frame, even if explicitly requested. Default is 2000.
but I’m still not clear what the openHAB/etc directory is. In the link you give, one is /etc/openhab2 (and does not work), and the other is /etc/default/openhab2 which is a file.
There are of course other etc directories such as ~openhab/etc, but none of those work either. Configuring in Paper UI doesn’t make any difference either.
Thats why I’ve had to resort to renaming arping, to stop the binding using it.
Does anyone know what directory openHAB/etc actually is? I’m using Ubuntu with a repository install.