Hypnos3/node-red-contrib-cast

loosing connection

Closed this issue · 7 comments

when ever I send a cast command to the cast node, the dashboard looses connection.

I have a dropdown list with radiostations and when I select one of the those nodered looses connection.
afterwards its starts casting.

here is a flow example
[{"id":"760d72ef.8feebc","type":"ui_dropdown","z":"cc5bd9e5.26e4a8","name":"","label":"","tooltip":"","place":"vælg musik","group":"26e9c015.b991a8","order":4,"width":5,"height":1,"passthru":true,"multiple":false,"options":[{"label":"","value":"Ingen","type":"str"},{"label":"","value":"P1","type":"str"},{"label":"","value":"P3","type":"str"},{"label":"","value":"P4 københavn","type":"str"},{"label":"","value":"P4 sjælland","type":"str"},{"label":"","value":"P6 beat","type":"str"},{"label":"","value":"Radio4","type":"str"}],"payload":"","topic":"","x":260,"y":290,"wires":[["3b968e0.63cf4f2"]]},{"id":"3b968e0.63cf4f2","type":"switch","z":"cc5bd9e5.26e4a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Ingen","vt":"str"},{"t":"eq","v":"P1","vt":"str"},{"t":"eq","v":"P3","vt":"str"},{"t":"eq","v":"P4 københavn","vt":"str"},{"t":"eq","v":"P4 sjælland","vt":"str"},{"t":"eq","v":"P6 beat","vt":"str"},{"t":"eq","v":"Radio4","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":400,"y":330,"wires":[["53d91dd8.67b924"],["e8422b91.628f8"],["9163cdba.a3d928"],["867827c1.5b9c4"],["e24c66fb.a30be"],["34e2401e.6a976"],["3bd57781.60f08"]]},{"id":"a21f1807.41d7f8","type":"cast-to-client","z":"cc5bd9e5.26e4a8","name":"","url":"","contentType":"","message":"","language":"en","ip":"192.168.0.28","port":"8009","volume":"","x":920,"y":360,"wires":[["fba1eb3.2515918"]]},{"id":"53d91dd8.67b924","type":"change","z":"cc5bd9e5.26e4a8","name":"stop","rules":[{"t":"set","p":"duration","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":280,"wires":[["a21f1807.41d7f8"]]},{"id":"fba1eb3.2515918","type":"debug","z":"cc5bd9e5.26e4a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1100,"y":510,"wires":[]},{"id":"867827c1.5b9c4","type":"change","z":"cc5bd9e5.26e4a8","name":"P4 københavn","rules":[{"t":"set","p":"url","pt":"msg","to":"http://live-icy.dr.dk/A/A08H.mp3","tot":"str"},{"t":"set","p":"contentType","pt":"msg","to":"audio/mp4","tot":"str"},{"t":"set","p":"contentTitle","pt":"msg","to":"P4 københavn","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":400,"wires":[["a21f1807.41d7f8"]]},{"id":"7dbc88b3.54c2b","type":"ui_slider","z":"cc5bd9e5.26e4a8","name":"","label":"","tooltip":"","group":"26e9c015.b991a8","order":2,"width":5,"height":1,"passthru":false,"outs":"all","topic":"","min":0,"max":"100","step":"1","x":250,"y":230,"wires":[["6ffa0c8e.dd79d4"]]},{"id":"6ffa0c8e.dd79d4","type":"change","z":"cc5bd9e5.26e4a8","name":"Volume test","rules":[{"t":"set","p":"volume","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":230,"wires":[["a21f1807.41d7f8"]]},{"id":"e8422b91.628f8","type":"change","z":"cc5bd9e5.26e4a8","name":"P1","rules":[{"t":"set","p":"url","pt":"msg","to":"http://live-icy.dr.dk/A/A03H.mp3","tot":"str"},{"t":"set","p":"contentType","pt":"msg","to":"audio/mp4","tot":"str"},{"t":"set","p":"contentTitle","pt":"msg","to":"P1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":320,"wires":[["a21f1807.41d7f8"]]},{"id":"9163cdba.a3d928","type":"change","z":"cc5bd9e5.26e4a8","name":"P3","rules":[{"t":"set","p":"url","pt":"msg","to":"http://live-icy.dr.dk/A/A05H.mp3","tot":"str"},{"t":"set","p":"contentType","pt":"msg","to":"audio/mp4","tot":"str"},{"t":"set","p":"contentTitle","pt":"msg","to":"P3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":360,"wires":[["a21f1807.41d7f8"]]},{"id":"e24c66fb.a30be","type":"change","z":"cc5bd9e5.26e4a8","name":"P4 sjælland","rules":[{"t":"set","p":"url","pt":"msg","to":"http://live-icy.dr.dk/A/A11H.mp3","tot":"str"},{"t":"set","p":"contentType","pt":"msg","to":"audio/mp4","tot":"str"},{"t":"set","p":"contentTitle","pt":"msg","to":"P4 sjælland","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":440,"wires":[["a21f1807.41d7f8"]]},{"id":"34e2401e.6a976","type":"change","z":"cc5bd9e5.26e4a8","name":"P6 beat","rules":[{"t":"set","p":"url","pt":"msg","to":"http://live-icy.dr.dk/A/A29H.mp3","tot":"str"},{"t":"set","p":"contentType","pt":"msg","to":"audio/mp4","tot":"str"},{"t":"set","p":"contentTitle","pt":"msg","to":"P6 beat","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":480,"wires":[["a21f1807.41d7f8"]]},{"id":"3bd57781.60f08","type":"change","z":"cc5bd9e5.26e4a8","name":"Radio4","rules":[{"t":"set","p":"url","pt":"msg","to":"https://netradio.radio4.dk/radio4","tot":"str"},{"t":"set","p":"contentType","pt":"msg","to":"audio/mp4","tot":"str"},{"t":"set","p":"contentTitle","pt":"msg","to":"Radio4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":520,"wires":[["a21f1807.41d7f8"]]},{"id":"dc063d97.e70ed","type":"comment","z":"cc5bd9e5.26e4a8","name":"Radio køkken","info":"","x":130,"y":190,"wires":[]},{"id":"694ebabd.5adedc","type":"comment","z":"cc5bd9e5.26e4a8","name":"Doorbell","info":"","x":120,"y":20,"wires":[]},{"id":"e63fdd78.1a47c8","type":"inject","z":"cc5bd9e5.26e4a8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":90,"wires":[["e028e26f.e58f28","feba8460.90eeb","11998957.d87e47"]]},{"id":"333ec6ba.9c6ea2","type":"change","z":"cc5bd9e5.26e4a8","name":"doorbell ring","rules":[{"t":"set","p":"url","pt":"msg","to":"https://www.zapsplat.com/wp-content/uploads/2015/sound-effects-three/household_door_bell_ding_dong_single.mp3","tot":"str"},{"t":"set","p":"contentType","pt":"msg","to":"audio/mp4","tot":"str"},{"t":"set","p":"contentTitle","pt":"msg","to":"P1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":90,"wires":[["a21f1807.41d7f8"]]},{"id":"b66042c6.31eae","type":"change","z":"cc5bd9e5.26e4a8","name":"barking","rules":[{"t":"set","p":"url","pt":"msg","to":"https://www.zapsplat.com/wp-content/uploads/2015/sound-effects-martinimeniscus/martinimeniscus_animals_dog_barking.mp3","tot":"str"},{"t":"set","p":"contentType","pt":"msg","to":"audio/mp4","tot":"str"},{"t":"set","p":"contentTitle","pt":"msg","to":"P1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":130,"wires":[["a21f1807.41d7f8"]]},{"id":"e028e26f.e58f28","type":"delay","z":"cc5bd9e5.26e4a8","name":"","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":410,"y":130,"wires":[["b66042c6.31eae"]]},{"id":"4e79c45a.f12dd4","type":"ui_button","z":"cc5bd9e5.26e4a8","name":"radio icon","group":"26e9c015.b991a8","order":3,"width":1,"height":1,"passthru":false,"label":"","tooltip":"","color":"#3698cd","bgcolor":"#17334d","icon":"radio","payload":"","payloadType":"str","topic":"","x":120,"y":290,"wires":[[]]},{"id":"b69ee8b.d2fea98","type":"ui_button","z":"cc5bd9e5.26e4a8","name":"speaker icon","group":"26e9c015.b991a8","order":1,"width":1,"height":1,"passthru":false,"label":"","tooltip":"","color":"#3698cd","bgcolor":"#17334d","icon":"speaker","payload":"","payloadType":"str","topic":"","x":110,"y":230,"wires":[[]]},{"id":"feba8460.90eeb","type":"change","z":"cc5bd9e5.26e4a8","name":"Volume 80","rules":[{"t":"set","p":"volume","pt":"msg","to":"80","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":90,"wires":[["333ec6ba.9c6ea2"]]},{"id":"38ee7638.95f062","type":"change","z":"cc5bd9e5.26e4a8","name":"Volume 50","rules":[{"t":"set","p":"volume","pt":"msg","to":"50","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":170,"wires":[["a21f1807.41d7f8"]]},{"id":"11998957.d87e47","type":"delay","z":"cc5bd9e5.26e4a8","name":"","pauseType":"delay","timeout":"20","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":410,"y":170,"wires":[["38ee7638.95f062"]]},{"id":"26e9c015.b991a8","type":"ui_group","name":"Køkken højtaler","tab":"33f57dc0.49190a","order":1,"disp":true,"width":"6","collapse":false},{"id":"33f57dc0.49190a","type":"ui_tab","name":"Radio","icon":"radio","order":5,"disabled":false,"hidden":false}]

Hi did you solved the issue ?

no unfortunately not

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

Still a problem.
From node-red log:
28 Sep 21:12:21 - [debug] [cast-to-client:a21f1807.41d7f8] getting message { payload: #033[32m'P6 beat'#033[39m, socketid: #033[32m'Nx6nmjtP5P6Ik1sVAAAB'#033[39m, _msgid: #033[32m'98559ecb.c907e'#033[39m, url: #033[32m'http://live-icy.dr.dk/A/A29H.mp3'#033[39m, contentType: #033[32m'audio/mp4'#033[39m, contentTitle: #033[32m'P6 beat'#033[39m } Sep 28 21:12:21 raspberrypi Node-RED[31064]: 28 Sep 21:12:21 - [debug] [cast-to-client:a21f1807.41d7f8] { url: #033[32m'http://live-icy.dr.dk/A/A29H.mp3'#033[39m, contentType: #033[32m'audio/mp4'#033[39m, contentTitle: #033[32m'P6 beat'#033[39m, language: #033[32m'en'#033[39m, ip: #033[32m'192.168.0.4'#033[39m, port: #033[32m'8009'#033[39m, topic: #033[32m'cast'#033[39m, message: #033[32m'P6 beat'#033[39m, delay: #033[33m250#033[39m, media: { contentId: #033[32m'http://live-icy.dr.dk/A/A29H.mp3'#033[39m, contentType: #033[32m'audio/mp4'#033[39m, contentTitle: #033[32m'P6 beat'#033[39m } } Sep 28 21:12:21 raspberrypi Node-RED[31064]: 28 Sep 21:12:21 - [debug] [cast-to-client:a21f1807.41d7f8] initialize playing Sep 28 21:12:21 raspberrypi Node-RED[31064]: 28 Sep 21:12:21 - [debug] [cast-to-client:a21f1807.41d7f8] connect to client { url: #033[32m'http://live-icy.dr.dk/A/A29H.mp3'#033[39m, contentType: #033[32m'audio/mp4'#033[39m, contentTitle: #033[32m'P6 beat'#033[39m, language: #033[32m'en'#033[39m, ip: #033[32m'192.168.0.4'#033[39m, port: #033[32m'8009'#033[39m, topic: #033[32m'cast'#033[39m, message: #033[32m'P6 beat'#033[39m, delay: #033[33m250#033[39m, media: { contentId: #033[32m'http://live-icy.dr.dk/A/A29H.mp3'#033[39m, contentType: #033[32m'audio/mp4'#033[39m, contentTitle: #033[32m'P6 beat'#033[39m }, host: #033[32m'192.168.0.4'#033[39m } Sep 28 21:12:21 raspberrypi Node-RED[31064]: 28 Sep 21:12:21 - [debug] [cast-to-client:a21f1807.41d7f8] launchDefCallback Sep 28 21:12:21 raspberrypi Node-RED[31064]: 28 Sep 21:12:21 - [debug] [cast-to-client:a21f1807.41d7f8] checkVolume { url: #033[32m'http://live-icy.dr.dk/A/A29H.mp3'#033[39m, contentType: #033[32m'audio/mp4'#033[39m, contentTitle: #033[32m'P6 beat'#033[39m, language: #033[32m'en'#033[39m, ip: #033[32m'192.168.0.4'#033[39m, port: #033[32m'8009'#033[39m, topic: #033[32m'cast'#033[39m, message: #033[32m'P6 beat'#033[39m, delay: #033[33m250#033[39m, media: { contentId: #033[32m'http://live-icy.dr.dk/A/A29H.mp3'#033[39m, contentType: #033[32m'audio/mp4'#033[39m, contentTitle: #033[32m'P6 beat'#033[39m }, host: #033[32m'192.168.0.4'#033[39m, rejectUnauthorized: #033[31mfalse#033[39m } Sep 28 21:12:21 raspberrypi Node-RED[31064]: 28 Sep 21:12:21 - [debug] [cast-to-client:a21f1807.41d7f8] loading player with media='{ contentId: #033[32m'http://live-icy.dr.dk/A/A29H.mp3'#033[39m, contentType: #033[32m'audio/mp4'#033[39m, contentTitle: #033[32m'P6 beat'#033[39m, streamType: #033[32m'BUFFERED'#033[39m }' streamType=BUFFERED Sep 28 21:12:21 raspberrypi Node-RED[31064]: 28 Sep 21:12:21 - [debug] [cast-to-client:a21f1807.41d7f8] onStatus { applications: [ { appId: #033[32m'CC1AD845'#033[39m, appType: #033[32m'WEB'#033[39m, displayName: #033[32m'Default Media Receiver'#033[39m, iconUrl: #033[32m''#033[39m, isIdleScreen: #033[31mfalse#033[39m, launchedFromCloud: #033[31mfalse#033[39m, namespaces: #033[36m[Array]#033[39m, sessionId: #033[32m'cc58be06-5544-4407-8302-cc1c1513092a'#033[39m, statusText: #033[32m'Casting: P6 beat'#033[39m, transportId: #033[32m'cc58be06-5544-4407-8302-cc1c1513092a'#033[39m, universalAppId: #033[32m'CC1AD845'#033[39m } ], userEq: { high_shelf: { frequency: #033[33m4500#033[39m, gain_db: #033[33m0#033[39m, quality: #033[33m0.707#033[39m }, low_shelf: { frequency: #033[33m150#033[39m, gain_db: #033[33m2#033[39m, quality: #033[33m0.707#033[39m }, max_peaking_eqs: #033[33m0#033[39m, peaking_eqs: [] }, volume: { controlType: #033[32m'master'#033[39m, level: #033[33m0.3199999928474426#033[39m, muted: #033[31mfalse#033[39m, stepInterval: #033[33m0.019999999552965164#033[39m } } Sep 28 21:12:22 raspberrypi Node-RED[31064]: 28 Sep 21:12:22 - [red] Uncaught Exception: Sep 28 21:12:22 raspberrypi Node-RED[31064]: 28 Sep 21:12:22 - TypeError: node.error is not a function Sep 28 21:12:22 raspberrypi Node-RED[31064]: at errorHandler (/home/pi/.node-red/node_modules/node-red-contrib-cast/cast-to-client.js:52:10) Sep 28 21:12:22 raspberrypi Node-RED[31064]: at getSpeechUrl (/home/pi/.node-red/node_modules/node-red-contrib-cast/cast-to-client.js:192:9) Sep 28 21:12:22 raspberrypi Node-RED[31064]: at Timeout._onTimeout (/home/pi/.node-red/node_modules/node-red-contrib-cast/cast-to-client.js:836:33) Sep 28 21:12:22 raspberrypi Node-RED[31064]: at listOnTimeout (internal/timers.js:556:17) Sep 28 21:12:22 raspberrypi Node-RED[31064]: at processTimers (internal/timers.js:497:7) Sep 28 21:12:22 raspberrypi systemd[1]: nodered.service: Main process exited, code=exited, status=1/FAILURE Sep 28 21:12:22 raspberrypi systemd[1]: nodered.service: Failed with result 'exit-code'.

28 Sep 21:35:02 - [red] Uncaught Exception: 28 Sep 21:35:02 - TypeError: node.error is not a function at errorHandler (/home/pi/.node-red/node_modules/node-red-contrib-cast/cast-to-client.js:52:10) at getSpeechUrl (/home/pi/.node-red/node_modules/node-red-contrib-cast/cast-to-client.js:192:9) at Timeout._onTimeout (/home/pi/.node-red/node_modules/node-red-contrib-cast/cast-to-client.js:836:33) at listOnTimeout (internal/timers.js:556:17) at processTimers (internal/timers.js:497:7) nodered.service: Main process exited, code=exited, status=1/FAILURE

Experiencing the same issue. Larger mp3 files cause node-red stall for a while. Therefore it's also impossible to stop casting as node-red won't accept requests.