Closed Garulf closed 4 years ago
Had to pipe stdout to stderr to get anything meaningful from log.
[12/30/2019, 6:57:37 PM] [CMD Switch] Failed to turn off Xbox One
[12/30/2019, 6:57:37 PM] [CMD Switch] INFO:authentication:Loaded token <class 'xbox.webapi.authentication.token.AccessToken'> from file INFO:authentication:Loaded token <class 'xbox.webapi.authentication.token.RefreshToken'> from file INFO:authentication:Loaded token <class 'xbox.webapi.authentication.token.UserToken'> from file INFO:authentication:Loaded token <class 'xbox.webapi.authentication.token.XSTSToken'> from file
Failed to authenticate with provided tokens, Error: [Errno 13] Permission denied: '/root/.local/share/xbox/tokens.json'
Please re-run xbox-authenticate to get a fresh set
Simply made a copy, changed permissions and changed command to:
"off_cmd": "/usr/bin/xbox-poweroff -t '~/tokens.json' --liveid 'FD00B7497FDFD20A' 1>&2",
I'm currently using the python package: https://github.com/OpenXbox/xbox-smartglass-core-python to control my xbox one.
While the off command runs as it should in manual testing, homebridge fails.
Config:
Log:
[12/30/2019, 10:24:14 AM] [CMD Switch] Failed to turn off Xbox One
[12/30/2019, 10:24:14 AM] [CMD Switch] INFO:authentication:Loaded token <class 'xbox.webapi.authentication.token.AccessToken'> from file INFO:authentication:Loaded token <class 'xbox.webapi.authentication.token.RefreshToken'> from file INFO:authentication:Loaded token <class 'xbox.webapi.authentication.token.UserToken'> from file INFO:authentication:Loaded token <class 'xbox.webapi.authentication.token.XSTSToken'> from file
I'm at a loss as to what could be the issue, as the command works fine when run manually.