Use intent to switch media center

I’m trying to use the docs to create an automation i home assistant to automatically switch the chosen media center but can’t seem to get it to work.

I have successfully used Macrodroid in the past to send intents but yatse API has changed since and now I’m struggeling to get it to work.

Using node red I can succesfully send the message to my phone, but media center doesn’t change

{
    "message": "command_broadcast_intent",
    "data": {
        "ttl": 0,
        "priority": "high",
        "intent_package_name": "org.leetzone.android.yatsewidgetfree",
        "intent_action": "tv.yatse.api.SELECT_MEDIACENTER",
        "intent_extras": "ID:7"
    }
}

I have also tried replacing "intent_package_name": with org.leetzone.android.yatsewidgetfree/tv.yatse.api.ApiReceiver with the same result.

Home assistant companion app docs can be found here: Notification Commands | Home Assistant Companion Docs

what am I missing?

The logs :slight_smile:

Sorry, finally got around to play with this again.

I tested sending the intent through Home assistant, aswell as through Macrodroid (see settings)

Checking the logs, it seems none of these were catched by Yatse. I made sure to enable debug before broadcasting/sending the intent

2023-03-29 22:12:40.412 Verbose/MainInstance: initialize: CLT-L29/HWCLT/29/10/CLT-L29/HUAWEI/0/true/false/68/126/10313

2023-03-29 22:12:40.421 Verbose/MainInstance: initialize: 11.4.0 (71108264[arm64-v8a,armeabi-v7a,armeabi])-1.0 false

2023-03-29 22:12:40.422 Verbose/NetworkManager: Network status: Init

2023-03-29 22:12:40.423 Verbose/DynamicShortcutUtils: Update shortcuts: true / [movies, search, voice_command, remote, pvr]

2023-03-29 22:12:40.424 Verbose/NetworkManager: Not Wifi Only: Status[true/WIFI/false]

2023-03-29 22:12:40.424 Verbose/KodiMatrix: Settings: 192.168.1.122@80 false [9090/9777/5600] (1/0/0/0)

2023-03-29 22:12:40.457 Verbose/StatusObserver: UI status changed to true from false

2023-03-29 22:12:40.458 Verbose/NetworkManager: Network status: Resume(0)

2023-03-29 22:12:40.460 Verbose/KodiMatrix: Caching http://192.168.1.122:80/jsonrpc as http://192.168.1.122/jsonrpc

2023-03-29 22:12:40.465 Verbose/NetworkManager: Not Wifi Only: Status[true/WIFI/false]

2023-03-29 22:12:40.466 Verbose/KodiMatrix: --> [678] POST http://192.168.1.122/jsonrpc (61-byte body)

2023-03-29 22:12:40.467 Verbose/KodiMatrix: --> [678] {"id":711,"jsonrpc":"2.0","method":"Player.GetActivePlayers"}

2023-03-29 22:12:40.468 Verbose/KodiMatrix: --> [325] POST http://192.168.1.122/jsonrpc (61-byte body)

2023-03-29 22:12:40.468 Verbose/KodiMatrix: --> [325] {"id":711,"jsonrpc":"2.0","method":"Player.GetActivePlayers"}

2023-03-29 22:12:40.468 Verbose/KodiMatrix: --> [579] POST http://192.168.1.122/jsonrpc (61-byte body)

2023-03-29 22:12:40.468 Verbose/KodiMatrix: --> [579] {"id":711,"jsonrpc":"2.0","method":"Player.GetActivePlayers"}

2023-03-29 22:12:40.468 Verbose/KodiTCPListener: Starting TCPListener for: 192.168.1.122

2023-03-29 22:12:40.504 Verbose/KodiMatrix: <-- [579] 200 OK http://192.168.1.122/jsonrpc (44ms, 38-byte body)

2023-03-29 22:12:40.505 Verbose/KodiMatrix: <-- [579] {"id":711,"jsonrpc":"2.0","result":[]}

