carloszacu
(Carlos Andres Zapata Cuervo (El Loco))
November 12, 2018, 3:03am
1
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!!
Dim
(Angelos)
November 12, 2018, 6:17am
2
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
Ref: https://www.openhab.org/addons/bindings/network/#thing-configuration
vzorglub
(Vincent Regaud)
November 12, 2018, 7:31am
3
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
Dim
(Angelos)
November 12, 2018, 8:02am
4
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
vzorglub
(Vincent Regaud)
November 12, 2018, 8:14am
5
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
@carloszacu
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?
carloszacu
(Carlos Andres Zapata Cuervo (El Loco))
November 12, 2018, 7:45pm
6
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
thanks a lot peeps, you rule!
1 Like