remove modified pybravia

This commit is contained in:
Hartmut Bauer committed 2026-06-15 23:35:06 +02:00
1 parent f8971c4821
commit 48d707ec0c
3 files changed
+40 -7

No files matched your search

+35 -5
View File
@@ -2,14 +2,44 @@
The BRAVIA 8A uses only HTTPS for communication, which makes the Home Assistant integration SonyBravia unusable. This project provides a workaround.
We get the directory ```pybravia``` from https://github.com/Drafteed/pybravia rename it to ```pybravia8``` and modify it to use HTTPS (changes in ```client.py```). The Module ```bravia8``` uses this.
The main script ```bravia8_pyscript.py``` utilizes the HACS custom integration ```pyscript``` (https://github.com/custom-components/pyscript).
## Changelog
```
15.06.2026 - 2.0.0 - Update to latest pyscript version (2.0.1), removed modified pybravia module,
as latest versions (>0.4.0) can handle HTTPS.
2025 - 1.0.0 - Initial release using modified pybravia module
```
## Installation
Install ```pyscript``` following the instructions on the [pyscript GitHub repository](https://github.com/custom-components/pyscript).
```<HA-config>``` ==> ```Volume=/var/containers/vol/hass/config:/config:z```
Copy ```bravia8/``` and ```pybravia8/``` to ```<HA-config>/pyscript/modules/```.
Install ```pyscript``` following the instructions on the [pyscript GitHub repository](https://github.com/custom-components/pyscript):
Copy ```bravia8_pyscript.py``` to ```<HA-config>/pyscript/```.
- From the [latest release](https://github.com/custom-components/pyscript/releases) download the zip file hass-custom-pyscript.zip
- Move the zip file to ```<NFS>/Server/transfer```
- unpack there to ```./pyscript``` (no ```unzip``` on CoreOS)
- ```cd /var/containers/vol/hass/config/custom_components/pyscript```
- ```rm -rf * ._*```
- ```cp -R /srv/nas/Server/transfer/pyscript/* .```
Copy ```bravia8/``` ```<HA-config>/pyscript/modules/```
Copy ```bravia8_pyscript.py``` to ```<HA-config>/pyscript/```
```systemctl --user stop hass-pod && systemctl --user start hass-pod```
## Usage in Home Assistant
In ```scripts.yaml```
```
tv_command_hdmi1:
alias: Sony-TV send_command Hdmi1
sequence:
- service: pyscript.bravia_send_command # -> def bravia_send_command(command)
data:
command: Hdmi1
mode: single
```
+2
View File
@@ -1,2 +1,4 @@
from .remote import BraviaRemote
__VERSION__ = "2.0.0"
+3 -2
View File
@@ -1,12 +1,13 @@
import logging
import ssl
from pybravia8 import BraviaClient, BraviaError
from pybravia import BraviaClient, BraviaError
_LOGGER = logging.getLogger(__name__)
class BraviaRemote:
def __init__(self, host, psk):
self.client = BraviaClient(host)
self.client = BraviaClient(host=host, ssl=True, ssl_verify=False)
self.psk = psk
self.connected = False