Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: seydx/bravia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Utensil-Drawer/bravia-kdl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Jul 23, 2022

  1. Fix IIRC endpoint name

    JakuJ committed Jul 23, 2022
    Copy the full SHA
    1da6a76 View commit details
  2. Update docs

    JakuJ committed Jul 23, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    40a7dec View commit details
  3. Fix typo

    JakuJ committed Jul 23, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    travisn Travis Nielsen
    Copy the full SHA
    bd70e1c View commit details
Showing with 3,776 additions and 21 deletions.
  1. +2 −0 README.md
  2. +3 −3 lib/bravia.js
  3. +3,766 −13 package-lock.json
  4. +5 −5 package.json
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Sony BRAVIA

**This is a fork of [@seydx/bravia](https://github.com/seydx/bravia) with the IRCC endpoint changed from `/sony/ircc` to `/sony/IRCC`. This fixes IIRC requests on older Sony Bravia TVs.**

Node.js module for discovering and controlling Sony BRAVIA Android TVs. This module allows you retrieve all the available service protocol API methods and invoke any of them. All methods return a [Promise](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise).

## Setup
6 changes: 3 additions & 3 deletions lib/bravia.js
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ class Bravia {
(service) => service.serviceType[0] === SSDP_SERVICE_TYPE
);

const deviceUrl = new URL(service.controlURL[0].split('/ircc')[0]);
const deviceUrl = new URL(service.controlURL[0].split('/IRCC')[0]);

if (!discovered.some((device) => device.host === deviceUrl.host)) {
debug(`Found new device: ${device.friendlyName[0]} (${deviceUrl.host})`);
@@ -370,15 +370,15 @@ class Bravia {
payload: {
code: codes,
},
url: `${this.url}/ircc`,
url: `${this.url}/IRCC`,
});

throw error;
}

debug(`Send ircc command: ${irccCode.name} (${irccCode.value})`);

await request(`${this.url}/ircc`, this.credentials, {
await request(`${this.url}/IRCC`, this.credentials, {
xml: `<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
Loading