[RELEASE] cast-web v1.2.1 - Chromecast Integration (EDGE Driver discussion begins in post 1668)

No, sadly not anymore. Can you let me know which platform you’re on, device, os version. I’ll move this to github. Since some people have already reported issues with windows server and its firewall.

Oh alright… I’ll investigate if the new generator is broken. Thanks for letting me know :slight_smile:

Yes. Google Assistant is optional. Cast-web-api will communicate with all of your cast devices just fine. Only the google assistant brodacst features won’t be available to you.

-g installs any npm package globally. That means if you’re not in the directory you installed cast-web-api to, you can still run the command cast-web-api and it’ll work. So no, it’s not needed, as long as you are either always in the directory you installed it to, or always provide the full path to the directory.

If it works for you I wouldn’t change it.

Hmm… have you tried it with sudo and the unsafe-perm flag? That should get rid of most errors. Anyhow. As long as it works for you, I wouldn’t change it :slight_smile:

Hey Johan, the red lines are expected and can be ignored.

The lines after unexpected end of json input however are new to me. They seem to originate in the cast-device lib. And for once it doesn’t crash the whole app. This could be fixed with some other issues I’m having with this lib.
Are there any noticeable issues you’re experiencing because of this though? If not, I’d just ignore it entirely.

The default port is 3000, correct? If so, that would be the only thing running on that port (this VM doesn’t really do a whole lot - just this an my Unifi controller). It was working before @3000. Is it potentially because I need to delete my crontab entry?

mdns is also just used for discovery. But yes this could be the issue here. You cannot manually connect devices to the api if they’re not discovered by the mdns library. Maybe the new mdns library doesn’t work across vlans.

I don’t really have that much time on my hand right now. But I’ll open an issue on github for this. Let me know if you found out more about this issue.

Update:
Issue is created: Device discovery not working on separate vlans · Issue #105 · vervallsweg/cast-web-api · GitHub

Ohhhhh… I see. Can you post the output of crontab -e and sudo crontab -e?

crontab -e shows this:

sudo crontab -e just shows the blank crontab file with the instructions.

should I just remove those lines, then re-add them after I’ve updated?

Just delete the lower line. Change the first line to: @reboot /usr/local/bin/forever start /usr/local/bin/cast-web-api

Save and restart your device with sudo reboot . After that try forever list . If that doesn’t fix it let me know :slight_smile:

Awesome, that did it. Not sure how I missed the “start” command lol. Thank you!

1 Like

I am trying to rebuild my pi and I’m not able to get the broadcast feature to work anymore because it can’t find the google assistant module. I tried the things you listed on the webpage but they didn’t help. Anything else to try?

I’m getting the following error when launching:

GoogleAssistant require error: Error: The gRPC binary module was not installed. This may be fixed by running "npm rebuild"
Original error: Cannot find module '/opt/nodejs/lib/node_modules/cast-web-api/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-glibc/grpc_node.node'

running sudo npm install cast-web-api -g --unsafe-perm gives me the following error:

npm ERR! path /opt/nodejs/lib/node_modules/.staging/cast-web-api-ec5573da/node_modules/@protobufjs/aspromise
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/opt/nodejs/lib/node_modules/.staging/cast-web-api-ec5573da/node_modules/@protobufjs/aspromise' -> '/opt/nodejs/lib/node_modules/.staging/@protobufjs/aspromise-d95ef96f'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-12T22_42_51_178Z-debug.log

What is the current recommend version of Node we should be running? You don’t mention it on the page? Do I need a new version with the new version of cast-web?

UPDATE: That was it!!! Had to update to v10.15.3 of node and it worked .

1 Like

Ok when I do that all the devices do show on that screen,
well I figured it out some how I managed to miss type the ip address on that app which made it not work but all fixed now. Thanks for the help.

1 Like

@vervallsweg please help me check error:

Log smartthings:
Logs
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:10 PM: debug parse, msg.json: null
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:10 PM: debug ‘parse’, parsing: ‘index:E2, mac:B827EB91BB8B, ip:C0A802BD, port:0BB8, requestId:55a8cb2d-2a33-431d-994e-1eff999276b3, callback:true, headers:SFRUUC8xLjEgNDAwIEJhZCBSZXF1ZXN0DQpDb25uZWN0aW9uOiBjbG9zZQ==, body:’
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:10 PM: error json response not ok: [error:no group members, response:error]
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:10 PM: debug parse, msg.json: [error:no group members, response:error]
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:10 PM: debug ‘parse’, parsing: ‘index:E1, mac:B827EB91BB8B, ip:C0A802BD, port:0BB8, requestId:a4adbebc-4236-4681-8718-c0aba33c75bc, callback:true, headers:SFRUUC8xLjEgNTAwIEludGVybmFsIFNlcnZlciBFcnJvcg0KWC1Qb3dlcmVkLUJ5OiBFeHByZXNzDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb247IGNoYXJzZXQ9dXRmLTgNCkNvbnRlbnQtTGVuZ3RoOiA0Nw0KRVRhZzogVy8iMmYtTGlJOVZxUVEvNFJTNC9RNXExYWZQeUsybWt3Ig0KRGF0ZTogU2F0LCAxMyBBcHIgMjAxOSAwODozODowOSBHTVQNCkNvbm5lY3Rpb246IGtlZXAtYWxpdmU=, body:eyJyZXNwb25zZSI6ImVycm9yIiwiZXJyb3IiOiJubyBncm91cCBtZW1iZXJzIn0=’
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:09 PM: debug HubAction: POST /device/1c793731016142efe8bd50c55de73df0/playMedia HTTP/1.1
HOST: 192.168.2.xxx:3000
Content-Type: application/json
Content-Length:307

