Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
openwebif DocumentationRelease 3.2.7
Finbarr Brady
Jan 05, 2021
Contents:
1 openwebifpy 11.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Installation 32.1 Stable release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 From sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Usage 5
4 Contributing 74.1 Types of Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.2 Get Started! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.3 Pull Request Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.4 Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.5 Deploying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5 History 115.1 1.0.4 (2019-03-01) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.2 1.0.5 (2019-03-01) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.3 1.0.6 (2019-03-04) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.4 1.0.7 (2019-03-04) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.5 1.0.8 (2019-03-04) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.6 1.0.9 (2019-03-04) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115.7 1.1.0 (2019-03-04) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.8 1.1.1 (2019-03-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.9 1.1.2 (2019-03-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.10 1.1.3 (2019-03-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.11 1.1.4 (2019-03-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.12 1.1.5 (2019-03-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.13 1.1.6 (2019-03-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.14 1.1.7 (2019-03-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.15 1.1.8 (2019-03-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.16 1.1.9 (2019-03-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.17 1.2.0 (2019-03-06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.18 1.2.1 (2019-03-06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.19 1.2.2 (2019-03-06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
i
5.20 1.2.3 (2019-03-06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.21 1.2.4 (2019-03-06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.22 1.2.5 (2019-03-06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.23 1.2.6 (2019-03-06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.24 1.2.7 (2019-03-08) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135.25 2.0.0 (2019-03-17) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.26 2.0.1 (2019-03-17) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.27 3.0.0 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.28 3.0.1 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.29 3.0.2 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.30 3.0.3 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.31 3.0.4 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.32 3.0.5 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.33 3.0.6 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145.34 3.0.7 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.35 3.0.8 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.36 3.0.9 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.37 3.1.0 (2019-03-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.38 3.1.1 (2019-04-08) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.39 3.1.2 (2020-12-08) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.40 3.1.3 (2020-12-08) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.41 3.1.6 (2020-12-09) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.42 3.2.0 (2020-12-12) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.43 3.2.7 (2021-01-05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6 Indices and tables 17
ii
CHAPTER 1
openwebifpy
Provides a python interface to interact with a device running OpenWebIf
• Free software: MIT license
• Documentation: https://openwebifpy.readthedocs.io.
• OpenWebif API docs: https://github.com/E2OpenPlugins/e2openplugin-OpenWebif/wiki/OpenWebif-API-documentation
1.1 Features
• Basic control of an Enigma2 box running OpenWebif.
• Ability to send messages to the screen.
1.2 Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
1
openwebif Documentation, Release 3.2.7
2 Chapter 1. openwebifpy
CHAPTER 2
Installation
2.1 Stable release
To install openwebifpy, run this command in your terminal:
$ pip install openwebifpy
This is the preferred method to install openwebifpy, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
2.2 From sources
The sources for openwebifpy can be downloaded from the Github repo.
You can either clone the public repository:
$ git clone git://github.com/fbradyirl/openwebifpy
Or download the tarball:
$ curl -OL https://github.com/fbradyirl/openwebifpy/tarball/master
Once you have a copy of the source, you can install it with:
$ python setup.py install
3
openwebif Documentation, Release 3.2.7
4 Chapter 2. Installation
CHAPTER 3
Usage
To use openwebifpy in a project:
import openwebif.apiclient = openwebif.api.CreateDevice('vuduo2.local')sources = client.get_bouquet_sources()picon_url = client.get_current_playing_picon_url()client.toggle_standby()client.toggle_play_pause()client.set_channel_up()
5
openwebif Documentation, Release 3.2.7
6 Chapter 3. Usage
CHAPTER 4
Contributing
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
4.1 Types of Contributions
4.1.1 Report Bugs
Report bugs at https://github.com/fbradyirl/openwebifpy/issues.
If you are reporting a bug, please include:
• Your operating system name and version.
• Any details about your local setup that might be helpful in troubleshooting.
• Detailed steps to reproduce the bug.
4.1.2 Fix Bugs
Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wantsto implement it.
4.1.3 Implement Features
Look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open towhoever wants to implement it.
7
openwebif Documentation, Release 3.2.7
4.1.4 Write Documentation
openwebifpy could always use more documentation, whether as part of the official openwebifpy docs, in docstrings,or even on the web in blog posts, articles, and such.
4.1.5 Submit Feedback
The best way to send feedback is to file an issue at https://github.com/fbradyirl/openwebifpy/issues.
If you are proposing a feature:
• Explain in detail how it would work.
• Keep the scope as narrow as possible, to make it easier to implement.
• Remember that this is a volunteer-driven project, and that contributions are welcome :)
4.2 Get Started!
Ready to contribute? Here’s how to set up openwebifpy for local development.
1. Fork the openwebifpy repo on GitHub.
2. Clone your fork locally:
$ git clone [email protected]:your_name_here/openwebifpy.git
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set upyour fork for local development:
$ mkvirtualenv openwebifpy$ cd openwebifpy/$ python setup.py develop
4. Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
5. When you’re done making changes, check that your changes pass flake8 and the tests, including testing otherPython versions with tox:
$ flake8 openwebifpy tests$ python setup.py test or py.test$ tox
To get flake8 and tox, just pip install them into your virtualenv.
6. Commit your changes and push your branch to GitHub:
$ git add .$ git commit -m "Your detailed description of your changes."$ git push origin name-of-your-bugfix-or-feature
7. Submit a pull request through the GitHub website.
8 Chapter 4. Contributing
openwebif Documentation, Release 3.2.7
4.3 Pull Request Guidelines
Before you submit a pull request, check that it meets these guidelines:
1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a functionwith a docstring, and add the feature to the list in README.rst.
3. The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check https://travis-ci.org/fbradyirl/openwebifpy/pull_requests and make sure that the tests pass for all supported Python versions.
4.4 Tips
To run a subset of tests:
$ python -m unittest tests.test_openwebifpy
4.5 Deploying
A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry inHISTORY.rst). Then run:
$ bumpversion patch # possible: major / minor / patch$ git push$ git push --tags
Travis will then deploy to PyPI if tests pass.
4.3. Pull Request Guidelines 9
openwebif Documentation, Release 3.2.7
10 Chapter 4. Contributing
CHAPTER 5
History
5.1 1.0.4 (2019-03-01)
• Move to new repo.
5.2 1.0.5 (2019-03-01)
• First travis deploy
5.3 1.0.6 (2019-03-04)
• added get_bouquet_sources
5.4 1.0.7 (2019-03-04)
• Load src on startup + add select source
5.5 1.0.8 (2019-03-04)
• Fix tox
5.6 1.0.9 (2019-03-04)
• Retry deploy
11
openwebif Documentation, Release 3.2.7
5.7 1.1.0 (2019-03-04)
• Return screenshot URL if no picon
5.8 1.1.1 (2019-03-05)
• Return screenshot URL if recording playback
5.9 1.1.2 (2019-03-05)
• Fix bug
5.10 1.1.3 (2019-03-05)
• adding parse channel name from recording for picon.
5.11 1.1.4 (2019-03-05)
• Fix channel name in status info on recording playback
5.12 1.1.5 (2019-03-05)
• Adding send stop command
5.13 1.1.6 (2019-03-05)
• Debug all the logs
5.14 1.1.7 (2019-03-05)
• bug fix
5.15 1.1.8 (2019-03-05)
• Randomise the picon url so image doesnt get cached.
12 Chapter 5. History
openwebif Documentation, Release 3.2.7
5.16 1.1.9 (2019-03-05)
• Docs update
5.17 1.2.0 (2019-03-06)
• adding prefer_picon parameter
5.18 1.2.1 (2019-03-06)
• Tidy up api class
5.19 1.2.2 (2019-03-06)
• Bug fix with sources
5.20 1.2.3 (2019-03-06)
• Bug fix
5.21 1.2.4 (2019-03-06)
• Bug fix
5.22 1.2.5 (2019-03-06)
• Make build faster
5.23 1.2.6 (2019-03-06)
• Default all
5.24 1.2.7 (2019-03-08)
• Check in_standby state before going into or out of standby
5.16. 1.1.9 (2019-03-05) 13
openwebif Documentation, Release 3.2.7
5.25 2.0.0 (2019-03-17)
• Fixing up tox to include pylint
• Fixes for same
• Adding zeroconf discovery for e2 boxes.
5.26 2.0.1 (2019-03-17)
• No change.
5.27 3.0.0 (2019-03-24)
• Adding deep standby feature.
• If in deep standby, dont throw exceptions on every update()
5.28 3.0.1 (2019-03-24)
• Allow pass in source_bouquet
5.29 3.0.2 (2019-03-24)
• Fix tox
5.30 3.0.3 (2019-03-24)
• Catch connection error on deep standby
5.31 3.0.4 (2019-03-24)
• Unpin all reqs
5.32 3.0.5 (2019-03-24)
• Fix bug
5.33 3.0.6 (2019-03-24)
• Handle deep standby
14 Chapter 5. History
openwebif Documentation, Release 3.2.7
5.34 3.0.7 (2019-03-24)
• Fix offline reset
5.35 3.0.8 (2019-03-24)
• Handle getversion on host down
5.36 3.0.9 (2019-03-24)
• Remove I/O from init
5.37 3.1.0 (2019-03-24)
• Add back get_version to init
5.38 3.1.1 (2019-04-08)
• Handle bad connection to fetch bouquets
5.39 3.1.2 (2020-12-08)
• Switch pipeline to Github actions
5.40 3.1.3 (2020-12-08)
• Fix selecting channel source. Works for IPTV channels now also.
5.41 3.1.6 (2020-12-09)
• Fix for issues/14
5.42 3.2.0 (2020-12-12)
• Fix for issues/12
5.34. 3.0.7 (2019-03-24) 15
openwebif Documentation, Release 3.2.7
5.43 3.2.7 (2021-01-05)
• Only use a single session per device
• Log error on connection error.
16 Chapter 5. History
CHAPTER 6
Indices and tables
• genindex
• modindex
• search
17