hunterjm / hassio-addons

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

Running without Hass.io #10

Closed eavanvalkenburg closed 5 years ago

eavanvalkenburg commented 5 years ago

Hi Jason, I was working on building something directly in HA for my xbox one, and ran into this version, but since I don't run hass.io but just run HA directly on Linux I was wondering what the restfull server is doing in between HA and the Xbox and if we need that, what exactly does that thing do?

hunterjm commented 5 years ago

The smart glass library is written using gevent, and the protocol is very chatty. I tried integrating directly in HA initially, but the gevent loop kept getting starved. You can try to re-write the protocol using asyncio, but that was more effort than it was worth, so we wrapped it behind a stand-alone server. The FireTV component does something very similar.

You can still pip install xbox-rest-server on your Linux server and run it separately, then just copy the component here for everything to work. This addon just makes it easy for Hass.io.