node-red-contrib-samsung-tv-control icon indicating copy to clipboard operation
node-red-contrib-samsung-tv-control copied to clipboard

Does this node support different IP ranges between NR and the TV?

Open Just-another-pleb opened this issue 2 years ago • 1 comments

I have read a few posts and recent events has raised the question for me:

Say my TV is on 10.0.0.2 and node-red is on 192.168.5.5 and they are connected by a router.

Will it work?

Just-another-pleb avatar Nov 15 '22 05:11 Just-another-pleb

Slight update - and sorry. Yes it does support different networks.

BUT!

There does seem to be a problem.

More information: I am still not sure if it is the (managed) switch causing it or not. It works through the router ok - maybe more tests needed.

But if I have the TV on one of the networks off my (managed) switch and try to control it from another computer on another network on the (managed) switch with all traffic going through the ROUTER I get/see this happen in Node-Red: (Extract from the log)

TV is off or unavailable
16 Nov 17:26:26 - [red] Uncaught Exception:
16 Nov 17:26:26 - [error] Error: Error send Key
    at /home/pi/.node-red/node_modules/samsung-tv-control/lib/samsung.js:55:23
    at WebSocket.<anonymous> (/home/pi/.node-red/node_modules/samsung-tv-control/lib/samsung.js:289:17)
    at WebSocket.emit (events.js:314:20)
    at emitErrorAndClose (/home/pi/.node-red/node_modules/samsung-tv-control/node_modules/ws/lib/websocket.js:895:13)
    at ClientRequest.<anonymous> (/home/pi/.node-red/node_modules/samsung-tv-control/node_modules/ws/lib/websocket.js:752:5)
    at ClientRequest.emit (events.js:314:20)
    at TLSSocket.socketErrorListener (_http_client.js:427:9)
    at TLSSocket.emit (events.js:314:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Unit entered failed state.
nodered.service: Failed with result 'exit-code'.
nodered.service: Service hold-off time over, scheduling restart.

Observations: The TV is ONLINE and I can PING it from the computer running NR.

But sorry: most of that is WAY above my skills.

But I hope it does help someone.

Just-another-pleb avatar Nov 16 '22 06:11 Just-another-pleb