neilpatel121 / homebridge-skyq-tvremote

Apache License 2.0
10 stars 3 forks source link

Populate device details from API in home app #15

Closed benfysh closed 3 years ago

benfysh commented 3 years ago

Is your feature request related to a problem? Please describe: Feature request to populate the device details within the home app based on the individual box details

Describe the solution you'd like:

Use getSystemInformation from sky-q node module. Suggested items to use:

Manufacturer: "manufacturer" : "Sky", Serial Number: "serialNumber" : "0488XXXX74 0", Model: "deviceType" : "GATEWAYSTB",

SmolSoftBoi commented 3 years ago

Could you test v1.1.2-beta.1 please?

benfysh commented 3 years ago

That is getting this error:

[17/04/2021, 07:15:33] TypeError: Cannot destructure property 'key' of 'undefined' as it is undefined.
    at SkyQ._getSystemInformation (/usr/local/lib/node_modules/homebridge-skyq-tvremote/node_modules/sky-q/lib/SkyQ.js:20:28)
    at SkyTVPlugin.publishExternalAccessory (/usr/local/lib/node_modules/homebridge-skyq-tvremote/src/platform.ts:123:14)
    at /usr/local/lib/node_modules/homebridge-skyq-tvremote/src/platform.ts:44:14
    at Array.forEach (<anonymous>)
    at new SkyTVPlugin (/usr/local/lib/node_modules/homebridge-skyq-tvremote/src/platform.ts:41:22)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:440:40
    at Array.forEach (<anonymous>)
    at Server.loadPlatforms (/usr/local/lib/node_modules/homebridge/src/server.ts:372:27)
    at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:159:29)
Starting to advertise 'Office TV 95B8' using ciao backend!
[17/04/2021, 07:15:33] Office TV 95B8 is running on port 37071.
[17/04/2021, 07:15:33] Please add [Office TV 95B8] manually in Home app. Setup Code: 031-54-157
[17/04/2021, 07:15:33] [BroadlinkRM] Office TV getSwitchState: 0
[17/04/2021, 07:15:33] Got SIGTERM, shutting down Homebridge...
[17/04/2021, 07:15:33] [skyq-tvremote] [Sky Q] The sky box is in standby
[17/04/2021, 07:15:33] ERR_SERVER_CLOSED: Cannot send packets on a closed mdns server!
    at MDNSServer.assertBeforeSend (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/MDNSServer.ts:403:13)
    at MDNSServer.sendOnAllNetworksForService (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/MDNSServer.ts:302:10)
    at MDNSServer.sendQueryBroadcast (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/MDNSServer.ts:263:26)
    at Prober.sendProbeRequest (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/responder/Prober.ts:165:17)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
SmolSoftBoi commented 3 years ago

Could you test v1.1.2-beta.2 please?

benfysh commented 3 years ago

No crashes and plugin is working as expected, thanks 👍

I notice that you have used "model" as opposed to "deviceType" from the response to populate that Model element in the home app. This is showing Q140.000.37.00L (58j9n5g) for all box types as opposed to GATEWAYSTB for the main or MULTIROOMSTB for the mini boxes.

SmolSoftBoi commented 3 years ago

Good catch, updated to use deviceType instead, could you test v1.1.2-beta.3 please?

benfysh commented 3 years ago

Working as expected and displaying expected info in home app. Thanks again for implementing :)