Closed damienmauchamp closed 2 years ago
HI ! I analyzed this bug, I tried to have the same configuration with "model":"Raspberry Pi 3 Model B Plus Rev 1.3","vendor":"Raspberry Pi Foundation" values but I can't reproduce with these values => Android is saying that the sent configuration is not good There is a lack of logs : can you send me what's happening before ? Can you send me too the configuration you use ? (Channels, applications ..) Could you try by removing these file, restarting Homebridge and reconfigure your link ? .homebridge/androidtv-config.json
Thank
I was messing around just before, sending a random link.
I've tried to reinstall the plugin, to delete the device file in /var/lib/homebridge/persist (IdentifierCache.XXXXXXXXXXX.json), changed plugin's config (it now has the default config), removed the androidtv-config.json file and then re-paired my device, still the same.
Current config.json:
{
"port": 8182,
"channels": [
{
"name": "France Info",
"number": 27
}
],
"applications": [
{
"name": "Netflix",
"link": "https://www.netflix.com/title.*"
}
],
"platform": "HomebridgeAndroidTV"
}
[04/02/2022, 11:07:38] [HomebridgeAndroidTV] Admin server is running on port 8182
[04/02/2022, 11:07:39] [HomebridgeAndroidTV] Finding online device : Salon 192.168.1.109 6466
192.168.1.109 Remote secureConnect
192.168.1.109 Receive : {"remoteConfigure":{"code1":637,"deviceInfo":{"model":"Freebox Player POP","vendor":"Freebox","unknown1":1,"unknown2":"9","packageName":"com.google.android.tv.remote.service","appVersion":"5.1.415324728"}}}
Create Remote {"remoteConfigure":{"code1":622,"deviceInfo":{"model":"Raspberry Pi 3 Model B Plus Rev 1.3","vendor":"Raspberry Pi Foundation","unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}
Sending {"remoteConfigure":{"code1":622,"deviceInfo":{"model":"Raspberry Pi 3 Model B Plus Rev 1.3","vendor":"Raspberry Pi Foundation","unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}
[04/02/2022, 11:07:40] [HomebridgeAndroidTV] Discover : {
host: '192.168.1.109',
name: 'Salon',
paired: true,
pairing: false,
powered: false,
online: true,
started: true,
volume_max: 0,
volume_current: 0,
volume_muted: false,
app_package_current: '',
type: 31
}
[04/02/2022, 11:07:40] [HomebridgeAndroidTV] Salon Registering device 6d6ced7e-811c-4eaf-bd16-eab88f3bc23c
[04/02/2022, 11:07:40] [HomebridgeAndroidTV] Salon Adding channel France Info c9af447c-7d14-429c-b651-15bed1dae33a
[04/02/2022, 11:07:40] [HomebridgeAndroidTV] Salon Adding application Netflix 28da844d-6495-4b50-b043-68f477e46c2e
[04/02/2022, 11:07:40] Salon 9C32 is running on port 36853.
[04/02/2022, 11:07:40] Please add [Salon 9C32] manually in Home app. Setup Code: XXX-XX-XXX
192.168.1.109 Receive : {"remoteError":{"value":true,"message":{"remoteConfigure":{"code1":622,"deviceInfo":{"model":"Raspberry Pi 3 Model B Plus Rev 1.3","vendor":"Raspberry Pi Foundation","unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}}}
[04/02/2022, 11:07:40] Error: Unhandled error. ({
error: RemoteError {
value: true,
message: RemoteMessage { remoteConfigure: [RemoteConfigure] }
}
})
at new NodeError (node:internal/errors:371:5)
at RemoteManager.emit (node:events:379:17)
at TLSSocket.<anonymous> (/usr/local/lib/node_modules/homebridge-androidtv/node_modules/androidtv-remote/dist/remote/RemoteManager.js:107:21)
at TLSSocket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:199:23)
[2/4/2022, 11:07:40 am] [SmartThings-v2] ERROR: uncaughtException: Unhandled error. ({
error: RemoteError {
value: true,
message: RemoteMessage { remoteConfigure: [RemoteConfigure] }
}
})
Error: Unhandled error. ({
error: RemoteError {
value: true,
message: RemoteMessage { remoteConfigure: [RemoteConfigure] }
}
})
at new NodeError (node:internal/errors:371:5)
at RemoteManager.emit (node:events:379:17)
at TLSSocket.<anonymous> (/usr/local/lib/node_modules/homebridge-androidtv/node_modules/androidtv-remote/dist/remote/RemoteManager.js:107:21)
at TLSSocket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:199:23)
[04/02/2022, 11:07:40] Got SIGTERM, shutting down Homebridge...
192.168.1.109 Remote Connection closed false
Start Remote Connect
192.168.1.109 Remote secureConnect
I finally managed to fix it by removing these files:
/var/lib/homebridge/persist/AccessoryInfo.<ACCESSORY_ID>.json
/var/lib/homebridge/persist/IdentifierCache.<ACCESSORY_ID>.json
/var/lib/homebridge/accessories/cachedAccessories
To find out the ACCESSORY_ID I've juste searched in files for the accessory name (grep -rnw '/var/lib/homebridge/persist/' -e '<ACCESSORY_NAME>'
)
I've restarted Homebridge and everything is back to normal now.
Update : same things happened again but this time I haven't done anything to provoke it, it just happened in the night for no reasons and now it's restarting again and again with the same error.
Tried my solution in the previous comment and removed the androidtv-config.json file, it just reinitialized my whole HomeKit config but did not solve the problem though...
Here's what happened when I tried the re-create the link:
[23/02/2022, 15:34:55] [HomebridgeAndroidTV] Discover : {
host: '192.168.1.109',
name: 'Salon',
paired: true,
pairing: false,
powered: false,
online: true,
started: true,
volume_max: 0,
volume_current: 0,
volume_muted: false,
app_package_current: '',
type: 31
}
[23/02/2022, 15:34:55] [HomebridgeAndroidTV] Salon Registering device 6d6ced7e-811c-4eaf-bd16-eab88f3bc23c
[23/02/2022, 15:34:55] [HomebridgeAndroidTV] Salon Adding key Power ffccbbd5-7b5c-42e8-a17e-95ea899f4c59
[23/02/2022, 15:34:55] Salon 9C32 is running on port 37869.
[23/02/2022, 15:34:55] Please add [Salon 9C32] manually in Home app. Setup Code: 031-45-154
192.168.1.109 Receive : {"remoteError":{"value":true,"message":{"remoteConfigure":{"code1":622,"deviceInfo":{"model":"Raspberry Pi 3 Model B Plus Rev 1.3","vendor":"Raspberry Pi Foundation","unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}}}
[23/02/2022, 15:34:55] Error: Unhandled error. ({
error: RemoteError {
value: true,
message: RemoteMessage { remoteConfigure: [RemoteConfigure] }
}
})
at new NodeError (node:internal/errors:371:5)
at RemoteManager.emit (node:events:379:17)
at TLSSocket.<anonymous> (/usr/local/lib/node_modules/homebridge-androidtv/node_modules/androidtv-remote/dist/remote/RemoteManager.js:107:21)
at TLSSocket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:199:23)
[2/23/2022, 3:34:55 pm] [SmartThings-v2] ERROR: uncaughtException: Unhandled error. ({
error: RemoteError {
value: true,
message: RemoteMessage { remoteConfigure: [RemoteConfigure] }
}
})
Error: Unhandled error. ({
error: RemoteError {
value: true,
message: RemoteMessage { remoteConfigure: [RemoteConfigure] }
}
})
at new NodeError (node:internal/errors:371:5)
at RemoteManager.emit (node:events:379:17)
at TLSSocket.<anonymous> (/usr/local/lib/node_modules/homebridge-androidtv/node_modules/androidtv-remote/dist/remote/RemoteManager.js:107:21)
at TLSSocket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:199:23)
[23/02/2022, 15:34:55] Got SIGTERM, shutting down Homebridge...
192.168.1.109 Remote Connection closed false
Start Remote Connect
192.168.1.109 Remote secureConnect
[23/02/2022, 15:35:00] [Hue] goodbye
[23/02/2022, 15:35:01] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[23/02/2022, 15:35:06] [HB Supervisor] Restarting Homebridge...
[23/02/2022, 15:35:06] [HB Supervisor] Starting Homebridge with extra flags: -I
[23/02/2022, 15:35:06] [HB Supervisor] Started Homebridge v1.4.0 with PID: 26821
[23/02/2022, 15:35:08] Loaded config.json with 6 accessories and 9 platforms.
[23/02/2022, 15:35:09] Loaded 8 cached accessories from cachedAccessories.
[23/02/2022, 15:35:09] ---
[23/02/2022, 15:35:13] Loaded plugin: homebridge-androidtv@2.2.0
[23/02/2022, 15:35:13] Registering platform 'homebridge-androidtv.HomebridgeAndroidTV'
In view of the problem reported, my question will be simple: do you use another network remote control? (A smartphone app for example.) If so, know that you cannot pair 2 devices: if you pair one, the other is unpaired.
In view of the problem reported, my question will be simple: do you use another network remote control? (A smartphone app for example.) If so, know that you cannot pair 2 devices: if you pair one, the other is unpaired.
I don't, this was the only thing I paired since I got my Android TV.
In your first log I do not. understand why this line can appear : 192.168.1.109 Receive : {"remoteConfigure":{"code1":637,"deviceInfo":{"model":"Freebox Player POP","vendor":"Freebox","unknown1":1,"unknown2":"9","packageName":"com.google.android.tv.remote.service","appVersion":"5.1.415324728"}}} Any idea ?
What's the content of your .homebridge/androidtv-config.json file please ?
What's the content of your .homebridge/androidtv-config.json file please ?
{
"devices": {
"192.168.1.109": {
"host": "192.168.1.109",
"port": 6466,
"name": "Salon",
"paired": true,
"type": 31,
"cert": {
"key": "-----BEGIN RSA PRIVATE KEY-----\r\nMIIEogIBAAKCAQEAvm+X2LcQQcn2K8lu2WbiC5D2jbr5F5Wu4UFsCUznO4tjw1Pp\r\nO2/ijB7XbmnoqIBFzh9jPqACYYTNGa0znH8o3QV8sCt1oSGlyrRq8C61Y4xdvlSq\r\njdU+Geq7o2+mXifWDgXJ6n+rvEZBshx9Gzkbp5/fEba4xelODJjbhWQAkTXWm4U/\r\n1VF5E0cPR/r2VK2R2B65trvQIVpma/9l62ZubE2XBoYMUfM0Dq5nTe4b/biV+ozu\r\nB6bawTRlTbFFJfWAe65Xx7hfO60DnSjFGFtwx1m9hVqU1lOWjr0R2x8rGveiOxhC\r\naPu1VkEheNMqKeRg4kwcVd5ouxdMeuHZ50WQMwIDAQABAoIBADZG6hmLe6e0n2Q1\r\nglGWYED5rTwSGWLed7yd/+PatmEjRmjqpqQZLJHRTIecygIUpVCtY4T66B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D9bpn1H1PL1ZMvMJy4i\r\nc1T+0U106Gzs9Hn3PmBueC2QNDjKJYgYjXQSTpDiZO+2v2udXdMGHkko/3Qy5tV2\r\nGerP7bH+//mnKkVpErIpR1xocvE4ovpwPCT8l3lkhmkP4GgZQvNVgjCSKeV0kobI\r\nnpwsqLTEirpD/hCgqjheO1kF8dImzwYomTl1\r\n-----END CERTIFICATE-----\r\n"
}
}
}
}
In your first log I do not. understand why this line can appear : 192.168.1.109 Receive : {"remoteConfigure":{"code1":637,"deviceInfo":{"model":"Freebox Player POP","vendor":"Freebox","unknown1":1,"unknown2":"9","packageName":"com.google.android.tv.remote.service","appVersion":"5.1.415324728"}}} Any idea ?
Well I didn't even know I had this app since it was in my pre-installed apps list. I've just disabled it and it seems to work now.
Thanks for the heads up about the multiple remote apps, I'm closing this issue.
Little update, the "com.google.android.tv.remote.service" app is actually the service that allows me to pair with Homebridge. Without it, the plugin won't even find my Android TV.
Disabling (since I can't uninstall) then enabling, clearing service data and re-pair Homebridge might have solved the issue (well at least it's working). Here my logs now :
192.168.1.109 Remote secureConnect
192.168.1.109 Receive : {"remoteConfigure":{"code1":639,"deviceInfo":{"model":"Freebox Player POP","vendor":"Freebox","unknown1":1,"unknown2":"9","packageName":"com.google.android.tv.remote.service","appVersion":"5.1.415324728"}}}
Create Remote {"remoteConfigure":{"code1":622,"deviceInfo":{"model":"Raspberry Pi 3 Model B Plus Rev 1.3","vendor":"Raspberry Pi Foundation","unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}
Sending {"remoteConfigure":{"code1":622,"deviceInfo":{"model":"Raspberry Pi 3 Model B Plus Rev 1.3","vendor":"Raspberry Pi Foundation","unknown1":1,"unknown2":"1","packageName":"androitv-remote","appVersion":"1.0.0"}}}
[23/02/2022, 19:45:40] [HomebridgeAndroidTV] Discover : {
host: '192.168.1.109',
name: 'Salon',
paired: true,
pairing: false,
powered: false,
online: true,
started: true,
volume_max: 0,
volume_current: 0,
volume_muted: false,
app_package_current: '',
type: 31
}
[23/02/2022, 19:45:40] [HomebridgeAndroidTV] Salon Registering device 6d6ced7e-811c-4eaf-bd16-eab88f3bc23c
[23/02/2022, 19:45:40] [HomebridgeAndroidTV] Salon Adding channel L'Equipe eaae98bf-978f-44b8-94ba-976fe1b4fc39
...
[23/02/2022, 19:45:41] Salon 9C32 is running on port 38435.
[23/02/2022, 19:45:41] Please add [Salon 9C32] manually in Home app. Setup Code: 031-45-154
192.168.1.109 Receive : {"remoteSetActive":{}}
Create Remote {"remoteSetActive":{"active":622}}
Sending {"remoteSetActive":{"active":622}}
192.168.1.109 Receive : {"remoteImeKeyInject":{"appInfo":{"appPackage":"com.android.tv.settings"}}}
192.168.1.109 Receive : {"remoteStart":{"started":true}}
[23/02/2022, 19:45:41] [HomebridgeAndroidTV] Salon powered true
192.168.1.109 Receive : {"remoteSetVolumeLevel":{"unknown1":3,"unknown2":6,"playerModel":"Freebox Player POP","unknown4":2,"unknown5":0,"volumeMax":15,"volumeLevel":7,"volumeMuted":false}}
[23/02/2022, 19:45:41] [HomebridgeAndroidTV] Salon Device set Volume 47
An unhandled error makes Homebridge restart over and over again.