bwarden has also got a git repo for the python control of the roku which is a fork of https://github.com/jcarbaugh/python-roku. It seems to support basic control and discovery. The discovery code is SSDP which may prove useful elsewhere.
For openhab integration there is a good forum discussion