This app regularly publishes to a configurable MQTT topic whenever connected to a given WiFi network. It can be used to integrate the presence of your phone in home automation.
The app uses the built-in Android alarm manager, 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.
- ACCESS_COARSE_LOCATION: on Android 9+, necessary to retrieve SSID of connected WiFi (you do not need to grant the permission in Android 6.0 - 8.1 for the app to work)
- ACCESS_NETWORK_STATE: necessary to register network change listener
- ACCESS_WIFI_STATE: necessary to retrieve SSID of connected WiFi
- FOREGROUND_SERVICE: on Android 9+, necessary to send notifications
- INTERNET: only necessary if your MQTT server is not running locally
- RECEIVE_BOOT_COMPLETED: necessary to start service on start-up
- WRITE_EXTERNAL_STORAGE: only necessary if you want to export log files in Android 4.0 - 4.3