Connectivity › Presence Publisher
thumb_up Follow me on GitHub to get notifications about my projects (like Fossdroid Core), thanks! close

Presence Publisher

Regularly publish to an MQTT topic
Version: 2.5.3
Added: 18-01-2019
Updated: 01-09-2023
This free open-source app regularly publishes to a configurable MQTT topic whenever
connected to a given Wi-Fi network or in proximity to a Bluetooth beacon.
It can be used to integrate the presence of your phone in home automation.

The app uses the AndroidX WorkManager library, so notifications are sent
even if the phone is in stand-by. In addition to regularly scheduled checks,
the app also reacts to changes in the network connection.

The MQTT client supports anonymous and username / password authentication
as well as client certificate authentication. For more details on how to
configure certificate-based authentication, please have a look at
https://github.com/ostrya/PresencePublisher/blob/main/README.md.

Note that the data you choose to publish is sent only to the server of your choice.
The app does not send any data to me or any other third party.

If you want to know more about how this app processes your location data,
please have a look at the privacy policy at https://ostrya.github.io/PresencePublisher/en/PRIVACY_POLICY.html.

Permissions

• ACCESS_BACKGROUND_LOCATION: on Android 10+, necessary to retrieve name of connected Wi-Fi while running in background
• ACCESS_FINE_LOCATION: necessary to discover beacons; on Android 9+, necessary to retrieve name of connected Wi-Fi
• ACCESS_NETWORK_STATE: necessary to register network change listener
• ACCESS_WIFI_STATE: necessary to retrieve SSID of connected Wi-Fi
• BLUETOOTH: necessary up to Android 11 to communicate with beacons
• BLUETOOTH_ADMIN: necessary up to Android 11 to discover beacons
• BLUETOOTH_CONNECT: on Android 12+, necessary to read beacon names
• BLUETOOTH_SCAN: on Android 12+, necessary to discover beacons
• FOREGROUND_SERVICE: necessary on Android 9+ to run the app reliably
• FOREGROUND_SERVICE_DATA_SYNC: on Android 14+, necessary to send MQTT messages
• FOREGROUND_SERVICE_LOCATION: on Android 14+, necessary to retrieve Wi-Fi name
• INTERNET: only necessary if your MQTT server is not running locally
• POST_NOTIFICATIONS: necessary in Android 13+ to create notifications
• RECEIVE_BOOT_COMPLETED: necessary to start service on start-up
• REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: on Android 6+, necessary to request disabling battery optimization

Screenshot of Presence Publisher Screenshot of Presence Publisher
code Source file_download Download