Network Binding not working for presence

Good evening

I have Openhab installed on a Raspberry PI 2, I already installed the Network binding and added the following to the Items file:

Switch Presence_Mobile_Andres "Celular de Andres" <network> { channel="network:device:192_168_0_200:online" }

and the Sitemap file:

Switch item=Presence_Mobile_Andres label="Celular de Andres"

am I doing anything wrong?

please help!!

Did you create a Thing (either via PaperUI or via a Things file)?
If using file: post it, if using PaperUI, use the Channel UID

I think that the second field in the channel definition cannot be device
It should be either pingdevice or servicedevice


Your item should be:

Switch Presence_Mobile_Andres "Celular de Andres [%s]" <network> { channel="network:device:192_168_0_200:online" }

and your sitemap:

Text item=Presence_Mobile_Andres

why not Switch Vincent? it’s a valid sitemap element
and in theory (I don’t use it), the network channel online will work with a switch
i think the error is in the channel definition of the Thing

Because the Switch in the UI is used to send a command
In this case it’s only a status display

Probably, I only saw the fact that it was not displaying the status with [%s] but it did because he is using sitemap Switch

Rescan the network things and you should get different channels for the phone
Try others

Also, just comes to mind. Did you assign a static IP to you phone?

you guys are awesome!!

you were right, I just needed to update the channel to:

Switch Presence_Mobile_Andres "Celular de Andres" <network> { channel="network:pingdevice:192_168_0_200:online" }

just the “ping” part missing :slight_smile:

thanks a lot peeps, you rule!

1 Like