iobroker-community-adapters / ioBroker.samsung

Samsung Remote Adapter for ioBroker
MIT License
9 stars 10 forks source link

SamsungHJ API: Send a Key to TV succesfull but error message in LOG #210

Open marian-t-web-de opened 2 weeks ago

marian-t-web-de commented 2 weeks ago

No existing issues.

Description

SamsungHJ API: after succesfull sending a Key to TV error message in LOG appears:

image

Reproduction instruction

Start iobroker samsung-community adapter, send a KEY to TV using HJ API. KEY is proceeded but in iobroker log an error appears (see above): Error executing command: KEY_MUTE: cb is not defined

JS-controller version

6.0.9

Node version

18.19.0

marian-t-web-de commented 2 weeks ago

Analysis: in adapter v.0.6.0 main.js module, using SamsungHJ API by sending a KEY in async function main() (line 359) following function will be called:

remote = { powerKey: 'KEY_POWER', send: (cmd, cn) => {
                    remoteHJ.sendKey(cmd);
                     cb && cb();
                  } };

Callback(?) cb/cb() is there not being defined. Changing in the call to: send: (cmd, cb) creates no more errors, KEY stays proceeded.

@Apollon77 if You confirm I'll include the change to last PR to pull it in v.6.0.1

Apollon77 commented 2 weeks ago

Yes that seems like a typo ;-) "cn" vs "cb"

mcm1957 commented 2 weeks ago

fixed 0.6.1

mcm1957 commented 2 weeks ago

@marian-t-web-de Please retest with 0.6.1