XBox companion app ready for testing

O, weeks ago! And I still have it. So this must be a me problem :slight_smile:

So, I installed the app on my Homey Pro. Whatā€™s next?

Ahumā€¦ Iā€™ve had some network changes. Have reconnected with my XBox One. Should be fine again. Thanks for the quick response!

1 Like

What is the format that needs to be placed in the refresh token field ?
everything after the = from refresh_token=
and before the &user ?

i have inserted this code several times but i cant seem to add a xbox console to my Homey
i keep getting no new devices found (also when discovering with the IP adress of the console)

how can i troubleshoot where it goes wrong ?

That is correct, from the = till the next & should do it.

That is weird, i even believe it should discover them without the token, it is needed for the more advanced features like control and detecting apps and games.
Are you sure they are on the same vnet etc, not that one is on your guest wifi while the other is lan or on a managed port on a switch that blocks discovery?

I think that was the case indeedā€¦ i connected to the Wifi network and it was discoverableā€¦
i have a seperate vlan for my gaming devices, dont want them to interfere with my teams calls for instanceā€¦
i was under the impression that that being able to connect to the ip was the same but i guess there is more traffic needed to that vlan ā€¦
do you know what communication is required ?
because i would like to place it back in the Game vLan

Its been a while since I made this app, and after building all the code I switched to a nodejs library that became available in the mean time. I believe it uses a ADP broadcast to ask for consoles to announce themselve. And then we get announcement responses back.
The IP address version works the same but in its broadcast request it targets the specified IP.
If you have many XBoxes (I have 5) then the multicast version can be drowned out so you only receive a handfull and miss one or two.

Hi,

I have an issue where I canā€™t control my Xbox Series X (if Iā€™m supposed to at all). I can add the console through auto-discovery, but none of the buttons does anything. Iā€™ve tried adding the refresh token to the app settings, but it looks like it never saves. I paste the token and press save, and everything seems fine. But when I re-enter the app settings, I get an error message saying:

Error: null is not an object (evaluation ā€˜authorizeElement.addEventListenerā€™)

That message also pops up when opening the app settings without having added a token. So it really looks like I canā€™t save the token. Am I doing something wrong? Iā€™m pasting everything between &refresh_token= and &user_id=. This is what the URL looks like after https://login.live.com/ where the bold letters is what Iā€™ve tried using as the refresh token (Iā€™ve changed all id numbers to ā€œxxxxā€ for privacy):

oauth20_desktop.srf?lc=xxxx#access_token=xxxx&token_type=bearer&expires_in=86400&scope=service::user.auth.xboxlive.com::MBI_SSL&refresh_token=xxxx&user_id=xxxx

Dus you enable the xbox remote apps/assistant feature on the console itself?

Yes, thatā€™s enabled :smiley:

what client are you using to set it up? The mobile app or the web client?

I did just use the web client, but I also tried with the mobile app (both Android and iOS) now without luck.

Hi!

Have you had the chance to check on this? I have the same error as Rudi_Henrix in Post #19 October 1st 2023.

@Rudi_Hendrix how did you solve it?

Not yet i am afraid.
Live is keeping me busy. But ii did made it to the top spot on my Homey list by now. So next gap that i can find i will look into this one.

Turned out some changes to the network had occurred. So I connected the XBox again (most likely using a different IP address) and everything was working again. Must say, I donā€™t check the app often. I just use it to shut down the XBox when my son forgets it again.

I have exactly the same issue;
Error: Cannot read properties of null (reading ā€˜addEventListenerā€™)

Also tried reinstalling the app, but it did not resolve the issue. I have the error on the web and mobile client. I am not able to save the token.

Hi all, I just published a minor update to fix the above issues with the settings page.
It now also shows if there is something stored in the key. So I hope it provides a bit more feedback and properly saves the token again.

1 Like