Im really struggling with openhab. Everytime I think Im going add something that seems to be well documented and look simple I have nothing but headache.
Ive followed your link to the presence detection, copied and pasted it but nothing changes state.
I have tried to check the arping is ok and the binding config is ok but really dont know where/what the problem could be. I can use it from the terminal with no problem, I found a post about the command the network binding uses and have no problems there.
There are no issues in the log but also no logs about the period ping requests. I think my log is only showing warnings and info though so I guess there is another config if I want it to show any more eg the network binding info.
thing file (ive also tried this with all the other parameters manually added but it made no difference)
Thing network:device:StevensPhone "Stevens Phone" [hostname="192.168.0.25"]
Thing network:device:StevensLaptop "Stevens Laptop" [hostname="192.168.0.11"]
Thing network:device:KellysPhone "Kellys Phone" [hostname="192.168.0.15"]
item file
Switch Present "Someone is in" <present>
Group:Switch:AND(OFF,ON) gPresent <present>
Switch Present_Timer {expire="15m,command=OFF"}
Switch StevensPhone_presence (gPresent) {channel="network:pingdevice:StevensPhone:online"}
Switch StevensLaptop_presence (gPresent) {channel="network:pingdevice:StevensLaptop:online"}
Switch KellysPhone_presence (gPresent) {channel="network:pingdevice:KellysPhone:online"}
rules
rule "System started, Presence"
when
System started
then
Present.sendCommand(OFF) // assume no one is home on startup
end
rule "gPresent updated, at least one sensor changed state"
when
Item gPresent received update
then
// someone came home
if(gPresent.state == ON && Present.state != ON) {
Present_Timer.postUpdate(OFF) // cancel the timer if necessary
Present.sendCommand(ON)
}
// no one is home
else if(gPresent.state == OFF and Present.state != OFF){
Present_Timer.sendCommand(ON) // start the timer
}
end
rule "Present_Timer expired"
when
Item Present_Timer received command OFF
then
Present.sendCommand(OFF)
end
sitemap file (ive tried the presence items with the icon switch just to see if it made a difference and even manually switching them the presence timer switch doesnt switch on)
sitemap home label="Home Page"{
Frame label="Temperatures"{
Text item=sensor_1 icon="temperature"
Text item=sensor_2 icon="temperature"
Text item=sensor_3 icon="temperature"
Text item=sensor_4 icon="temperature"
Text item=sensor_5 icon="temperature"
}
Frame label="Setpoints"{
Setpoint item=Heating_Setpoint icon="heating" step=0.1 minValue=16 maxValue=24
Setpoint item=HWS_Setpoint icon="heating" step=0.5 minValue=40 maxValue=60
Setpoint item=OAT_HoldOff icon="heating" step=0.5 minValue=10 maxValue=26
}
Frame label="MQTT buttons"{
Text item=heating_ovr_status icon="switch"
Text item=hws_ovr_status icon="switch"
}
Frame label="Who is in?"{
Switch item=Present_Timer icon="network"
Switch item=StevensPhone_presence icon="network"
Switch item=StevensLaptop_presence icon="network"
Switch item=KellysPhone_presence icon="network"
}
}
network config file (ive tried allowSystemPings true and false, neither make a difference)
allowSystemPings=false
arpPingToolPath=arping