estbeetoo / node-red-contrib-kodi

Node-RED plugin (node) to communicate with Kodi/XBMC
Other
3 stars 4 forks source link

Node Red quits when TV connected (after start Kodi on TV) #18

Open Barabba11 opened 4 months ago

Barabba11 commented 4 months ago

Hi, I hope the log helps, NR quitted when I've started Kodi 21 on TV, it got connected, propbably TV asked for something and that crashed the module. Thanks for support

6 Jul 13:25:31 - [error] TypeError: Cannot read properties of null (reading 'connected') at C:\Users\Admin.node-red\node_modules\node-red-contrib-kodi\kodi.js:154:21 at constructor. (C:\Users\Admin.node-red\node_modules\node-red-contrib-kodi\kodi.js:53:21) at constructor. (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:235:15) at C:\Users\Admin.node-red\node_modules\lodash\index.js:2874:23 at C:\Users\Admin.node-red\node_modules\lodash\index.js:3049:15 at Function. (C:\Users\Admin.node-red\node_modules\lodash\index.js:3346:13) at constructor.emit (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:233:6) at constructor._onEnter (C:\Users\Admin.node-red\node_modules\node-red-contrib-kodi\lib\connectionFSM.js:91:34) at constructor.transition (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:433:27) at Fsm. [as transition] (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:580:60)

Barabba11 commented 4 months ago

I got this error too 16 Jul 14:24:09 - [red] Uncaught Exception: 16 Jul 14:24:09 - [error] TypeError: Cannot read properties of null (reading 'connected') at C:\Users\Admin.node-red\node_modules\node-red-contrib-kodi\kodi.js:154:21 at constructor. (C:\Users\Admin.node-red\node_modules\node-red-contrib-kodi\kodi.js:53:21) at constructor. (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:235:15) at C:\Users\Admin.node-red\node_modules\lodash\index.js:2874:23 at C:\Users\Admin.node-red\node_modules\lodash\index.js:3049:15 at Function. (C:\Users\Admin.node-red\node_modules\lodash\index.js:3346:13) at constructor.emit (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:233:6) at constructor._onEnter (C:\Users\Admin.node-red\node_modules\node-red-contrib-kodi\lib\connectionFSM.js:91:34) at constructor.transition (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:433:27) at Fsm. [as transition] (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:580:60)

Barabba11 commented 4 months ago

this exit happened closing kodi. It doesn't crash every time it exit. Starting Kodi producing no messages, unfortunately, there is a way to know about that? Thanks 16 Jul 15:03:59 - [error] TypeError: Cannot read properties of null (reading 'connected') at C:\Users\Admin.node-red\node_modules\node-red-contrib-kodi\kodi.js:154:21 at constructor. (C:\Users\Admin.node-red\node_modules\node-red-contrib-kodi\kodi.js:53:21) at constructor. (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:235:15) at C:\Users\Admin.node-red\node_modules\lodash\index.js:2874:23 at C:\Users\Admin.node-red\node_modules\lodash\index.js:3049:15 at Function. (C:\Users\Admin.node-red\node_modules\lodash\index.js:3346:13) at constructor.emit (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:233:6) at constructor._onEnter (C:\Users\Admin.node-red\node_modules\node-red-contrib-kodi\lib\connectionFSM.js:91:34) at constructor.transition (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:433:27) at Fsm. [as transition] (C:\Users\Admin.node-red\node_modules\machina\lib\machina.js:580:60)

Barabba11 commented 4 months ago

it looks the problem comes with effort of the script to show if it connected or not. This is not important for working, can you please eventually remove that part of code? Thanks

Barabba11 commented 4 months ago

If not used on TV kodi goes unactive, probably for power safe reasons, so I need to keep it active sending commands. Well pressin up button on remote is enough to revive kodi, bau at that time I've received an error (which didn't crash NR) 16 Jul 18:28:00 - [error] [kodi-out:Kodi TV Tav5] error calling send: TypeError: Cannot read properties of undefined (reading 'apply') 16 Jul 18:28:00 - [error] [kodi-out:Kodi TV Tav5] send error: TypeError: Cannot read properties of undefined (reading 'apply') strange, nothing was sent. I've noticed that kodi when start on my phone (I was doing experiments, if NR is active it starts slideshow. Your module is remembering last command and send to kodi when it returns online?

Barabba11 commented 4 months ago

Probably this error is coming when for some reasons Kodi stopped playng slideshow, maybe timeout error calling send: TypeError: Cannot read properties of undefined (reading 'apply')

Barabba11 commented 3 months ago

Another issue aout this module, when odi is not available the module stores all commands in queue, and when Kodi returns available it slams all the queue in a while. This is no sense, it may remember for example the last command only. I would like to ask limit the queue to the last command, and create an option to avoid remember anything. Thanks