Hi, trying to get a Presence switch in based on the examples provided.
I placed this in my items file:
Group gMobiles
Switch Presence
Switch phone1 (gMobiles) {nh=“192.168.1.173”}
I understand that NH should trigger anyway without the need for rule configuration, so I’ve skipped the rules bit.
Now, on my sitemap I’ve put the phone1 switch to see if it’s doing anything… and it’s not, even though I can ping that IP address from my terminal.
in openhab.log I can see the following firing every 1 second, so something’s happening
2016-01-24 23:37:05.582 [INFO ] [b.s.i.n.typicals.RefreshHEALTY] - sendHEALTY_REQUESTframe
Unfortunately, nothing in events.log happens any ideas?
The RefreshHEALTY class belongs to the Souliss binding and has nothin to do with the NetworkHealth binding.
The code you provided should show a switch item in your sitemap. The switch’s state should indicate if the device is reachable or not. Do you see the switch?
yup - binding is in the directory and I restarted a few times.
From my understanding the .cfg lines are optional - but just for good measure I put them in there anyway with the default values - understand that this means the refresh is every minute.
I then restarted the OH service again and waited until everything loaded. The rule works fine - the problem is that for some reason NH isn’t updating the status of phone1. I tried putting the switch in the off position, waiting a few minutes (nothing happened). and vice versa - putting the switch on and disconnecting from wi-fi.
I’m actually running it as pi (which incidentally is the same user I’m using to perform an icmp ping through console.
I’ve got this on my openhab auto-start file (which is chowned on all the files/folders in OH and addons)
RUN_AS=pi