Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lingster/pyrokuserve
Sanic based web server to control your home roku device
https://github.com/lingster/pyrokuserve
Last synced: about 2 months ago
JSON representation
Sanic based web server to control your home roku device
- Host: GitHub
- URL: https://github.com/lingster/pyrokuserve
- Owner: lingster
- License: mit
- Created: 2018-12-08T21:15:25.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T01:30:46.000Z (about 2 years ago)
- Last Synced: 2024-11-03T03:27:14.669Z (2 months ago)
- Language: Python
- Size: 147 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyrokuserve
[Sanic](https://github.com/huge-success/sanic) based web server to control your home roku device, based on the api: [python-roku](https://github.com/jcarbaugh/python-roku).## Setup
use pipenv to install dependencies:
```bash
pipenv install
```
then either
```bash
pipenv run pyrokuserve.py
```
or
```bash
pipenv shell
python pyrokuserve.py
```This will startup the sanic web server on default port 8000.
you can then send rest requests like:
|URL|Description|
|---|-----------|
|http://localhost:8000/device/list/ | returns list of roku devices |
|http://localhost:8000/device//apps/list/ | specify the roku device(from the previous call) and this will return you list of available channels on that device|
|http://localhost:8000/device//commandlist/ | returns list of commands to run against the device |
|http://localhost:8000/device/1/command// | execute the command, eg home will send roku to the home page |Swagger documentation is available here:
http://localhost:8000/swaggerThere are some very simple pytests in here.
Notes:
Firewalld - if you are using firewalld, then you will need to open up traffic for incoming requests to port 1900 as well as outgoing requests. Following example services to be opened up:upnp-client.xml
UPnP Client
Universal Plug and Play client for auto-configuration of network routers (use only in trusted zones).
upnp.xml
UPNP
Simple Service Discovery Protocol
See: https://github.com/firewalld/firewalld/issues/25
and
https://github.com/firewalld/firewalld/issues/260