Hypnos3/node-red-contrib-cast

"cast" node crashing Node Red

Closed this issue · 2 comments

When using the "Cast" node to display a camera feed to a google nest hub, Node Red will crash with the following error message:-

29 Jun 11:33:11 - [error] TypeError: node.error is not a function
at errorHandler (/opt/node_modules/node-red-contrib-cast/cast-to-client.js:52:10)
at getSpeechUrl (/opt/node_modules/node-red-contrib-cast/cast-to-client.js:192:9)
at Timeout._onTimeout (/opt/node_modules/node-red-contrib-cast/cast-to-client.js:836:33)
at listOnTimeout (node:internal/timers:561:11)
at processTimers (node:internal/timers:502:7)
[11:33:11] WARNING: Node-RED crashed, halting add-on
[11:33:11] INFO: Node-RED stoped, restarting...
s6-rc: info: service legacy-services: stopping
[11:33:11] INFO: Node-RED stoped, restarting...
s6-svwait: fatal: supervisor died
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
[11:33:11] INFO: nginx stoped, restarting...

The camera stream displays successfully

Below is the Node red sequence that I am using:-

[{"id":"5a7920642c2cae66","type":"change","z":"f664ee95a966f57d","name":"MotionEye","rules":[{"t":"set","p":"ip","pt":"msg","to":"192.168.3.202","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"http://192.168.3.200:8081","tot":"str"},{"t":"set","p":"contentType","pt":"msg","to":"image/jpeg","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":280,"wires":[["57edb06e944ca0b3"]]},{"id":"57edb06e944ca0b3","type":"cast-to-client","z":"f664ee95a966f57d","name":"","url":"","contentType":"","message":"","language":"en","ip":"","port":"","volume":"","x":870,"y":260,"wires":[[]]}]

SW/HW info
Home Assistant Core 2022.6.7
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.2
Node-RED - Current version: 12.0.2

Running on a Intel NUC i5, 8GB RAM

Switched to using cast-v2. Now no problem

For my case, removing msg.message that gets sent to the cast node fixed the issue. That attribute was copied from some example and I don't need it for casting media