Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/photonios/py-sony-bravia-remote
Python package for remotely controlling Sony Bravia TV's.
https://github.com/photonios/py-sony-bravia-remote
api bravia python remote-control sony sony-bravia-tv
Last synced: 3 days ago
JSON representation
Python package for remotely controlling Sony Bravia TV's.
- Host: GitHub
- URL: https://github.com/photonios/py-sony-bravia-remote
- Owner: Photonios
- License: mit
- Created: 2016-12-26T14:59:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-03T20:41:18.000Z (almost 7 years ago)
- Last Synced: 2024-10-11T02:19:11.893Z (about 1 month ago)
- Topics: api, bravia, python, remote-control, sony, sony-bravia-tv
- Language: Python
- Size: 9.77 KB
- Stars: 20
- Watchers: 5
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.md
Awesome Lists containing this project
README
.. image:: https://scrutinizer-ci.com/g/Photonios/py-sony-bravia-remote/badges/build.png
:target: https://scrutinizer-ci.com/g/SectorLabs/py-sony-bravia-remote/.. image:: https://scrutinizer-ci.com/g/Photonios/py-sony-bravia-remote/badges/quality-score.png
:target: https://scrutinizer-ci.com/g/SectorLabs/py-sony-bravia-remote/.. image:: https://img.shields.io/:license-mit-blue.svg
:target: http://doge.mit-license.org.. image:: https://badge.fury.io/py/py-sony-bravia-remote.svg
:target: https://pypi.python.org/pypi/py-sony-bravia-remote``py-sony-bravia-remote`` is a Python 3 library for interfacing remotely with Sony Bravia TV's. It utilizes a undocumented HTTP
API that the TV exposes. This allows you to control things like changing the volume, channel or turn the TV on and off.This API is the exact same API that the "Sony Remote" app uses to control the TV.
Installation
------------
For inclusion in another project, install through `pip`:.. code-block:: bash
pip install py-sony-bravia-remote
Example usage
-------------.. code-block:: python
from sonybraviaremote import TV, TVConfig
# called the very first time you attempt to connect to your
# tv... the tv will display a pincode that you need to enter
# after the first connection attempt, you'll never have to do this again
def on_auth():
return input('Pincode: ')# ip address of your tv... the device name is the name under which
# your program will be registered... note that if you change the device
# name, you have to re-auth
config = TVConfig('192.168.0.23', 'my device name')
tv = TV.connect(config, on_auth)tv.is_on() # true/false
tv.wake_up()
tv.power_off()
tv.netflix()
tv.home()
tv.enter()
tv.confirm()
tv.pause()
tv.play()
tv.confirm()
tv.mute()
tv.volume_up()
tv.volume_down()