Presence Publisher

Android CI Github release date Github release F-Droid release

Get it on F-Droid Get it on Google Play

A simple app that regularly publishes to a configurable MQTT topic whenever connected to a given WiFi network or in proximity to a Bluetooth beacon. This can be used to integrate the presence of your phone in home automation.

Several networks and beacons can be configured at once and the message to be sent can be configured for each of them.

If your MQTT server is available on the internet, you can also choose to send an 'offline' message whenever you are not connected to any of the configured WiFi networks and not in range of any configured beacon.

As an additional feature, you can send the battery level of your device whenever a condition is met, so that you can recharge it before it turns off.

The app uses the built-in Android alarm manager, so notifications are sent even if the phone is in stand-by.

TLS with self-signed certificates

The app uses the default Android CA trust store for checking the server certificate validity. You can simply add your certificate via:

Client certificates

The Android keychain will only allow you to import a PKCS#12 keystore. If you have created a client certificate along the lines of, you will need to combine the certificate and key file together like this:

openssl pkcs12 -inkey client.key -in client.crt -export -out client.pfx

If you do not need your client certificate to be signed by a root certificate, because you plan to add it directly to the trusted certificates of your MQTT broker, you can also use the KeyStore Explorer to generate your client certificate:

Make sure your PKCS#12 keystore file has the .pfx extension, otherwise Android will not recognize it.


Future ideas