seydx / homebridge-bravia-tvos

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

[BETA] Version 3 - Bugfix Thread #32

Closed seydx closed 3 years ago

seydx commented 5 years ago

Hey everyone,

as some of you may know, I am currently working on the v3 of my Bravia plugin. Most of it is already done. Currently I'm looking for beta testers to wipe out the remaining bugs and / or incorporate new requests.

Here you can read how to install the plugin and how to set it:

https://github.com/SeydX/homebridge-bravia-tvos/tree/beta https://github.com/SeydX/homebridge-bravia-tvos/blob/beta/example-config.json

Note: Before you install the new plugin, I recommend you to delete the old plugin and remove it from HomeKit! And also delete the accessories and persist folders.

Then download the new plugin, install it, enter it in config.json, restart Homebridge and there you go!

twocolors commented 5 years ago

@SeydX not , only work if TV power ON, but i can't power ON if TV status power OFF ~ 4 h

seydx commented 5 years ago

@twocolors

but if you got an error if you set wol to false?

twocolors commented 5 years ago

@SeydX yes

seydx commented 5 years ago

Can you post it pls

donavanbecker commented 5 years ago

Having an issue, just reloaded a brand new HomeBridge and This what I’m getting with the beta

Apr 09 08:48:01 HomeBridge homebridge[370]: [2019-4-9 08:48:01] [TV] [ERROR] Sony Bedroom: Error while getting new inputs! Apr 09 08:48:01 HomeBridge homebridge[370]: [2019-4-9 08:48:01] [TV] [ERROR] Sony Bedroom: Please fix the issue and restart homebridge! Apr 09 08:48:01 HomeBridge homebridge[370]: [2019-4-9 08:48:01] [TV] [ERROR] {"config":{"transformRequest":{},"transformResponse":{},"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json","X-Auth-PSK":"*","User-Agent":"axios/0.18.0","Content-Length":62},"method":"post","url":"http://192.16..:80/sony/system","data":"{\"id\":1,\"method\":\"getPowerStatus\",\"version\":\"1.0\",\"params\":[]}"}}

twocolors commented 5 years ago
[4/9/2019, 4:49:05 PM] [BraviaOSPlatform] [INFO] Adding new accessory: TV
[4/9/2019, 4:49:06 PM] [BraviaOSPlatform] [INFO] TV: CEC detected, checking TV state before fetching inputs...
[4/9/2019, 4:49:07 PM] Homebridge is running on port 51826.
[4/9/2019, 4:49:14 PM] [homebridge-config-ui-x] Using Form Authentication
[4/9/2019, 4:49:15 PM] [homebridge-config-ui-x] Console v3.11.0 is listening on port 8090.
[4/9/2019, 4:49:26 PM] [BraviaOSPlatform] [ERROR] TV: Error while getting new inputs!
[4/9/2019, 4:49:26 PM] [BraviaOSPlatform] [ERROR] TV: Please fix the issue and restart homebridge!
[4/9/2019, 4:49:26 PM] [BraviaOSPlatform] [ERROR] {"config":{"transformRequest":{},"transformResponse":{},"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","X-Auth-PSK":"***","User-Agent":"axios/0.18.0","Content-Length":62},"method":"post","url":"http://192.168.0.11:80/sony/system","data":"{\"id\":1,\"method\":\"getPowerStatus\",\"version\":\"1.0\",\"params\":[]}"}}

my error like @d0n4v4nb3ck3r

i test wol = true (add mac to config) / false , all test is error

seydx commented 5 years ago

@twocolors @d0n4v4nb3ck3r

can u reinstall the plugin and try it again pls, should be fixed now

twocolors commented 5 years ago

@SeydX oh ...

[4/9/2019, 5:55:59 PM] [BraviaOSPlatform] [INFO] Adding new accessory: TV
[4/9/2019, 5:56:00 PM] [BraviaOSPlatform] [INFO] TV: CEC detected, checking TV state before fetching inputs...
[4/9/2019, 5:56:00 PM] [BraviaOSPlatform] [WARN] TV: Can not check TV state, because WOL is on!
[4/9/2019, 5:56:00 PM] [BraviaOSPlatform] [INFO] TV: Turning on TV (WOL)
[4/9/2019, 5:56:01 PM] Homebridge is running on port 51826.
[4/9/2019, 5:56:09 PM] [BraviaOSPlatform] [INFO] TV: TV on! Fetching inputs...!
[4/9/2019, 5:56:13 PM] [homebridge-config-ui-x] Using Form Authentication
[4/9/2019, 5:56:13 PM] [BraviaOSPlatform] [ERROR] TV: Error while getting new inputs!
[4/9/2019, 5:56:13 PM] [BraviaOSPlatform] [ERROR] TV: Please fix the issue and restart homebridge!
[4/9/2019, 5:56:13 PM] [BraviaOSPlatform] [ERROR] {}

