hunterjm / hassio-addons

Control your Xbox One from your Home Assistant device.
MIT License
55 stars 50 forks source link

Add-on can't connect to my device #27

Closed mixpix405 closed 5 years ago

mixpix405 commented 5 years ago

The add-on installs fine, the setup and authentication process goes smoothly, but the add-on still doesn't seem to be able to connect to my xbox. The log is flooded with the following - 3 DEBUG lines every 5 seconds:

[2019-02-09 22:16:51,026] DEBUG in protocol: Sending ConnectRequest to 10.0.0.10
[2019-02-09 22:16:51,036] DEBUG in protocol: Sending ConnectRequest to 10.0.0.10
[2019-02-09 22:16:51,042] DEBUG in protocol: Sending ConnectRequest to 10.0.0.10
[2019-02-09 22:16:56,056] DEBUG in protocol: Sending ConnectRequest to 10.0.0.10
[2019-02-09 22:16:56,064] DEBUG in protocol: Sending ConnectRequest to 10.0.0.10
[2019-02-09 22:16:56,070] DEBUG in protocol: Sending ConnectRequest to 10.0.0.10
[2019-02-09 22:17:01,083] DEBUG in protocol: Sending ConnectRequest to 10.0.0.10
[2019-02-09 22:17:01,093] DEBUG in protocol: Sending ConnectRequest to 10.0.0.10
[2019-02-09 22:17:01,099] DEBUG in protocol: Sending ConnectRequest to 10.0.0.10

In addition, any endpoints I try to hit, for example, [hassio_ip]:5557/device/[liveid]/poweroff retrurns:

// 20190209222724
// http://10.0.0.7:5557/device/FD************55/poweroff

{
  "message": "Console FD************55 is not connected",
  "success": false
}

(I've redacted my LiveID from the above code - I don't know if that should be secure information or not. Better safe than sorry)

damianromanowski commented 5 years ago

{"message":"Console is not connected","success":false}

That's what I get for /poweroff. /poweron, works, however.

mixpix405 commented 5 years ago

Unfortunately, I get that for /poweron as well. And many other endpoints.

unknownskl commented 5 years ago

What happens if you call /device/[liveid]/connect? If this call is succeeds, you should be able to call /device/[liveid]/poweroff to turn off the xbox

damianromanowski commented 5 years ago

I got mine working by editing the required version to 0.9.8 in order to match the installed xbox-smartglass-rest module.

https://github.com/hunterjm/hassio-addons/blob/a3d6fe01683cd78cbbc53a759a929237f60fb3fb/xboxone/xboxone.py#L36

mixpix405 commented 5 years ago

I disabled the add-on since I had the issue, and re-enabled it and re-configured it after the 2.0.0 update. Everything is working as expected now. I don't know if I had some sort of configuration error before, or if there was a bug - but at any rate, it's working now, so I'll close this issue.