[{ “mediaType”:“audio/mp3”, “mediaUrl”:"", “mediaStreamType”:“BUFFERED”, “mediaTitle”:“Đèn phòng ngủ chính đã bật”, “mediaSubtitle”:“SmartThings notification”, “mediaImageUrl”:“https://lh3.googleusercontent.com/nQBLtHKqZycERjdjMGulMLMLDoPXnrZKYoJ8ijaVs8tDD6cypInQRtxgngk9SAXHkA=w300”, “googleTTS”:“vi-VN”}]
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:09 PM: debug Executing ‘sendHttpPost’ host: 192.168.2.xxx:3000 path: /device/1c793731016142efe8bd50c55de73df0/playMedia data: [{ “mediaType”:“audio/mp3”, “mediaUrl”:"", “mediaStreamType”:“BUFFERED”, “mediaTitle”:“Đèn phòng ngủ chính đã bật”, “mediaSubtitle”:“SmartThings notification”, “mediaImageUrl”:“https://lh3.googleusercontent.com/nQBLtHKqZycERjdjMGulMLMLDoPXnrZKYoJ8ijaVs8tDD6cypInQRtxgngk9SAXHkA=w300”, “googleTTS”:“vi-VN”}] data.length():3061
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:09 PM: warn playTrack() data: [{ “mediaType”:“audio/mp3”, “mediaUrl”:"", “mediaStreamType”:“BUFFERED”, “mediaTitle”:“Đèn phòng ngủ chính đã bật”, “mediaSubtitle”:“SmartThings notification”, “mediaImageUrl”:“https://lh3.googleusercontent.com/nQBLtHKqZycERjdjMGulMLMLDoPXnrZKYoJ8ijaVs8tDD6cypInQRtxgngk9SAXHkA=w300”, “googleTTS”:“vi-VN”}]
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:09 PM: warn number: 0
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:09 PM: debug getTrackData, keys: [preset]
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:09 PM: debug Setting group level: 50
9a975427-b8a3-4cc9-9d1b-a597b406ac30 3:38:09 PM: info playTextAndResume, message: Đèn phòng ngủ chính đã bật level: 50

That’s odd. The lowest version for my code and the dependencies is 7. Personally I’m running 8. But great that it works now :+1: Will update the site to mention updating node, thanks :slight_smile:

Update: website is live now

Hey, thanks for providing so much log info, that makes helping a lot easier :slight_smile:

Can you confirm: you hear the Google Cast chime, the noise it makes when you start casting to it? After that you hear no audio though? Is that correct?

I replicated that behavior on my setup, by trying to play the same Vietnamese sentence you tried to play.

The issue is probably API side and I have a rough idea where it could be. Just want to make sure that I understand the problem correctly before I start debugging it.

exactly. Thanks for support.
Add information:

i play preset 1 error:

9a975427-b8a3-4cc9-9d1b-a597b406ac30 7:32:30 PM: errorgroovy.lang.MissingPropertyException: No such property: mediaTitle for class: org.json.JSONArray @line 352 (getPresetObject)

9a975427-b8a3-4cc9-9d1b-a597b406ac30 7:32:30 PM: debugExecuting ‘playPreset’: 1, key: preset1, defaultMediaTitle: Preset 1

9a975427-b8a3-4cc9-9d1b-a597b406ac30 7:32:30 PM: debugExecuting ‘preset1’

9a975427-b8a3-4cc9-9d1b-a597b406ac30 7:32:30 PM: debugExecuting 'preset1

Alright. Fix will take some time, I opened an issue for it and will be fixed with the next release.

That’s a different error. I can see from the screenshot that preset one has not content, except for the title. If you want to use presets to play something, you also need to put some media information in there. For example a radio station stream. Use the preset generator for that, it should be linked.

1 Like

thanks,
please hep me play radio link with m3u8 file(play ok with windows media player). how to config in preset?
link radio station:
https://5a6872aace0ce.streamlock.net/nghevov1/vov1.stream_aac/chunklist_w817247573.m3u8

Alright. So your station uses some copy protection from a company called wowza. Every ~30sec there custom player is asking the server for new seconds of audio playback. Then it merges everything together to one continous local stream.

I hate this player. I hate this company. I hate the fact that they do it. And to be honest, if someone wanted to reverse that script, you could probably set there drm on fire. Anyhow, I don’t have the time right now to do it.

Answer: vov makes it extra hard for you to get the original stream you need. Use a different station where you can get a pure m3u, mp3, etc. stream url.

Update some screenshots showing the process, and their great js client side obfuscation, which is pointless, but I don’t want to reverse right now.

1 Like

Hey Tobias,

Thank you kindly for the response. I will try to get it working with my samsung tablet!

1 Like