TV is power ON (send wol, ok) , but get error ):


                {
                    "name": "TV",
                    "ip": "192.168.0.11",
                    "mac": "FC:F1:52:BD:2F:C5",
                    "port": 80,
                    "psk": "***",
                    "extraInputs": true,
                    "cecInputs": true,
                    "channelInputs": ["DVBT","DVBC","ANALOG"],
                    "apps": [],
                    "wol": true
                }
seydx commented 5 years ago

@twocolors

Can you please check if the TV is ‚really‘ on after restarting homebridge?

It seems so that after sending the wol command the tv doesnt turn on

twocolors commented 5 years ago

@SeydX i update plugin when tv not respond to ping, and update plugin. tv is turn on , on command WOL

seydx commented 5 years ago

@twocolors

So the tv is really turning on after restarting homebridge?

twocolors commented 5 years ago

@SeydX yes, tv is really turning on after restarting homebridge

seydx commented 5 years ago

@twocolors

pushed new update, can you pls reinstall and try it again

twocolors commented 5 years ago

@SeydX

[4/9/2019, 10:10:06 PM] [BraviaOSPlatform] [INFO] Adding new accessory: TV
[4/9/2019, 10:10:07 PM] [BraviaOSPlatform] [INFO] TV: CEC detected, checking TV state before fetching inputs...
[4/9/2019, 10:10:07 PM] [BraviaOSPlatform] [WARN] TV: Can not check TV state, because WOL is on!
[4/9/2019, 10:10:07 PM] [BraviaOSPlatform] [INFO] TV: Turning on TV (WOL)
[4/9/2019, 10:10:08 PM] Homebridge is running on port 51826.
[4/9/2019, 10:10:08 PM] [BraviaOSPlatform] [INFO] TV: Wait 14s before fetching inputs..
[4/9/2019, 10:10:22 PM] [homebridge-config-ui-x] Using Form Authentication
[4/9/2019, 10:10:22 PM] [BraviaOSPlatform] [INFO] TV: TV on! Fetching inputs...!
[4/9/2019, 10:10:23 PM] [homebridge-config-ui-x] Console v3.11.0 is listening on port 8090.
[4/9/2019, 10:10:23 PM] [BraviaOSPlatform] [ERROR] TV: Error while getting new inputs!
[4/9/2019, 10:10:23 PM] [BraviaOSPlatform] [ERROR] TV: Please fix the issue and restart homebridge!
TypeError: inputs.map is not a function
    at BraviaPlatform.handleInputs (/homebridge/node_modules/homebridge-bravia-tvos/src/accessory.js:155:14)
    at process._tickCallback (internal/process/next_tick.js:68:7)
seydx commented 5 years ago

@twocolors

can you TURN OFF the tv and post the output from following command pls

curl http://YOURIPHERE/sony/system --header 'x-auth-psk: YOURPSKHERE' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}'

and than, TURN ON the tv and post the output from following commands pls

curl http://YOURIPHERE/sony/system --header 'x-auth-psk: YOURPSKHERE' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}'

curl http://YOURIPHERE/sony/avContent --header 'x-auth-psk: YOURPSKHERE' --data '{"id":3,"method":"getCurrentExternalInputsStatus","version":"1.0","params":[]}'

twocolors commented 5 years ago

TURN OFF

$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}'
{"id":3,"result":[{"status":"standby"}]}

TURN ON

