AntonioMeireles / homebridge-vieramatic

Homebridge plugin for Panasonic™ Viera™ TVs (includes support for 2018 and later models)
Apache License 2.0
43 stars 9 forks source link

viera-pair finds the TV but there is no output #58

Closed niffchen closed 3 years ago

niffchen commented 3 years ago

I tried to use the homebridge-vieramatic plugin to control my Panasonic TV via homebridge. I have some trouble with the „viera-pair“. If I use the plugin without encryption key I get the message that the encryption is needed and no credentials are provided. Everytime I use the „viera-pair“ I get the following output and the command never comes to an end:

viera-pair found a 'Panasonic VIErA' TV (TX-55HZ2000W) at '' (requires crypto for comunication).

Am I something missing?

Issue Context Plugin version: 2.0.16-beta.1 Homebridge: 1.1.7 Node.js: v12.18.3 NPM: v6.14.6 Raspbian GNU/Linux Stretch (9) TV: PanasonicTX-55HZW2004

If you need further informations I will provide you every information you need.

Regards, Jens

AntonioMeireles commented 3 years ago

hey, thanks for reporting!

quick question ? re: 'Panasonic VIErA' TV (TX-55HZ2000W) at '' (requires crypto for comunication). did you cut the IP address or it's not appearing here ?

AntonioMeireles commented 3 years ago

@niffchen

meanwhile go to on your browser http://${yourHomebridgeIPaddress}:8973/ with the TV on and see if it behaves please

niffchen commented 3 years ago

I cut the IP. Sorry for that. The output contains the right IP. I tested the mentioned request at the browser and with curl on my Pi but the page cannot be reached. That is crazy. There is no FW or something else in between which is blocking traffic. The Panasonic app Remote 3 is working.

curl http://IP:8973 curl: (7) Failed to connect to IP port 8973: Connection refused

AntonioMeireles commented 3 years ago

could you attach here your current homebridge's config.json please ?

AntonioMeireles commented 3 years ago

... and also attach your homebridge logs please.

niffchen commented 3 years ago

This is the config.json:

"mdns": {

    "interface": "IP"
},
"bridge": {
    "name": "Homebridge",
    "username": "NAME",
    "manufacturer": "homebridge.io",
    "model": "homebridge",
    "port": 51826,
    "pin": "PIN"
},
"description": "Home Smart Home",
"platforms": [
    {
        "platform": "config",
        "name": "Config",
        "port": 8080,
        "auth": "form",
        "theme": "red",
        "restart": "sudo -n systemctl restart homebridge",
        "temp": "/sys/class/thermal/thermal_zone0/temp",
        "sudo": true,
        "log": {
            "method": "custom",
            "command": "journalctl -o cat -n 500 -f -u homebridge"
        },
        "sessionTimeout": 28800
    },
    {
        "platform": "HttpWebHooks",
        "webhook_port": "51828",
        "cache_directory": "/var/homebridge/node-persist/storage",
        "sensors": [
            {
                "id": "036CBB618AED_T",
                "name": "Garten Temperatur",
                "type": "temperature"
            },
            {
                "id": "036CBB618AED_H",
                "name": "Garten Luftfeuchtigkeit",
                "type": "humidity"
            },
            {
                "id": "037129352584_T",
                "name": "Vorgarten Temperatur",
                "type": "temperature"
            },
            {
                "id": "037129352584_H",
                "name": "Vorgarten Luftfeuchtigkeit",
                "type": "humidity"
            },
            {
                "id": "026A90639CDD_T",
                "name": "Temperatur SZ Flur",
                "type": "temperature"
            }
        ]
    },
    {
        "tvs": [
            {
                "friendlyName": "TV Wohnzimmer",
                "ipAddress": "IP",
                "hdmiInputs": [
                    {
                        "id": "1",
                        "name": "AppleTV"
                    }
                ],
                "disabledAppSupport": false,
                "customVolumeSlider": true
            }
        ],
        "platform": "PanasonicVieraTV"
    }
],
"accessories": [
    {
        "accessory": "MH-AC-WIFI-1",
        "name": "Schlafzimmer",
        "ip": "IP",
        "username": "user",
        "password": "pw",
        "manufacturer": "Mitsubishi Heavy Industries",
        "model": "SRK20ZS-W",
        "serialNumber": "serial"
    },
    {
        "accessory": "MusicCastTV",
        "name": "Yamaha Wohnzimmer",
        "ip": "IP",
        "inputs": {
            "airplay": "AirPlay",
            "dab": "Radio DAB+",
            "server": "Musik-Server",
            "net_radio": "Netzwerk Radio",
            "audio1": "TV"
        }
    },
    {
        "accessory": "AutomationCalendar",
        "name": "Kalender/Jahreszeiten Ledeburg",
        "latitude": 52.41246,
        "longitude": 9.6818613
    },
    {
        "name": "Schlafzimmer Klimaanlage Schaltpause nach Aktivierung Kühlung Tagsüber",
        "delay": 300000,
        "disableSensor": true,
        "startOnReboot": false,
        "accessory": "DelaySwitch"
    },
    {
        "name": "Ablauf Klimaanlage Entfeuchtung",
        "delay": "14400000",
        "disableSensor": " true",
        "startOnReboot": "false",
        "accessory": "DelaySwitch"
    },
    {
        "name": "Schlafzimmer Klimaanlage Sommermodus aktiv",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Schlafzimmer Klimaanlage Tagmodus aktiv",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Schlafzimmer Klimaanlage Nachtmodus aktiv",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Schlafzimmer Klimaanlage Fenster Offen Timer",
        "delay": 5000,
        "disableSensor": true,
        "startOnReboot": false,
        "accessory": "DelaySwitch"
    },
    {
        "name": "Diensterkennung Christin in 1h",
        "stateful": true,
        "reverse": false,
        "time": 1,
        "accessory": "DummySwitch"
    },
    {
        "name": "Rolladen Sommermodus alles außer Dachgeschoß",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Rolladen Sommermodus Dachgeschoß",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Rolladen Frühjahrmodus Dachgeschoß",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Rolladen Schneemodus",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Rolladen Wintermodus",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Rolladen Urlaubsmodus",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Rolladen Sonnenaufgang vor 06-30 Uhr",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "name": "Dunstabzugshabube aktiv",
        "stateful": true,
        "reverse": false,
        "time": 0,
        "accessory": "DummySwitch"
    },
    {
        "accessory": "HTTP-SWITCH",
        "name": "Kaffeemaschine",
        "switchType": "stateful",
        "onUrl": {
            "url": "https://api.mcs3.miele.com/v1/devices/id/actions",
            "headers": {
                "Authorization": "key",
                "Content-Type": "application/json"
            },
            "method": "PUT",
            "body": {
                "powerOn": true
            }
        },
        "offUrl": {
            "url": "https://api.mcs3.miele.com/v1/devices/id/actions",
            "headers": {
                "Authorization": "key",
                "Content-Type": "application/json"
            },
            "method": "PUT",
            "body": {
                "powerOff": true
            }
        },
        "statusUrl": {
            "url": "https://api.mcs3.miele.com/v1/devices/Id/state?language=de",
            "headers": {",
            "headers": {
                "Authorization": "key",
                "Content-Type": "application/json"
            },
            "method": "GET"
        },
        "statusPattern": "(An|Bereit|In Betrieb)",
        "pullInterval": 60000,
        "debug": true
    },
    {
        "name": "Start/Stop Mobile Alerts Proxy",
        "stateful": true,
        "onCmd": "/usr/local/lib/node_modules/maserver/MMMMobileAlerts/maserver/startMobileAlerts.sh",
        "offCmd": "/usr/local/lib/node_modules/maserver/MMMMobileAlerts/maserver/stopMobileAlerts.sh",
        "accessory": "CmdTriggerSwitch"
    },
    {
        "accessory": "GetPushedNotification",
        "name": "Kamin ausgehen lassen",
        "app_key": "key",
        "app_secret": "secret",
        "app_name": "Zuhause",
        "message": "Kamin ausgehen lassen? Es wird sehr warm in der Schlafetage!",
        "mute_notification_interval_in_sec": 30
    },
    {
        "accessory": "GetPushedNotification",
        "name": "Benachrichtigung Klimaanalage 1 Schlafzimmer einschalten? Warm draußen - Fake Sensor Delay Switch",
        "app_key": "key",
        "app_secret": "secret",
        "app_name": "Zuhause",
        "message": "Soll die Klimaanalge eingeschaltet werden? Es ist sehr warm draußen.",
        "mute_notification_interval_in_sec": 0
    },
    {
        "accessory": "GetPushedNotification",
        "name": "Benachrichtigung Klimaanalage 2 Schlafzimmer einschalten? Warm im Schlafzimmer - Fake Sensor Delay Switch",
        "app_key": "key",
        "app_secret": "secret",
        "app_name": "Zuhause",
        "message": "Soll die Klimaanalge eingeschaltet werden? Es ist sehr warm im Schlafzimmer!",
        "mute_notification_interval_in_sec": 0
    },
    {
        "accessory": "GetPushedNotification",
        "name": "Benachrichtigung Standheizung einschalten?",
        "app_key": "key",
        "app_secret": "secret",
        "app_name": "Zuhause",
        "message": "Benachrichtigung Standheizung einschalten? Es sind weniger als 5 Grad draußen.",
        "mute_notification_interval_in_sec": 0
    },
    {
        "accessory": "GetPushedNotification",
        "name": "Benachrichtigung Dunstabzugshabube aktiv",
        "app_key": "key",
        "app_secret": "secret",
        "app_name": "Zuhause",
        "message": "Benachrichtigung Dunstabzugshaube ausschalten? Sie ist schon 2 Stunden eingeschaltet. Ist das gewollt?.",
        "mute_notification_interval_in_sec": 0
    },
    {
        "accessory": "GetPushedNotification",
        "name": "Benachrichtigung Rolladen geschlossen",
        "app_key": "key",
        "app_secret": "secret"
        "app_name": "Zuhause",
        "message": "Es sind nicht alle Rolläden geöffnet. Ist das gewollt?.",
        "mute_notification_interval_in_sec": 0
    }
]

}

niffchen commented 3 years ago

I restated Homebridge and this is the beginning of the log with the Viera output:

[1/14/2021, 21:14:11] Homebridge is running on port 51826. [1/14/2021, 21:14:11] [Yamaha Wohnzimmer] volume: 53 maxVol: 161 [1/14/2021, 21:14:11] [Yamaha Wohnzimmer] Input: audio1 found a 'Panasonic VIErA' TV (TX-55HZ2000W) at 'IP TV' (requires crypto for comunication). [1/14/2021, 21:14:11] [PanasonicVieraTV] IGNORING 'IP TV' as it is from a Panasonic TV that requires encryption 'Panasonic VIErA' and no valid credentials were supplied. [1/14/2021, 21:14:17] [Homebridge UI] Homebridge Config UI X v4.36.0 is listening on :: port 8080 [1/14/2021, 21:15:10] [Kaffeemaschine] getStatus() doing http request... [1/14/2021, 21:15:11] [Kaffeemaschine] getStatus() request returned successfully (200). Body: '{"ProgramID":{"value_raw":0,"value_localized":"","key_localized":"Programmbezeichnung"},"status":{"value_raw":1,"value_localized":"Aus","key_localized":"Status"},"programType":{"value_raw":0,"value_localized":"Programm","key_localized":"Programmart"},"programPhase":{"value_raw":4352,"value_localized":"","key_localized":"Programmphase"},"remainingTime":[0,0],"startTime":[0,0],"targetTemperature":[{"value_raw":-32768,"value_localized":null,"unit":"Celsius"},{"value_raw":-32768,"value_localized":null,"unit":"Celsius"},{"value_raw":-32768,"value_localized":null,"unit":"Celsius"}],"temperature":[{"value_raw":-32768,"value_localized":null,"unit":"Celsius"},{"value_raw":-32768,"value_localized":null,"unit":"Celsius"},{"value_raw":-32768,"value_localized":null,"unit":"Celsius"}],"signalInfo":false,"signalFailure":false,"signalDoor":false,"remoteEnable":{"fullRemoteControl":true,"smartGrid":false,"mobileStart":false},"light":1,"elapsedTime":[],"spinningSpeed":{"unit":"U/min","value_raw":null,"value_localized":null,"key_localized":"Schleuderdrehzahl"},"dryingStep":{"value_raw":null,"value_localized":"","key_localized":"Trockenstufe"},"ventilationStep":{"value_raw":null,"value_localized":"","key_localized":"Lüfterstufe"},"plateStep":[],"ecoFeedback":null,"batteryLevel":null}' [1/14/2021, 21:15:11] [Kaffeemaschine] Switch is currently OFF [1/14/2021, 21:16:11] [Kaffeemaschine] getStatus() doing http request... [1/14/2021, 21:16:11] [Kaffeemaschine] getStatus() request returned successfully (200). Body: '{"ProgramID":{"value_raw":0,"value_localized":"","key_localized":"Programmbezeichnung"},"status":{"value_raw":1,"value_localized":"Aus","key_localized":"Status"},"programType":{"value_raw":0,"value_localized":"Programm","key_localized":"Programmart"},"programPhase":{"value_raw":4352,"value_localized":"","key_localized":"Programmphase"},"remainingTime":[0,0],"startTime":[0,0],"targetTemperature":[{"value_raw":-32768,"value_localized":null,"unit":"Celsius"},{"value_raw":-32768,"value_localized":null,"unit":"Celsius"},{"value_raw":-32768,"value_localized":null,"unit":"Celsius"}],"temperature":[{"value_raw":-32768,"value_localized":null,"unit":"Celsius"},{"value_raw":-32768,"value_localized":null,"unit":"Celsius"},{"value_raw":-32768,"value_localized":null,"unit":"Celsius"}],"signalInfo":false,"signalFailure":false,"signalDoor":false,"remoteEnable":{"fullRemoteControl":true,"smartGrid":false,"mobileStart":false},"light":1,"elapsedTime":[],"spinningSpeed":{"unit":"U/min","value_raw":null,"value_localized":null,"key_localized":"Schleuderdrehzahl"},"dryingStep":{"value_raw":null,"value_localized":"","key_localized":"Trockenstufe"},"ventilationStep":{"value_raw":null,"value_localized":"","key_localized":"Lüfterstufe"},"plateStep":[],"ecoFeedback":null,"batteryLevel":null}' [1/14/2021, 21:16:11] [Kaffeemaschine] Switch is currently OFF

AntonioMeireles commented 3 years ago

thanxs. this one is really interesting ... running curl http://localhost:8973 on the homebridge host gives you what ?

niffchen commented 3 years ago

Yes, it looks very interesting. This is the output of the curl command on localhost:

<!DOCTYPE html>


root@zeroconf:~#

niffchen commented 3 years ago

If I use traceroute I get this:

traceroute IP -p 8973 traceroute to IP (IP), 30 hops max, 60 byte packets 1 panasonictv.lan (IP) 0.500 ms 0.556 ms 0.514 ms

Maybe a problem with routing from TV to Homebridge ...

niffchen commented 3 years ago

If I use the browser on the TV and try to connect the address „http://IP-Homebridge:8973“ I also get the form mentioned above. Network seems to be ok.

AntonioMeireles commented 3 years ago

getting even weirder ? can you try to follow up/proceed the steps via the form that you managed to access via the IN TV Browser ?

niffchen commented 3 years ago

I think I know what is happening. The Panasonic is blocking the request because it thinks that the homebridge is located in a different network. I don‘t know why but I changed the location of the homebridge - same IP and the same network - and now it works. I got an encryption key and app key . With this information the homebridge is now connecting to the TV. It looks like a problem with my network which I have to solve. Thank you for your hints :-) Now I need to check why homebridge is not transferring the TV to HomeKit. Everything else is managed by HomeKit but the TV only exists at Homebridge. Do you have any ideas?

Regards, Jens

AntonioMeireles commented 3 years ago

Glade you sorted it, was getting way confused.

you need to add the TV manually to homekit (as it isn't added automatically - since user may have more than one)

confirm please that this is the issue.

niffchen commented 3 years ago

I have new informations. I changed my network design a bit and now homebridge has full contact to the TV. I can use the viera-pair command again and again and it works. That’s fine. Yesterday I integrated the TV into HomeKit as you mentioned. I deleted it again because it was not working really in HomeKit. I don‘t really know today what happened yesterday but after this I cannot integrate the TV in HomeKit again. HomeKit cannot find the TV with the HomeKot-Code given by Homebridge. Do I have to delete a bit more to get the TV published again for integrating into HomeKit the second time? To be sure that no network problems will be the reason for this problems I integrated Homebridge via wireless lan into the same network as the TV and I try to get the TV into HomeKit via iPhone using the same wireless lan and the same access point like Homebridge.

Do you have any further suggestions?

AntonioMeireles commented 3 years ago

@niffchen

Great to see you making progresses! see please if following steps from here fix your remaining issue.

niffchen commented 3 years ago

That is what I have been looking for! Wonderful, it is working now :-) Thank you very much! No everything is fine!

AntonioMeireles commented 3 years ago

GREAT!

have a great weekend too!