Openhab Presence

Where the Android APP connects or how it gets information when it is on the internal network. The idea is to be able to discover the Local connection and who connects to make the Presence through the APP. Since it does not have a Presence option if it is not through an alarm.

Donde se conecta o como obtiene la información la APP Android cuando está en la red interna. La idea es poder descubrir la conexión Local y quien se conecta para realizar la Presencia por medio de la APP. Ya que no tiene una opción de Presencia si no es por medio de una alarma.

¡Por favor en inglés, ya que este es un foro de habla inglesa!

Welcome to the community!

There’s no need for the Android app. You can detect when devices are connected to WiFi using the Network binding.

Have you gone through the New User Tutorial? It uses the Network binding as an example for setting up your first binding.

1 Like

Network Binding removes IP addresses from DHCP, but which are Cellular, IOT, Notebook or others. As valid if it is my cell phone and not that of a family member or friend.

Network Binding saca por del DHCP los IP, pero cuales son Celulares, IOT, Notebook u otros. Como valido si es mi celular y no el de un familiar o amigo.

I’m having difficulty understanding what you want due to the language translation.

Configure your WiFi router to always use the same IP address for your phone. The Network binding will look for this IP address, and it will know that it is your phone. To detect other phones, computers, or IoT devices, reserve IP addresses for those phones and add them to openHAB.

Is this what you want to do?

but the cell phone falls a sleep and an IP number does not give security or MAC.

By https, the openHab server if it is internal can request more information from the cell phone as a local certificate of the mobile

Please read this section from the Network Binding documentation:

Android and iOS devices

Because mobile devices put themselves in a deep sleep mode after some inactivity, they do not react to normal ICMP pings. Configure ARP ping to realize presence detection for those devices. This only works if the devices have WIFI enabled, have been configured to use the WIFI network, and have the option “Disable wifi in standby” disabled (default). Use DHCP listen for an almost immediate presence detection for phones and tablets when they (re)join the home Wifi network.

I’m looking for something safer than just a PING. Validate a local certificate or something better by HTTPS.

Interesting thought to make presence not on the IP but on a validated device.
I currently have not heard about this approach and cannot think of a solution.

So … maybe a different approach. How about your phone tells openhab that it is present. have a job running on your phone (tasker or so) that sends a post request to openhab-item with a specific password. As it is a https connection, it cannot sniffed, and as soon as you have no connection, you are “not present”. Would that come close to your idea?

The idea would be that the APP of the cell phone when connecting Locally uses a Client SSL Certificate. With which certain devices in the local network can be validated and not by the Cloud. Being local and valid, I can act better on alarms or delicate sensors and also indicate the presence of the mobile.
On my site www.familiaortiz.com.ar/claves requested a Certificate that my machine has to grant access.

You are welcome to keep stating that you would like to use client SSL certificates, as you have decided that anything less is “not safe”, even on your local network. However, no one has responded to say that this is possible. We have instead suggested alternatives that you reject out of hand. That’s your choice, but at some point you will have to accept that your desired solution is not an available option. If this is what you want, you’re probably going to have to build it yourself.

Sorry that I can’t be of more help. Personally, I think that if you don’t trust a ping on your local network to be “safe”, you should be more concerned about the security of your local network. But I don’t know what your circumstances are.

2 Likes

Thank you.