$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}'
curl: (7) Failed to connect to tv port 80: Connection refused
$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}'
{"error":[404,"Not Found"]}
$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}'
{"id":3,"result":[{"status":"active"}]}
$ curl http://tv/sony/avContent --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getCurrentExternalInputsStatus","version":"1.0","params":[]}'
{"id":3,"result":[[{"connection":false,"icon":"meta:hdmi","label":"","title":"HDMI 1/MHL","uri":"extInput:hdmi?port=1"},{"connection":false,"icon":"meta:hdmi","label":"","title":"HDMI 2","uri":"extInput:hdmi?port=2"},{"connection":false,"icon":"meta:hdmi","label":"","title":"HDMI 3","uri":"extInput:hdmi?port=3"},{"connection":false,"icon":"meta:hdmi","label":"","title":"HDMI 4","uri":"extInput:hdmi?port=4"},{"connection":false,"icon":"meta:scart","label":"","title":"AV1","uri":"extInput:scart?port=1"},{"connection":false,"icon":"meta:component","label":"","title":"AV2/Component","uri":"extInput:composite?port=1"},{"connection":true,"icon":"meta:playbackdevice","label":"Mbox","title":"Плейер 1","uri":"extInput:cec?type=player&port=1"},{"connection":false,"icon":"meta:wifidisplay","label":"","title":"Дублирование экрана","uri":"extInput:widi?port=1"}]]}
seydx commented 5 years ago

@twocolors

why you got a response after 3. try from getPowerStatus?

twocolors commented 5 years ago

@SeydX yes, i try 3 req when get OK answer

seydx commented 5 years ago

is your tv connected over wifi? @twocolors

twocolors commented 5 years ago

@SeydX eth

seydx commented 5 years ago

eth ?

seydx commented 5 years ago

ah ethernet

seydx commented 5 years ago

hmmmm

twocolors commented 5 years ago

hmmm old model (my KDL-60W605B) after 5 min TURN OFF is not res to ping and api

pro:~ free$ date
Wed Apr 10 00:00:55 MSK 2019
pro:~ free$ ping tv
PING tv (192.168.0.11): 56 data bytes
64 bytes from 192.168.0.11: icmp_seq=0 ttl=64 time=3.310 ms
64 bytes from 192.168.0.11: icmp_seq=1 ttl=64 time=4.818 ms
^C
--- tv ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 3.310/4.064/4.818/0.754 ms
pro:~ free$ date
Wed Apr 10 00:06:11 MSK 2019
pro:~ free$ ping tv
PING tv (192.168.0.11): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
^C
--- tv ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
pro:~ free$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}' --connect-timeout 5
curl: (28) Connection timed out after 5000 milliseconds
pro:~ free$

and when use wakeonlan must wait ~ 30 sec to OK answer

pro:~ free$ wakeonlan fc:f1:52:bd:2f:c5 && date
Sending magic packet to 255.255.255.255:9 with fc:f1:52:bd:2f:c5
Wed Apr 10 00:08:47 MSK 2019
pro:~ free$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}' --connect-timeout 5
curl: (7) Couldn't connect to server
pro:~ free$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}' --connect-timeout 5
curl: (7) Couldn't connect to server
pro:~ free$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}' --connect-timeout 5
curl: (7) Couldn't connect to server
pro:~ free$ date
Wed Apr 10 00:09:08 MSK 2019
pro:~ free$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}' --connect-timeout 5
{"error":[404,"Not Found"]}
pro:~ free$ curl http://tv/sony/system --header 'x-auth-psk: freehb' --data '{"id":3,"method":"getPowerStatus","version":"1.0","params":[]}' --connect-timeout 5
{"id":3,"result":[{"status":"active"}]}
pro:~ free$ date
Wed Apr 10 00:09:18 MSK 2019
seydx commented 5 years ago

im putting a ping function into the plugin to avoid this issue, pushing a update very soon

twocolors commented 5 years ago

if i restart HB when is TV res to ping and api all is ok

[4/9/2019, 11:59:35 PM] [BraviaOSPlatform] [INFO] Adding new accessory: TV
[4/9/2019, 11:59:35 PM] [BraviaOSPlatform] [INFO] TV: CEC detected, checking TV state before fetching inputs...
[4/9/2019, 11:59:35 PM] [BraviaOSPlatform] [WARN] TV: Can not check TV state, because WOL is on!
[4/9/2019, 11:59:35 PM] [BraviaOSPlatform] [INFO] TV: Turning on TV (WOL)
[4/9/2019, 11:59:36 PM] Homebridge is running on port 51826.
[4/9/2019, 11:59:36 PM] [BraviaOSPlatform] [INFO] TV: Wait 14s before fetching inputs..
[4/9/2019, 11:59:50 PM] [homebridge-config-ui-x] Using Form Authentication
[4/9/2019, 11:59:50 PM] [BraviaOSPlatform] [INFO] TV: TV on! Fetching inputs...!
[4/9/2019, 11:59:51 PM] [homebridge-config-ui-x] Console v3.11.0 is listening on port 8090.
[4/9/2019, 11:59:52 PM] [BraviaOSPlatform] [INFO] TV: New Inputs fetched. Turning off TV again.
[4/9/2019, 11:59:52 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: HDMI 1/MHL
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: HDMI 2
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: HDMI 3
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: HDMI 4
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: AV1
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: AV2/Component
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: Плейер 1
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: Дублирование экрана
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: DVBT
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: DVBC
[4/9/2019, 11:59:53 PM] [BraviaOSPlatform] [INFO] TV: Adding new Input: ANALOG
[4/9/2019, 11:59:54 PM] [BraviaOSPlatform] [INFO] Registring platform accessory: TV

but not work tv:dvbt and tv:analog ): can show curl comman to test switch to ANALOG , tv:dvbc is work fine

seydx commented 5 years ago

$ curl http://192.168.0.11/sony/avContent -H 'x-auth-psk: ***' -d '{"id":3,"method":"getSourceList","version":"1.0","params":[{"scheme":"tv"}]}' {"id":3,"result":[[{"source":"tv:dvbc"},{"source":"tv:dvbt"}]]}

it seems you dont have "tv:analog" in your tv, so it couldnt work

twocolors commented 5 years ago

but 'tv:dvbt' not work, mb you help how add analog (input) if from remote irc i can swich to analog/digital

seydx commented 5 years ago

you can not use tv:analog if it is not in your list

curl http://192.168.0.11/sony/avContent -H 'x-auth-psk: ***' -d '{"id":3,"method":"getSourceList","version":"1.0","params":[{"scheme":"tv"}]}'

twocolors commented 5 years ago

build IRCC from method getRemoteControllerInfo

seydx commented 5 years ago

if the custom command work to turn on analog its great, via rest api it can not work because its not listed, publishing new update in a few minutes

seydx commented 5 years ago

@twocolors

can you pls reinstall the plugin and try it again

seydx commented 5 years ago

Update:

Added two new parameter to config.json

See Example Config for more details.

Also added a new ping function, to detect tv connection state (for TV's that response only if turned on)

twocolors commented 5 years ago

wow , thx, is ok !

[4/10/2019, 7:37:54 AM] [BraviaOSPlatform] [INFO] Adding new accessory: TV
[4/10/2019, 7:37:55 AM] [BraviaOSPlatform] [INFO] TV: CEC detected, checking TV state before fetching inputs...
[4/10/2019, 7:37:55 AM] [BraviaOSPlatform] [WARN] TV: Can not check TV state, because WOL is on!
[4/10/2019, 7:37:55 AM] [BraviaOSPlatform] [INFO] TV: Turning on TV (WOL)
[4/10/2019, 7:37:56 AM] Homebridge is running on port 51826.
[4/10/2019, 7:37:57 AM] [BraviaOSPlatform] [INFO] TV: TV switched ON!
[4/10/2019, 7:37:57 AM] [BraviaOSPlatform] [INFO] TV: Wait 7s before fetching inputs..
[4/10/2019, 7:38:07 AM] [BraviaOSPlatform] [WARN] TV: TV currently offline, trying to connect (this can take up to 5 minutes) ...
[4/10/2019, 7:38:11 AM] [homebridge-config-ui-x] Using Form Authentication
[4/10/2019, 7:38:13 AM] [homebridge-config-ui-x] Console v3.11.0 is listening on port 8090.
[4/10/2019, 7:38:34 AM] [BraviaOSPlatform] [INFO] TV: Connection established!
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: New Inputs fetched. Turning off TV again.
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: HDMI 1/MHL
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: HDMI 2
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: HDMI 3
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: HDMI 4
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: AV1
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: AV2/Component
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: Плейер 1
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: Дублирование экрана
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: Home
[4/10/2019, 7:38:35 AM] [BraviaOSPlatform] [INFO] TV: Adding new Input: Power
[4/10/2019, 7:38:36 AM] [BraviaOSPlatform] [INFO] Registring platform accessory: TV

pls, add support "build IRCC from method getRemoteControllerInfo", i have button like

{
  "id": 54,
  "result": [{
      "bundled": true,
      "type": "RM-J1100"
    },
    [{
      "name": "PowerOff",
      "value": "AAAAAQAAAAEAAAAvAw=="
    }, {
      "name": "Input",
      "value": "AAAAAQAAAAEAAAAlAw=="
    }, {
      "name": "GGuide",
      "value": "AAAAAQAAAAEAAAAOAw=="
    }, {
      "name": "EPG",
      "value": "AAAAAgAAAKQAAABbAw=="
    }, {
      "name": "Favorites",
      "value": "AAAAAgAAAHcAAAB2Aw=="
    }, {
      "name": "Display",
      "value": "AAAAAQAAAAEAAAA6Aw=="
    }, {
      "name": "Home",
      "value": "AAAAAQAAAAEAAABgAw=="
    }, {
      "name": "Options",
      "value": "AAAAAgAAAJcAAAA2Aw=="
    }, {
      "name": "Return",
      "value": "AAAAAgAAAJcAAAAjAw=="
    }, {
      "name": "Up",
      "value": "AAAAAQAAAAEAAAB0Aw=="
    }, {
      "name": "Down",
      "value": "AAAAAQAAAAEAAAB1Aw=="
    }, {
      "name": "Right",
      "value": "AAAAAQAAAAEAAAAzAw=="
    }, {
      "name": "Left",
      "value": "AAAAAQAAAAEAAAA0Aw=="
    }, {
      "name": "Confirm",
      "value": "AAAAAQAAAAEAAABlAw=="
    }, {
      "name": "Red",
      "value": "AAAAAgAAAJcAAAAlAw=="
    }, {
      "name": "Green",
      "value": "AAAAAgAAAJcAAAAmAw=="
    }, {
      "name": "Yellow",
      "value": "AAAAAgAAAJcAAAAnAw=="
    }, {
      "name": "Blue",
      "value": "AAAAAgAAAJcAAAAkAw=="
    }, {
      "name": "Num1",
      "value": "AAAAAQAAAAEAAAAAAw=="
    }, {
      "name": "Num2",
      "value": "AAAAAQAAAAEAAAABAw=="
    }, {
      "name": "Num3",
      "value": "AAAAAQAAAAEAAAACAw=="
    }, {
      "name": "Num4",
      "value": "AAAAAQAAAAEAAAADAw=="
    }, {
      "name": "Num5",
      "value": "AAAAAQAAAAEAAAAEAw=="
    }, {
      "name": "Num6",
      "value": "AAAAAQAAAAEAAAAFAw=="
    }, {
      "name": "Num7",
      "value": "AAAAAQAAAAEAAAAGAw=="
    }, {
      "name": "Num8",
      "value": "AAAAAQAAAAEAAAAHAw=="
    }, {
      "name": "Num9",
      "value": "AAAAAQAAAAEAAAAIAw=="
    }, {
      "name": "Num0",
      "value": "AAAAAQAAAAEAAAAJAw=="
    }, {
      "name": "Num11",
      "value": "AAAAAQAAAAEAAAAKAw=="
    }, {
      "name": "Num12",
      "value": "AAAAAQAAAAEAAAALAw=="
    }, {
      "name": "VolumeUp",
      "value": "AAAAAQAAAAEAAAASAw=="
    }, {
      "name": "VolumeDown",
      "value": "AAAAAQAAAAEAAAATAw=="
    }, {
      "name": "Mute",
      "value": "AAAAAQAAAAEAAAAUAw=="
    }, {
      "name": "ChannelUp",
      "value": "AAAAAQAAAAEAAAAQAw=="
    }, {
      "name": "ChannelDown",
      "value": "AAAAAQAAAAEAAAARAw=="
    }, {
      "name": "SubTitle",
      "value": "AAAAAgAAAJcAAAAoAw=="
    }, {
      "name": "ClosedCaption",
      "value": "AAAAAgAAAKQAAAAQAw=="
    }, {
      "name": "Enter",
      "value": "AAAAAQAAAAEAAAALAw=="
    }, {
      "name": "DOT",
      "value": "AAAAAgAAAJcAAAAdAw=="
    }, {
      "name": "Analog",
      "value": "AAAAAgAAAHcAAAANAw=="
    }, {
      "name": "Teletext",
      "value": "AAAAAQAAAAEAAAA/Aw=="
    }, {
      "name": "Exit",
      "value": "AAAAAQAAAAEAAABjAw=="
    }, {
      "name": "Analog2",
      "value": "AAAAAQAAAAEAAAA4Aw=="
    }, {
      "name": "*AD",
      "value": "AAAAAgAAABoAAAA7Aw=="
    }, {
      "name": "Digital",
      "value": "AAAAAgAAAJcAAAAyAw=="
    }, {
      "name": "Analog?",
      "value": "AAAAAgAAAJcAAAAuAw=="
    }, {
      "name": "BS",
      "value": "AAAAAgAAAJcAAAAsAw=="
    }, {
      "name": "CS",
      "value": "AAAAAgAAAJcAAAArAw=="
    }, {
      "name": "BSCS",
      "value": "AAAAAgAAAJcAAAAQAw=="
    }, {
      "name": "Ddata",
      "value": "AAAAAgAAAJcAAAAVAw=="
    }, {
      "name": "PicOff",
      "value": "AAAAAQAAAAEAAAA+Aw=="
    }, {
      "name": "Tv_Radio",
      "value": "AAAAAgAAABoAAABXAw=="
    }, {
      "name": "Theater",
      "value": "AAAAAgAAAHcAAABgAw=="
    }, {
      "name": "SEN",
      "value": "AAAAAgAAABoAAAB9Aw=="
    }, {
      "name": "InternetWidgets",
      "value": "AAAAAgAAABoAAAB6Aw=="
    }, {
      "name": "InternetVideo",
      "value": "AAAAAgAAABoAAAB5Aw=="
    }, {
      "name": "Netflix",
      "value": "AAAAAgAAABoAAAB8Aw=="
    }, {
      "name": "SceneSelect",
      "value": "AAAAAgAAABoAAAB4Aw=="
    }, {
      "name": "Mode3D",
      "value": "AAAAAgAAAHcAAABNAw=="
    }, {
      "name": "iManual",
      "value": "AAAAAgAAABoAAAB7Aw=="
    }, {
      "name": "Audio",
      "value": "AAAAAQAAAAEAAAAXAw=="
    }, {
      "name": "Wide",
      "value": "AAAAAgAAAKQAAAA9Aw=="
    }, {
      "name": "Jump",
      "value": "AAAAAQAAAAEAAAA7Aw=="
    }, {
      "name": "PAP",
      "value": "AAAAAgAAAKQAAAB3Aw=="
    }, {
      "name": "MyEPG",
      "value": "AAAAAgAAAHcAAABrAw=="
    }, {
      "name": "ProgramDescription",
      "value": "AAAAAgAAAJcAAAAWAw=="
    }, {
      "name": "WriteChapter",
      "value": "AAAAAgAAAHcAAABsAw=="
    }, {
      "name": "TrackID",
      "value": "AAAAAgAAABoAAAB+Aw=="
    }, {
      "name": "TenKey",
      "value": "AAAAAgAAAJcAAAAMAw=="
    }, {
      "name": "AppliCast",
      "value": "AAAAAgAAABoAAABvAw=="
    }, {
      "name": "acTVila",
      "value": "AAAAAgAAABoAAAByAw=="
    }, {
      "name": "DeleteVideo",
      "value": "AAAAAgAAAHcAAAAfAw=="
    }, {
      "name": "PhotoFrame",
      "value": "AAAAAgAAABoAAABVAw=="
    }, {
      "name": "TvPause",
      "value": "AAAAAgAAABoAAABnAw=="
    }, {
      "name": "KeyPad",
      "value": "AAAAAgAAABoAAAB1Aw=="
    }, {
      "name": "Media",
      "value": "AAAAAgAAAJcAAAA4Aw=="
    }, {
      "name": "SyncMenu",
      "value": "AAAAAgAAABoAAABYAw=="
    }, {
      "name": "Forward",
      "value": "AAAAAgAAAJcAAAAcAw=="
    }, {
      "name": "Play",
      "value": "AAAAAgAAAJcAAAAaAw=="
    }, {
      "name": "Rewind",
      "value": "AAAAAgAAAJcAAAAbAw=="
    }, {
      "name": "Prev",
      "value": "AAAAAgAAAJcAAAA8Aw=="
    }, {
      "name": "Stop",
      "value": "AAAAAgAAAJcAAAAYAw=="
    }, {
      "name": "Next",
      "value": "AAAAAgAAAJcAAAA9Aw=="
    }, {
      "name": "Rec",
      "value": "AAAAAgAAAJcAAAAgAw=="
    }, {
      "name": "Pause",
      "value": "AAAAAgAAAJcAAAAZAw=="
    }, {
      "name": "Eject",
      "value": "AAAAAgAAAJcAAABIAw=="
    }, {
      "name": "FlashPlus",
      "value": "AAAAAgAAAJcAAAB4Aw=="
    }, {
      "name": "FlashMinus",
      "value": "AAAAAgAAAJcAAAB5Aw=="
    }, {
      "name": "TopMenu",
      "value": "AAAAAgAAABoAAABgAw=="
    }, {
      "name": "PopUpMenu",
      "value": "AAAAAgAAABoAAABhAw=="
    }, {
      "name": "RakurakuStart",
      "value": "AAAAAgAAAHcAAABqAw=="
    }, {
      "name": "OneTouchTimeRec",
      "value": "AAAAAgAAABoAAABkAw=="
    }, {
      "name": "OneTouchView",
      "value": "AAAAAgAAABoAAABlAw=="
    }, {
      "name": "OneTouchRec",
      "value": "AAAAAgAAABoAAABiAw=="
    }, {
      "name": "OneTouchStop",
      "value": "AAAAAgAAABoAAABjAw=="
    }, {
      "name": "DUX",
      "value": "AAAAAgAAABoAAABzAw=="
    }, {
      "name": "FootballMode",
      "value": "AAAAAgAAABoAAAB2Aw=="
    }, {
      "name": "Social",
      "value": "AAAAAgAAABoAAAB0Aw=="
    }]
  ]
}
hmook commented 5 years ago

@SeydX Still am not able to figure out what is going wrong with my installation. Again updated and resetted my whole Homebridge OZNU installation. Even tried to do a clean installation of my SD card. But when I install the beta plugin I'm still getting the no response issue after a few minutes. Is there any bug log I can share hidden some where to see how we can solve this?

Maybe my setup is the issue. I'm using two homebridge installations one to specific test this plugin before installing it on my 'main' homebridge install (because it broke it a couple of times before). I'm using the docker oznu quick install to run homebridge and that one has the frontend UI pre installed. After that I install the beta plugin for my Bravia TV. TV Is found and looks like I am able to control it with HomeApp on my iPhone. After a couple of minutes it's given me the no response. And this is what the log is giving me:

[4/10/2019, 6:48:03 AM] Homebridge is running on port 51826.
[4/10/2019, 6:48:03 AM] [BraviaOSPlatform] [INFO] Woonkamer Televisie: TV switched ON!
[4/10/2019, 6:48:03 AM] [BraviaOSPlatform] [INFO] Woonkamer Televisie: Wait 7s before fetching inputs..
[4/10/2019, 6:48:10 AM] [BraviaOSPlatform] [INFO] Woonkamer Televisie: New Inputs fetched. Turning off TV again.
HAP Warning: Characteristic 000000E2-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 000000D8-0000-1000-8000-0026BB765291. Adding anyway.
HAP Warning: Characteristic 000000EA-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 00000113-0000-1000-8000-0026BB765291. Adding anyway.
seydx commented 5 years ago

It looks there is an issue with your network and not with the plugin, find some useful tips here

https://github.com/nfarina/homebridge/issues/1801#issuecomment-471749123

https://github.com/nfarina/homebridge/issues/1801#issuecomment-394753293

https://github.com/nfarina/homebridge/issues/1801#issuecomment-407786859

You can also try to activate/deactivate igmp snooping (called optimize live tv on fritzbox)

seydx commented 5 years ago

Pushed also a new update !

seydx commented 5 years ago

@twocolors

Just pick the command you want for analog and out it in your commands array in config.json to get an input for analog

hmook commented 5 years ago

It looks there is an issue with your network and not with the plugin, find some useful tips here

nfarina/homebridge#1801 (comment)

nfarina/homebridge#1801 (comment)

nfarina/homebridge#1801 (comment)

You can also try to activate/deactivate igmp snooping (called optimize live tv on fritzbox)

Tried the solutions to the issues you mentioned didn't work unfortunately.

What I've also tried is installing this beta version on my perfectly fine working raspberrypi installation with OZNU docker Homebridge. And after installing the beta version of the Bravia plugin it immediately broke my whole setup. Non of the devices where responding and all off them where giving status 'no response'. After removal of the Bravia beta plugin and a reset of homebridge got them back working just fine.

So it's hard for me to think there is an issue with my installation. Only thing I can imagine that there is some kinda issue with my network/ television and the Bravia Beta plugin. If you guys have anymore testing suggestions I am open to test this firmly.

seydx commented 5 years ago

Hm... but your are the only one with ‚no responding‘ issue.. how is your tv connected to the internet? Wifi or ethernet ? @hmook

hmook commented 5 years ago

via ethernet. also both my raspberrypi's are connected via ethernet.

seydx commented 5 years ago

On which tvOS version is your apple tv @hmook

hmook commented 5 years ago

@SeydX They are both on tvOS 12.2

seydx commented 5 years ago

@hmook

Can you try this pls

https://github.com/nfarina/homebridge/issues/2089#issuecomment-449956380

hmook commented 5 years ago

Also in homebridge UI itself it gives me not supported. Schermafdruk 2019-04-10 15 08 05

seydx commented 5 years ago

@hmook

Try this

https://github.com/nfarina/homebridge/issues/2089#issuecomment-449956380

Note: change the port ‚51826‘ to the port of your homebridge instance

seydx commented 5 years ago

@hmook

Pls post also the output from

avahi-browse --verbose _hap._tcp

After installing avahi

sudo apt-get install avahi-utils

hmook commented 5 years ago

@SeydX

Here is the out put of avahi-browse --verbose _hap._tcp:

Server version: avahi 0.6.32; Host name: raspberrypi.local
E Ifce Prot Name                                          Type                 Domain
+   eth0 IPv6 Netatmo Presence                              _hap._tcp            local
+   eth0 IPv6 Lyric-F0402F                                  _hap._tcp            local
+   eth0 IPv6 Aqara Hub-1019                                _hap._tcp            local
+   eth0 IPv6 Philips hue - 23FC46                          _hap._tcp            local
+   eth0 IPv4 Netatmo Presence                              _hap._tcp            local
+   eth0 IPv4 Lyric-F0402F                                  _hap._tcp            local
+   eth0 IPv4 Homebridge-FD17                               _hap._tcp            local
+   eth0 IPv4 Aqara Hub-1019                                _hap._tcp            local
+   eth0 IPv4 Philips hue - 23FC46                          _hap._tcp            local
+   eth0 IPv4 Sonoff Switch-320A6E                          _hap._tcp            local
+   eth0 IPv4 Sonoff Switch-585052                          _hap._tcp            local
+   eth0 IPv4 Homebridge-1061                               _hap._tcp            local
: Cache exhausted
: All for now
+   eth0 IPv4 Homebridge-67B8                               _hap._tcp            local
-   eth0 IPv4 Homebridge-FD17                               _hap._tcp            local

And here is the output of sudo apt-get install avahi-utils:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libavahi-client3
The following NEW packages will be installed:
  avahi-utils libavahi-client3
0 upgraded, 2 newly installed, 0 to remove and 60 not upgraded.
Need to get 103 kB of archives.
After this operation, 239 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirror.serverius.net/raspbian/raspbian stretch/main armhf libavahi-client3 armhf 0.6.32-2 [51.3 kB]
Get:2 http://mirror.serverius.net/raspbian/raspbian stretch/main armhf avahi-utils armhf 0.6.32-2 [52.0 kB]
Fetched 103 kB in 0s (325 kB/s)   
Selecting previously unselected package libavahi-client3:armhf.
(Reading database ... 34938 files and directories currently installed.)
Preparing to unpack .../libavahi-client3_0.6.32-2_armhf.deb ...
Unpacking libavahi-client3:armhf (0.6.32-2) ...
Selecting previously unselected package avahi-utils.
Preparing to unpack .../avahi-utils_0.6.32-2_armhf.deb ...
Unpacking avahi-utils (0.6.32-2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libavahi-client3:armhf (0.6.32-2) ...
Setting up avahi-utils (0.6.32-2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...

Still No Response after a couple of minutes

seydx commented 5 years ago

@hmook tried this already?

If you have IPv6 enabled, it will only listen on the IPv6. This also leads to erros with avahi.

First, disable IPV6 completely on your rasperrypi. I was able to achieve this by adding this too
/boot/cmdline.txt > ipv6.disable=1

Then reboot and check with ifconfig that IPv6 is disabled.

Then disable IPv6 on avahi settings in /etc/avahi/avahi-daemon.conf:
use-ipv6=no
hmook commented 5 years ago

@SeydX Yes I've disabled ipv6 on cmdline.txt and in Avahi-daemon.conf