seydx / homebridge-bravia-tvos

Homebridge plugin for Sony Bravia Android TVs
MIT License
345 stars 32 forks source link

Volume control from remote widget #162

Closed anhtuanng98 closed 3 years ago

anhtuanng98 commented 3 years ago

I have config volume up remote widge in ios with volume up of my Bravia but when I push volume in my remote, there are some errors issue.

[9/16/2021, 9:13:46 AM] [BraviaTVOS] Error: power state is not STANDBY
at exports.request (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/request.js:80:21) 
at runMicrotasks (<anonymous>)  
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at ServiceProtocol.invoke (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/service.js:89:12)
at /usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/bravia.js:399:11 {
title: 'Invalid Response',  
code: 15,  
soap: {},  
url: 'http://192.168.1.66/sony/system'

My config


{
            "name": "BraviaTVOS",  
            "platform": "BraviaOSPlatform",  
            "debug": true,
            "warn": true,
            "error": true,
            "extendedError": true,
            "tvs": [
                {
                    "active": true,
                    "name": "Sony",
                    "ip": "192.168.1.66",
                    "port": 80,
                    "appName": "@seydx/bravia",
                    "manufacturer": "Sony",
                    "model": "Bravia",
                    "serialNumber": "00000000",
                    "refreshInputs": false,
                    "wol": false,
                    "polling": 10,
                    "sheduledRefresh": 12,
                    "apps": [
                        {
                            "name": "Netflix",
                            "identifier": "Netflix"
                        },
                        {
                            "name": "Youtube",
                            "identifier": "YouTube"
                        }
                    ],
                    "channels": [
                        {
                            "name": "VTV1",
                            "channel": 1,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTV2",
                            "channel": 2,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTV3",
                            "channel": 3,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTV4",
                            "channel": 4,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTV5",
                            "channel": 5,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTV6",
                            "channel": 6,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTV7",
                            "channel": 7,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTV8",
                            "channel": 8,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTV9",
                            "channel": 9,
                            "source": "dvbt"
                        },
                        {
                            "name": "ANTV",
                            "channel": 10,
                            "source": "dvbt"
                        },
                        {
                            "name": "Quốc Hội",
                            "channel": 11,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC6",
                            "channel": 12,
                            "source": "dvbt"
                        },
                        {
                            "name": "Hanoi 1",
                            "channel": 13,
                            "source": "dvbt"
                        },
                        {
                            "name": "Hanoi 2",
                            "channel": 14,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC1",
                            "channel": 30,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC3",
                            "channel": 31,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC7",
                            "channel": 32,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC8",
                            "channel": 33,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC9",
                            "channel": 34,
                            "source": "dvbt"
                        },
                        {
                            "name": "10",
                            "channel": 35,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC12",
                            "channel": 36,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC14",
                            "channel": 37,
                            "source": "dvbt"
                        },
                        {
                            "name": "HTV7",
                            "channel": 38,
                            "source": "dvbt"
                        },
                        {
                            "name": "HTV9",
                            "channel": 39,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC13",
                            "channel": 42,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC2",
                            "channel": 45,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC4",
                            "channel": 46,
                            "source": "dvbt"
                        },
                        {
                            "name": "VTC5",
                            "channel": 47,
                            "source": "dvbt"
                        },
                        {
                            "name": "VOVTV",
                            "channel": 25,
                            "source": "dvbt"
                        },
                        {
                            "name": "TTXVN",
                            "channel": 16,
                            "source": "dvbt"
                        },
                        {
                            "name": "Hải Phòng",
                            "channel": 15,
                            "source": "dvbt"
                        },
                        {
                            "name": "QPVN",
                            "channel": 26,
                            "source": "dvbt"
                        }
                    ],
                    "displayOrder": [
                        "channels",
                        "inputs",
                        "apps",
                        "commands",
                        "macros"
                    ],
                    "speaker": {
                        "active": false,
                        "output": "headphone",
                        "increaseBy": 1,
                        "reduceBy": 1,
                        "accType": "lightbulb"
                    },
                    "remote": [
                        {
                            "command": "VolumeUp",
                            "target": "VOLUME_UP"
                        },
                        {
                            "command": "VolumeDown",
                            "target": "VOLUME_DOWN"
                        },
                        {
                            "command": "Up",
                            "target": "ARROW_UP"
                        },
                        {
                            "command": "Down",
                            "target": "ARROW_DOWN"
                        },
                        {
                            "command": "Right",
                            "target": "ARROW_RIGHT"
                        },
                        {
                            "command": "Left",
                            "target": "ARROW_LEFT"
                        },
                        {
                            "command": "Pause",
                            "target": "PAUSE"
                        },
                        {
                            "command": "Play",
                            "target": "PLAY"
                        },
                        {
                            "command": "Return",
                            "target": "EXIT"
                        },
                        {
                            "command": "Display",
                            "target": "INFORMATION"
                        },
                        {
                            "command": "Confirm",
                            "target": "SELECT"
                        }
                    ],
                    "commands": [],
                    "macros": []
                }
            ]
        }
`
seydx commented 3 years ago

Hey, it seems that your TV is not in standby mode (which is required to perform API calls). Can you put the MAC address in your config.json pls and try again

See: https://github.com/SeydX/homebridge-bravia-tvos/blob/1463d6d2810510b49cd4ba3c64b6e2da890ab05c/example-config.json#L22

anhtuanng98 commented 3 years ago

Hey, it seems that your TV is not in standby mode (which is required to perform API calls). Can you put the MAC address in your config.json pls and try again

See:

https://github.com/SeydX/homebridge-bravia-tvos/blob/1463d6d2810510b49cd4ba3c64b6e2da890ab05c/example-config.json#L22


[9/20/2021, 9:57:57 AM] [BraviaTVOS] Sony: Increasing volume by +1
[9/20/2021, 9:57:58 AM] [BraviaTVOS] Sony: An error occured during setting volume (selctor)!
[9/20/2021, 9:57:58 AM] [BraviaTVOS] Error: target not supported
    at exports.request (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/request.js:80:21)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at ServiceProtocol.invoke (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/service.js:89:12)
    at Handler.setVolumeSelector (/usr/lib/node_modules/homebridge-bravia-tvos/src/accessories/accessory.handler.js:442:7) {
  title: 'Invalid Response',
  code: 40800,
  soap: {},
  url: 'http://192.168.1.66/sony/audio'

Another issue :( I have put the MAC in config.json. This MAC is correct (I have checked in router and TV settings).

seydx commented 3 years ago

v5.0.2 should fix this issue

anhtuanng98 commented 3 years ago

Sorry for the bad news. This issue still here with us :(

[9/20/2021, 8:57:24 PM] [BraviaTVOS] Sony: Increasing volume by +1 (speaker)
[9/20/2021, 8:57:24 PM] [BraviaTVOS] Sony: An error occured during setting volume (selctor)!
[9/20/2021, 8:57:24 PM] [BraviaTVOS] Error: target not supported
    at exports.request (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/request.js:80:21)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at ServiceProtocol.invoke (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/service.js:89:12)
    at Handler.setVolumeSelector (/usr/lib/node_modules/homebridge-bravia-tvos/src/accessories/accessory.handler.js:500:7) {
  title: 'Invalid Response',
  code: 40800,
  soap: {},
  data: {
    id: 1,
    method: 'setAudioVolume',
    version: '1.0',
    params: [ [Object] ]
  },
  url: 'http://192.168.1.66/sony/audio'

I used this plugin and it can control volume by remote widget in ios but this plugin randomly disappear channel https://github.com/normen/homebridge-bravia#readme

seydx commented 3 years ago

@anhtuanng98

[9/20/2021, 8:57:24 PM] [BraviaTVOS] Sony: Increasing volume by +1 (speaker)

can u change output to "headphone" in your config.json and try again pls

anhtuanng98 commented 3 years ago

@SeydX Headphone

[9/20/2021, 9:21:22 PM] [BraviaTVOS] Sony: An error occured during setting volume (selctor)!
[9/20/2021, 9:21:22 PM] [BraviaTVOS] Error: target not supported
    at exports.request (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/request.js:80:21)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at ServiceProtocol.invoke (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/service.js:89:12)
    at Handler.setVolumeSelector (/usr/lib/node_modules/homebridge-bravia-tvos/src/accessories/accessory.handler.js:500:7) {
  title: 'Invalid Response',
  code: 40800,
  soap: {},
  data: {
    id: 1,
    method: 'setAudioVolume',
    version: '1.0',
    params: [ [Object] ]
  },
  url: 'http://192.168.1.66/sony/audio'
}

Other

[9/20/2021, 9:23:54 PM] [BraviaTVOS] Sony: Increasing volume by +1 (speaker)
[9/20/2021, 9:23:54 PM] [BraviaTVOS] Sony: An error occured during setting volume (selctor)!
[9/20/2021, 9:23:54 PM] [BraviaTVOS] Error: target not supported
    at exports.request (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/request.js:80:21)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at ServiceProtocol.invoke (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/service.js:89:12)
    at Handler.setVolumeSelector (/usr/lib/node_modules/homebridge-bravia-tvos/src/accessories/accessory.handler.js:500:7) {
  title: 'Invalid Response',
  code: 40800,
  soap: {},
  data: {
    id: 1,
    method: 'setAudioVolume',
    version: '1.0',
    params: [ [Object] ]
  },
  url: 'http://192.168.1.66/sony/audio'
}
seydx commented 3 years ago

v5.0.3 is online

anhtuanng98 commented 3 years ago

v5.0.3 log

[9/21/2021, 7:56:58 PM] [BraviaTVOS] Sony: Increasing volume by 1 (speaker)
[9/21/2021, 7:56:58 PM] [BraviaTVOS] [DEBUG] Sony: Execute Command: VolumeUp
[9/21/2021, 7:56:58 PM] [BraviaTVOS] Sony: An error occured during setting volume (selector)!
[9/21/2021, 7:56:58 PM] [BraviaTVOS] Error: Not Found
    at exports.request (/usr/lib/node_modules/homebridge-bravia-tvos/node_modules/@seydx/bravia/lib/request.js:80:21)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  title: 'Invalid Response',
  code: 404,
  soap: {},
  payload: {
    id: undefined,
    version: undefined,
    method: undefined,
    params: '[]'
  },
  url: 'http://192.168.1.66/sony/ircc'
}

What I can do?

seydx commented 3 years ago

Do the other remote buttons like up, down etc. work?