2023-03-29 22:12:40.505 Verbose/KodiMatrix: <-- [325] 200 OK http://192.168.1.122/jsonrpc (44ms, 38-byte body)

2023-03-29 22:12:40.505 Verbose/KodiMatrix: <-- [325] {"id":711,"jsonrpc":"2.0","result":[]}

2023-03-29 22:12:40.505 Verbose/KodiMatrix: <-- [678] 200 OK http://192.168.1.122/jsonrpc (44ms, 38-byte body)

2023-03-29 22:12:40.506 Verbose/KodiMatrix: <-- [678] {"id":711,"jsonrpc":"2.0","result":[]}

2023-03-29 22:12:40.509 Verbose/KodiMatrix: --> [762] POST http://192.168.1.122/jsonrpc (106-byte body)

2023-03-29 22:12:40.509 Verbose/KodiMatrix: --> [762] {"id":623,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume","muted"]}}

2023-03-29 22:12:40.509 Verbose/KodiMatrix: --> [161] POST http://192.168.1.122/jsonrpc (106-byte body)

2023-03-29 22:12:40.510 Verbose/KodiMatrix: --> [161] {"id":623,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume","muted"]}}

2023-03-29 22:12:40.510 Verbose/KodiMatrix: --> [886] POST http://192.168.1.122/jsonrpc (106-byte body)

2023-03-29 22:12:40.510 Verbose/KodiMatrix: --> [886] {"id":623,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume","muted"]}}

2023-03-29 22:12:40.521 Verbose/StatusObserver: UI status changed to false from true

2023-03-29 22:12:40.561 Verbose/KodiMatrix: <-- [886] 200 OK http://192.168.1.122/jsonrpc (51ms, 64-byte body)

2023-03-29 22:12:40.562 Verbose/KodiMatrix: <-- [886] {"id":623,"jsonrpc":"2.0","result":{"muted":false,"volume":100}}

2023-03-29 22:12:40.562 Verbose/KodiMatrix: <-- [161] 200 OK http://192.168.1.122/jsonrpc (52ms, 64-byte body)

2023-03-29 22:12:40.562 Verbose/KodiMatrix: <-- [161] {"id":623,"jsonrpc":"2.0","result":{"muted":false,"volume":100}}

2023-03-29 22:12:40.562 Verbose/KodiMatrix: <-- [762] 200 OK http://192.168.1.122/jsonrpc (52ms, 64-byte body)

2023-03-29 22:12:40.563 Verbose/KodiMatrix: <-- [762] {"id":623,"jsonrpc":"2.0","result":{"muted":false,"volume":100}}

2023-03-29 22:12:40.563 Verbose/StatusObserver: No Widgets and no UI / Wear / MediaBrowser

2023-03-29 22:12:40.612 Verbose/StartActivity: Handling #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10100000;launchHwFlags=0x100;component=org.leetzone.android.yatsewidgetfree/org.leetzone.android.yatsewidget.ui.activity.StartActivity;end null true

2023-03-29 22:12:40.612 Verbose/StartActivity: Navigating to RemoteNavigationDestination

2023-03-29 22:12:40.756 Verbose/StatusObserver: UI status changed to true from false

2023-03-29 22:12:40.756 Verbose/NetworkManager: Network status: Resume(0)

2023-03-29 22:12:40.759 Verbose/NetworkManager: Not Wifi Only: Status[true/WIFI/false]

2023-03-29 22:12:42.262 Verbose/KodiMatrix: --> [115] POST http://192.168.1.122/jsonrpc (60-byte body)

2023-03-29 22:12:42.264 Verbose/KodiMatrix: --> [115] {"id":86,"jsonrpc":"2.0","method":"Player.GetActivePlayers"}

2023-03-29 22:12:42.265 Verbose/KodiMatrix: --> [517] POST http://192.168.1.122/jsonrpc (60-byte body)

2023-03-29 22:12:42.266 Verbose/KodiMatrix: --> [517] {"id":86,"jsonrpc":"2.0","method":"Player.GetActivePlayers"}

2023-03-29 22:12:42.267 Verbose/KodiMatrix: --> [932] POST http://192.168.1.122/jsonrpc (60-byte body)

2023-03-29 22:12:42.268 Verbose/KodiMatrix: --> [932] {"id":86,"jsonrpc":"2.0","method":"Player.GetActivePlayers"}

2023-03-29 22:12:42.269 Verbose/KodiMatrix: <-- [932] 200 OK http://192.168.1.122/jsonrpc (4ms, 37-byte body)

2023-03-29 22:12:42.270 Verbose/KodiMatrix: <-- [932] {"id":86,"jsonrpc":"2.0","result":[]}

2023-03-29 22:12:42.271 Verbose/KodiMatrix: <-- [517] 200 OK http://192.168.1.122/jsonrpc (5ms, 37-byte body)

2023-03-29 22:12:42.272 Verbose/KodiMatrix: <-- [517] {"id":86,"jsonrpc":"2.0","result":[]}

2023-03-29 22:12:42.273 Verbose/KodiMatrix: <-- [115] 200 OK http://192.168.1.122/jsonrpc (5ms, 37-byte body)

2023-03-29 22:12:42.274 Verbose/KodiMatrix: <-- [115] {"id":86,"jsonrpc":"2.0","result":[]}

2023-03-29 22:12:42.275 Verbose/KodiMatrix: --> [493] POST http://192.168.1.122/jsonrpc (106-byte body)

2023-03-29 22:12:42.276 Verbose/KodiMatrix: --> [493] {"id":107,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume","muted"]}}

2023-03-29 22:12:42.277 Verbose/KodiMatrix: --> [497] POST http://192.168.1.122/jsonrpc (106-byte body)

2023-03-29 22:12:42.279 Verbose/KodiMatrix: --> [497] {"id":107,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume","muted"]}}

2023-03-29 22:12:42.280 Verbose/KodiMatrix: --> [292] POST http://192.168.1.122/jsonrpc (106-byte body)

2023-03-29 22:12:42.281 Verbose/KodiMatrix: --> [292] {"id":107,"jsonrpc":"2.0","method":"Application.GetProperties","params":{"properties":["volume","muted"]}}

2023-03-29 22:12:42.282 Verbose/KodiMatrix: <-- [292] 200 OK http://192.168.1.122/jsonrpc (5ms, 64-byte body)

2023-03-29 22:12:42.283 Verbose/KodiMatrix: <-- [292] {"id":107,"jsonrpc":"2.0","result":{"muted":false,"volume":100}}

2023-03-29 22:12:42.283 Verbose/KodiMatrix: <-- [497] 200 OK http://192.168.1.122/jsonrpc (5ms, 64-byte body)

2023-03-29 22:12:42.284 Verbose/KodiMatrix: <-- [497] {"id":107,"jsonrpc":"2.0","result":{"muted":false,"volume":100}}

2023-03-29 22:12:42.284 Verbose/KodiMatrix: <-- [493] 200 OK http://192.168.1.122/jsonrpc (6ms, 64-byte body)

2023-03-29 22:12:42.284 Verbose/KodiMatrix: <-- [493] {"id":107,"jsonrpc":"2.0","result":{"muted":false,"volume":100}}

Macrodroid settings where I also tried adding:
org.leetzone.android.yatsewidgetfree/tv.yatse.api.ApiReceiver to Class and also to Data

I also tried changing Target from Service to Broadcast

So yes it does not reach the app you need to see with those tools for their logs to see the issue.

For macro droid.
The target is Broadcast
the package is org.leetzone.android.yatsewidgetfree
the class is tv.yatse.api.ApiReceiver

Alright, seems I never got the combination right.

Intents work perfect after configuring per your last reply. Big thanks and keep up the great work on the best kodi remote ever made :sun_with_face: