Android command_activity notifications no longer activating the command?

I’ve had a couple of scripts to turn my VPN on and off automatically based on my location, which I disabled a month or so ago due to my home router dying. I’ve now got a replacement router providing the same VPN again, so I’ve re-enabled the automation, but instead of Openvpn starting the connection, I’m just getting a Home Assistant app notification that says “command_activity”. Did something change with the app recently? Do we need to adjust our scripts?

The same scripts on my older device running Android 8 are working, but the companion app on that device has an additional permission “Allow display over other apps” turned on, which doesn’t seem to be available on Android 11.

This is the script I’m running.

Service: Notifications: Send a notification via mobile_app_my_phone
message: command_activity
data:
intent_package_name: net.openvpn.openvpn
intent_action: net.openvpn.openvpn.CONNECT
intent_class_name: net.openvpn.unified.MainActivity
intent_extras: >-  net.openvpn.openvpn.AUTOSTART_PROFILE_NAME:MyVPN,net.openvpn.openvpn.AUTOCONNECT:true

Settings > companion app > select your server

Turn on control remotely

2 Likes

Ah, thanks! I wonder how that got turned off?

nothing code wise, maybe some pocket action? :slight_smile: