MrAsterisco / homebridge-hisense-tv

A Homebridge plugin to control RemoteNow-compatible HiSense TVs.
MIT License
18 stars 8 forks source link

Switching Input Source throws error #57

Closed LeLunZ closed 1 month ago

LeLunZ commented 2 months ago

Describe The Bug: Switching Input throws error

To Reproduce: Use Homekit to switch the input source.

Expected behavior: I guess shouldn't throw an error

Logs:

[5/17/2024, 8:32:45 PM] [homebridge-hisense-tv-remotenow] Characteristic 'Active Identifier': SET handler returned write response value, though the characteristic doesn't support write response. See https://homebridge.io/w/JtMGR for more info.
[5/17/2024, 8:32:45 PM] [homebridge-hisense-tv-remotenow] Error: 
    at ActiveIdentifier.Characteristic.characteristicWarning (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3011:105)
    at /var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2627:22
    at /var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:15:18
    at /home/homebridge/homebridge-hisense-tv/src/platformAccessory.ts:221:9
    at /home/homebridge/homebridge-hisense-tv/src/platformAccessory.ts:432:7
    at PythonShell._endCallback (/home/homebridge/homebridge-hisense-tv/node_modules/python-shell/index.ts:288:20)
    at terminateIfNeeded (/home/homebridge/homebridge-hisense-tv/node_modules/python-shell/index.ts:210:39)
    at ChildProcess.<anonymous> (/home/homebridge/homebridge-hisense-tv/node_modules/python-shell/index.ts:182:13)
    at ChildProcess.emit (node:events:518:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)

Plugin Config: Not relevant

Environment:

LeLunZ commented 2 months ago

Seems like Homebridge changed the way how specific callbacks work. In this case CharacteristicSetCallback sometimes support two input arguments, sometimes only an error is allowed.

I will start looking through the homebridge breaking changes of the last versions and update everything else that seems important.

LeLunZ commented 1 month ago

Fixed in future version 2.0.2 (currently available as 2.0.2-beta.X)