Network Binding General Setup & Network.cfg file not created automatically

Hi,

I`m planning to use Network Binding to detect status of some equipment at home (TV, xbox and radio). Also possibly will be using this add to detect mobile phone presence.

I have installed this binding (version 2.3.0) and was expecting to find configuration file under services in usual place but this time the file wasn`t created automatically.

Just before I installed Network Binding, I installed Network Health Binding (v 1.12.0), started configuring networkhealth.cfg but found on the documentation that for openhab2 I should be using Network Binding instead.

info%20net%20bind

So I uninstalled Network Health Binding, restarted my openhab2 but NetworkHealth.cfg was still located inside service folder. Then I removed this config file manually and restarted openhab service again.

After installing Network Binding , realised that network.cfg was not created automatically and wonder if this has anything to with me deleting previous binding file manually from the system ?

Should I be creating network.cfg manually in this situation ?

Also what would be the correct syntax in sitemap if my item looks like follow to detect device via ip.

Switch    TV1    "TV"    <present>    (TV)        { nh="192.168.1.27" }

Edit:
Just created network.cfg manually and added the following configs.

binding.network:allowSystemPings=true
binding.network:allowDHCPlisten=false
binding.network:arpPingToolPath=/dev/null
binding.network:cacheDeviceStateTimeInMS=2000

In Paper UI / Things I discovered my device and named it as “TV1” (IP 192.168.1.27)

However after turning off the equipment , status is still showing ONLINE.

Does it mean my RPI is not able to ping this device ?

This is the status of the Thing. You have to link the channel(s) of the thing to item(s) to get the information if your tv is on or off.

Thanks, I got confused, this now making sens.

I got it to work finally.
I can read device status ON/OFF, response time and last seen time.
I used the following configs

sitemap

}
	Frame label="Status" {
	    Text item=MyDevice label="Device [%s]" valuecolor=[ON="green" ,OFF="red"]
	    Text item=MyDeviceResponseTime label="Device Response Time [%s]"
	    Text item=MyDeviceLastSeenTime label="Last Seen Time [%1$ta %1$tR]" 
	}

items

/* Network Device Status */
Switch MyDevice { channel="network:pingdevice:devicename:online" }
Number MyDeviceResponseTime { channel="network:pingdevice:devicename:latency" }
DateTime MyDeviceLastSeenTime { channel="network:pingdevice:devicename:lastseen" }

I would like to create group status and display under my system frame.

}
    Frame label="System" {
        Group item=Server icon="settings" 
	Group item=Status icon="settings"
	}

So in items I added (Status) group before the address but for some reason is not displaying my items under Frame “System” and group Status.
What am I doing wrong ? How to amend it in order display all items under System/Status group.

Did you already define a group Item named Status?

Yes I did

Group All
Group gGF 		(All)
Group gFF 		(All)
Group Outdoor 	(All)
Group Shutters 	(All)
Group Weather 	(All)
Group Status 	        
Group Server          

And your items look like this:

/* Network Device Status */
Switch MyDevice (Status) { channel="network:pingdevice:devicename:online" }
Number MyDeviceResponseTime  (Status) { channel="network:pingdevice:devicename:latency" }
DateTime MyDeviceLastSeenTime  (Status) { channel="network:pingdevice:devicename:lastseen" }

?

Maybe setting a label would do the trick (although even the label should be optional)

Correct, this is what I tried so far:

items

/* Network Device Status */
String MyDevice "Device [%s]" (Status) { channel="network:pingdevice:devicename:online" }  
Number MyDeviceResponseTime "Update [%s]"(Status) { channel="network:pingdevice:devicename:latency" }
DateTime MyDeviceLastSeenTime "Seen [%1$ta %1$tR]" (Status) { channel="network:pingdevice:devicename:lastseen" }

sitemap

 }
    Frame label="System" {
        Group item=Server icon="settings" 
	Group item=Status 
	}

However I don’t get to display any values when I go inside this group.

When I changing my first item String to Switch I get to display toggle switch which actually showing me correct status of device : if device is on Switch is On, if the device is Off switch will change state to off position.

Switch MyDevice "Device [%s]" (Status) { channel="network:pingdevice:devicename:online" } 

However I can toggle this switch at any time (for example force it to off position when the device is on). What I need is just to display text with two states: ON (in green or OFF in red).

Ironically all this seems to work without me creating group System, but really my intention is to hide it under System frame so Im chasing my tail at the moment :grinning:

If it comes to sitemaps, the Group Widget is a nice tool to get a quick result.
To get a good looking result, never use a Group Widget! :slight_smile: