Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property .... Got SIGTERM, shutting down Homebridge.. #257

Closed
DJay-X opened this issue Jun 13, 2020 · 10 comments
Closed

Comments

@DJay-X
Copy link

DJay-X commented Jun 13, 2020

Hi @merdok

I recently changed the devices connected to my TV.
How get I changed the "new" connections to noticing by the plugin and forget the old ones?

However, I'm not sure if this is the gentle way at the moment, that the plugin complete shutdown homebridge. 😉

Thanks in advance for the help and your great work.

[2020-6-13 17:01:51] TypeError: Cannot read property 'com.webos.app.hdmi1' of undefined
    at webosTvAccessory.setAppSwitchState (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:1363:37)
    at On.<anonymous> (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:685:30)
    at On.emit (events.js:315:20)
    at On.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/EventEmitter.js:59:38)
    at On.Characteristic._this.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Characteristic.js:356:23)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Accessory.js:938:36
    at Array.forEach (<anonymous>:null:null)
    at Bridge.Accessory._this._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Accessory.js:806:18)
    at HAPServer.emit (events.js:315:20)
    at HAPServer.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/EventEmitter.js:59:38)
    at HAPServer._this._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/HAPServer.js:718:23)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/HAPServer.js:227:39)
    at IncomingMessage.emit (events.js:315:20)
    at endReadableNT (_stream_readable.js:1221:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
[2020-6-13 17:01:51] Got SIGTERM, shutting down Homebridge...
[2020-6-13 17:05:01] [LG webOS TV] [LG webOS TV] Audio status changed
[2020-6-13 17:05:01] [LG webOS TV] [LG webOS TV] Current volume: 0
[2020-6-13 17:05:01] [LG webOS TV] [LG webOS TV] Muted: No
[2020-6-13 17:05:14] TypeError: Cannot read property 'maxdome' of undefined
    at webosTvAccessory.setAppSwitchState (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:1363:37)
    at On.<anonymous> (/usr/local/lib/node_modules/homebridge-webos-tv/index.js:685:30)
    at On.emit (events.js:315:20)
    at On.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/EventEmitter.js:59:38)
    at On.Characteristic._this.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Characteristic.js:356:23)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Accessory.js:938:36
    at Array.forEach (<anonymous>:null:null)
    at Bridge.Accessory._this._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Accessory.js:806:18)
    at HAPServer.emit (events.js:315:20)
    at HAPServer.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/EventEmitter.js:59:38)
    at HAPServer._this._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/HAPServer.js:718:23)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/HAPServer.js:227:39)
    at IncomingMessage.emit (events.js:315:20)
    at endReadableNT (_stream_readable.js:1221:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
[2020-6-13 17:05:14] Got SIGTERM, shutting down Homebridge...
[2020-6-13 17:05:14] [MoodoPlatform] Shutting down connections...
[2020-6-13 17:05:14] [HarmonyHub] INFO - shutdown
@DJay-X
Copy link
Author

DJay-X commented Jun 13, 2020

What is strange, the Input is still the same.

But I recently added the Hue Sync Box to HDMI1

And on the Sync Box
Input 1 = Apple TV
Input 2 = Chromecast

Probably this is causing the problem.

But also the maxdome App switch is crashing homebridge as well for whatever reason.

In the past I started "maxdome"
[LG webOS TV] [LG webOS TV] App launched, current appId: maxdome

and when I wanted to go back to the "main screen" I turned on hdmi1 to get back to Apple TV.

But this is now causing the crash. hdmi1 as well as maxdome.

Any Idea and help is much appreciated. :)

Napkin 13 06 20, 6 16 08 PM

@merdok
Copy link
Owner

merdok commented Jun 13, 2020

Can you post your config?

@DJay-X
Copy link
Author

DJay-X commented Jun 13, 2020

Oh sorry.. of course. 🙈
The config is the same since (ever).

{
            "accessory": "webostv",
            "name": "LG webOS TV",
            "ip": "xxx.xxx.xxx.xx",
            "mac": "a1:b2:c3:45:de:67",
            "keyFile": "/home/pi/.homebridge/lgtvKeyFile",
            "volumeControl": "buttons",
            "mediaControl": true,
            "showInputButtons": true,
            "legacyTvService": true,
            "pollingInterval": 10,
            "inputs": [
                {
                    "appId": "maxdome",
                    "name": "Maxdome"
                },
                {
                    "appId": "com.webos.app.hdmi1",
                    "name": "Hauptbildschirm"
                }
            ],
            "notificationButtons": [
                "Backofen vorgeheizt.",
                "Wasserkocher fertig.",
                "Haustür klingelt.",
                "Luftqualität in der Wohnung schlecht. Bitte lüften."
            ]
        },

@merdok
Copy link
Owner

merdok commented Jun 13, 2020

Oh, you are using the legacy TV service. Well i guess this is a bug with the legacy TV service, and this is a good example why i need to remove the legacy TV service in order to progress with the plugin... If you did not read the announcement then i would advice to do so: #247

@DJay-X
Copy link
Author

DJay-X commented Jun 13, 2020

Haha... it speaks for your great plugin. Obviously I had for more than 1,5 years no problem and everything was untouched working perfectly. 👍

Do I understand it correct that I only have to move the above part from my config "accessories" over the "platforms"?

@merdok
Copy link
Owner

merdok commented Jun 14, 2020

To migrate to a platform yes, you need to move the config to the "webostv" platform and a new device. You can find an example in the README. You also need to stop using the legacyTvService property since i plan to remove it pretty soon.

@DJay-X
Copy link
Author

DJay-X commented Jun 14, 2020

Thanks @merdok
I moved everything to platforms and it worked. Also I removed the legacyTvService part.
I was not familiar at first, to add the TV as a device again in Apple Home App.
However, I use Eve App most of the time and I thought setting "showInputButtons": true, would also work for Eve App.
But in Eve App I can't see any buttons at all.
I was checking your readme but couldn't find anything related to Eve App or other than Home App.
Probably I can't see the wood for the trees.

Thanks again for your work and friendly help. The next 1,5 years of using you plugin can come. ;)

{
            "platform": "webostv",
            "devices": [
                {
                    "name": "LG webOS TV",
                    "ip": "xxx.xxx.xxx.xx",
                    "mac": "a1:b2:c3:45:de:67",
                    "pollingInterval": 10,
                    "keyFile": "/home/pi/.homebridge/lgtvKeyFile",
                    "inputs": [
                        {
                            "appId": "maxdome",
                            "name": "Maxdome"
                        },
                        {
                            "appId": "com.webos.app.hdmi1",
                            "name": "Hauptbildschirm"
                        }
                    ],
                    "showInputButtons": true,
                    "volumeControl": "buttons",
                    "channelControl": false,
                    "mediaControl": false,
                    "notificationButtons": [
                        "Backofen vorgeheizt.",
                        "Wasserkocher fertig.",
                        "Haustür klingelt.",
                        "Luftqualität in der Wohnung schlecht. Bitte lüften."
                    ]
                }
            ]
        },

@merdok
Copy link
Owner

merdok commented Jun 14, 2020

I am not using the Eve app so i am not quite sure how it works. Does it even support TV accesories?

@DJay-X
Copy link
Author

DJay-X commented Jun 14, 2020

Oh okay. In the past using "accessories" the Buttons showing up in Eve App.
Eve App does not support TV like Home App is doing. Maybe that's the problem right now for me, using the new config settings.

However, when I'm the only person who is missing the buttons in Eve, then that's my problem. ;)

Thanks again so much. Wouldn't want to miss your plugin. 👍

@merdok
Copy link
Owner

merdok commented Jun 14, 2020

Yes, most probably this is due to Home app not supporting TV accessories. When you disable legacyTvService then the TV is exposed as a TV accessory where otherwise it would be emulated using a switch.

@merdok merdok closed this as completed Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants