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

Hey all. Does anyone know if you can use HerokuApp instead of a tablet or a raspberri pi to run the app?

Hello.

Little help please. I have ran this for 3+ months and worked great. Recently i had to restart my windows machine (early March) that was running the node.js service. This has happened before without issue. This time i restarted the service and it is not working. I started troubleshooting shooting and then saw a new release was issued. Updated that and nothing. I deleted everything (DTH, app, node.js etc.) and started over and still no fix. I can test the API in the web browser and see it running but I can’t get a good test connection or see any devices in the ST cast-web-api app. Pretty sure it is something with node.js api. when I start cast-web-api from cmd window i see it populate with a all of my network and device info so not really sure what is broke.

thanks in advance.

I’m having an issue with the Forever command after updating the cast-web-api on my Ubuntu VM. When I use the command

forever startwhich cast-web-api`

It says it is processing the file /usr/local/bin/cast-web-api

However, when I do sudo forever list, it shows as STOPPED.

When I try to run it manually, it says that that the address is in use. When I send the Forever “stop” command, it gives the below error:

I also have the crontab entry set up for the forever command.

Any ideas on what I’m doing wrong? I’m not a linux expert, but can anyone see what I’m doing wrong?

@vervallsweg So I’ve been messing around with this for awhile and can not get the cast device discovery to work. my node server is up and running and shows the devices however can’t get anything out of the service manager. Is there any backdoor methods through adding devices to to make this work.

Problems with presets… v.1.1.0

Everything seems to be setup and working except presets. I can send casts to my GH as a speaker, it finds my devices, etc.

When I use the generator to setup a preset, the new device configuration saves properly to the device as observed in the ST API but it doesn’t work in the ST app on my android.

The preset title in the ST app remains “Preset1” and when I push it I see an error in the ST API Live Log like this: “11:25:57 AM: error groovy.lang.MissingPropertyException: No such property: mediaTitle for class: org.json.JSONArray @line 352 (getPresetObject)”

Here’s what the preset looks like from the ST API…
* presetObject: {“preset1”:[{“mediaTitle”:“Ding”,“mediaSubtitle”:“Dong”,“mediaType”:“audio/mp3”,“mediaUrl”:“http://www.sounds.beachware.com/2illionzayp3may/joptlz/DINGDONG.mp3",“mediaStreamType”:“BUFFERED”,“mediaImageUrl”:""}],“preset2”:[{“mediaTitle”:"Preset 2”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""}],“preset3”:[{“mediaTitle”:“Preset 3”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""}],“preset4”:[{“mediaTitle”:“Preset 4”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""}],“preset5”:[{“mediaTitle”:“Preset 5”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""}],“preset6”:[{“mediaTitle”:“Preset 6”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""}]}

1 Like

I did some more scrolling and some more reading and saw where someone had said the old preset generator still worked, so I tried that, and voila, it did! So here’s what the working preset looks like in the ST AP (no square brackets in working syntax)I:
presetObject: {“preset1”:{“mediaTitle”:“DingDong”,“mediaSubtitle”:“Doorbell Sound”,“mediaType”:“audio/mp3”,“mediaUrl”:“http://www.sounds.beachware.com/2illionzayp3may/joptlz/DINGDONG.mp3",“mediaStreamType”:“LIVE”,“mediaImageUrl”:""},“preset2”:{“mediaTitle”:"Preset 2”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""},“preset3”:{“mediaTitle”:“Preset 3”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""},“preset4”:{“mediaTitle”:“Preset 4”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""},“preset5”:{“mediaTitle”:“Preset 5”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""},“preset6”:{“mediaTitle”:“Preset 6”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""}}

1 Like

Hi When I try to start cast-web-api it says it cannot find google assistant, is this ok?

To clarify I did the install with “npm install cast-web-api” without the " -g" when I do it with “-g” I got lot of error. I am new to Linux and don’t understand the features -g :slight_smile: is it needed to install the cast-web-api?

whats going on here? 0%20-%20Chromecast%20Device%20Handler%20%26%20SmartApps%20-%20Projects%20%26%20St

Try the troubleshooting steps that are on the site: https://vervallsweg.github.io/cast-web/category/faq/

You are still in the C:\Windows\system32 folder. You need to go to where cast-web-api is located and run it. In your case, it is the long path in your picture after the -> …npm\node_modules…

1 Like

Hi can some one tell my what is wrong? :slight_smile:

After installing I am getting an error stating “error:google-assistant package is not installed”. Has anyone seen this and found a way to get around it? When trying to do a broadcast I get:
error:google-assistant package is not installed

I have tried all the fixes listed here:

Still no joy. I am able to set level of the devices and able to issue tts requests and mp3 track requests to individual speakers but I am not able to issue broadcasts.

So I rekajiggered my network a bit and it seems to have broken this. It was working fine before when the network was flat. I added a couple VLANs with different subnets and now I can’t seem to discover any devices (only have one Google Home).

I have the node.js and the api running on my Synology NAS which is on VLAN 1.
My ST hub and the Google Home are both on VLAN 30.

That said, as of now the firewall between the two is completely open and I don’t have any issues communicating between both VLANs in any other way.

I completely deleted and reinstalled the smartapp and device handlers. Trying to discover the device doesn’t seem to do anything - it just keeps searching. Here’s a snippet of the log. I let it go for ~15 minutes and nothing

4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:14 PM: debug devices: [:]
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:14 PM: debug JSON rcvd: [], JSON.size: 0
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:14 PM: debug Parsing 'index:E2, ip:C0A8010A, port:0BB8, requestId:19b7831c-3089-467a-a8f0-b6ea8833629c, callback:true, headers:SFRUUC8xLjEgMjAwIE9LDQpYLVBvd2VyZWQtQnk6IEV4cHJlc3MNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA0KQ29udGVudC1MZW5ndGg6IDINCkVUYWc6IFcvIjItbDlGdzRWVU83a3I4Q3ZCbHQ0emFNQ3FYWjB3Ig0KRGF0ZTogVGh1LCAxMSBBcHIgMjAxOSAxOTo0NToxNCBHTVQNCkNvbm5lY3Rpb246IGtlZXAtYWxpdmU=, body:W10='
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:14 PM: debug devices: [:]
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:14 PM: debug JSON rcvd: [], JSON.size: 0
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:14 PM: debug Parsing 'index:E2, ip:C0A8010A, port:0BB8, requestId:19b7831c-3089-467a-a8f0-b6ea8833629c, callback:true, headers:SFRUUC8xLjEgMjAwIE9LDQpYLVBvd2VyZWQtQnk6IEV4cHJlc3MNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA0KQ29udGVudC1MZW5ndGg6IDINCkVUYWc6IFcvIjItbDlGdzRWVU83a3I4Q3ZCbHQ0emFNQ3FYWjB3Ig0KRGF0ZTogVGh1LCAxMSBBcHIgMjAxOSAxOTo0NToxNCBHTVQNCkNvbm5lY3Rpb246IGtlZXAtYWxpdmU=, body:W10='
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:14 PM: debug discoveryPage(), refresh
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:14 PM: debug Executing 'sendHttpRequest' host: 192.168.1.10:3000 path: /device
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:14 PM: debug Executing 'getDevices'
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug discoveryPage(), refresh
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug Executing 'sendHttpRequest' host: 192.168.1.10:3000 path: /device
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug Executing 'getDevices'
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug devices: [:]
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug JSON rcvd: [], JSON.size: 0
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug Parsing 'index:E1, ip:C0A8010A, port:0BB8, requestId:0cdf12ad-4201-436e-bc3e-4b29d575d9e1, callback:true, headers:SFRUUC8xLjEgMjAwIE9LDQpYLVBvd2VyZWQtQnk6IEV4cHJlc3MNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA0KQ29udGVudC1MZW5ndGg6IDINCkVUYWc6IFcvIjItbDlGdzRWVU83a3I4Q3ZCbHQ0emFNQ3FYWjB3Ig0KRGF0ZTogVGh1LCAxMSBBcHIgMjAxOSAxOTo0NTowNCBHTVQNCkNvbm5lY3Rpb246IGtlZXAtYWxpdmU=, body:W10='
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug devices: [:]
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug JSON rcvd: [], JSON.size: 0
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug Parsing 'index:E1, ip:C0A8010A, port:0BB8, requestId:0cdf12ad-4201-436e-bc3e-4b29d575d9e1, callback:true, headers:SFRUUC8xLjEgMjAwIE9LDQpYLVBvd2VyZWQtQnk6IEV4cHJlc3MNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA0KQ29udGVudC1MZW5ndGg6IDINCkVUYWc6IFcvIjItbDlGdzRWVU83a3I4Q3ZCbHQ0emFNQ3FYWjB3Ig0KRGF0ZTogVGh1LCAxMSBBcHIgMjAxOSAxOTo0NTowNCBHTVQNCkNvbm5lY3Rpb246IGtlZXAtYWxpdmU=, body:W10='
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug discoveryPage(), refresh
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug Executing 'sendHttpRequest' host: 192.168.1.10:3000 path: /device
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:45:04 PM: debug Executing 'getDevices'
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:44:54 PM: debug devices: [:]
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:44:54 PM: debug JSON rcvd: [], JSON.size: 0
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:44:54 PM: debug Parsing 'index:E0, ip:C0A8010A, port:0BB8, requestId:0bc493d1-ff48-4598-8f23-73d9b492b843, callback:true, headers:SFRUUC8xLjEgMjAwIE9LDQpYLVBvd2VyZWQtQnk6IEV4cHJlc3MNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA0KQ29udGVudC1MZW5ndGg6IDINCkVUYWc6IFcvIjItbDlGdzRWVU83a3I4Q3ZCbHQ0emFNQ3FYWjB3Ig0KRGF0ZTogVGh1LCAxMSBBcHIgMjAxOSAxOTo0NDo1NCBHTVQNCkNvbm5lY3Rpb246IGtlZXAtYWxpdmU=, body:W10='
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:44:54 PM: debug devices: [:]
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:44:54 PM: debug JSON rcvd: [], JSON.size: 0
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:44:54 PM: debug Parsing 'index:E0, ip:C0A8010A, port:0BB8, requestId:0bc493d1-ff48-4598-8f23-73d9b492b843, callback:true, headers:SFRUUC8xLjEgMjAwIE9LDQpYLVBvd2VyZWQtQnk6IEV4cHJlc3MNCkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA0KQ29udGVudC1MZW5ndGg6IDINCkVUYWc6IFcvIjItbDlGdzRWVU83a3I4Q3ZCbHQ0emFNQ3FYWjB3Ig0KRGF0ZTogVGh1LCAxMSBBcHIgMjAxOSAxOTo0NDo1NCBHTVQNCkNvbm5lY3Rpb246IGtlZXAtYWxpdmU=, body:W10='
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:44:54 PM: debug discoveryPage(), refresh
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:44:54 PM: debug Executing 'sendHttpRequest' host: 192.168.1.10:3000 path: /device
4007abbb-c228-4f54-a48f-7c5d7b29161a 12:44:54 PM: debug Executing 'getDevices'

Does this not work across different VLANs? I would expect it to behave like any other network traffic. Please help. Really need to get this working again. Thank you

Hmmm… one of the reasons for VLAN’s is to prevent broadcast traffic from moving between networks. That said - I did a little quick googling and it may be that G cast traffic is using mDNS. Depending on your network setup there may be a way to repeat the mDNS traffic across VLANs. Take a peek at this http://www.cron.dk/edgerouter-and-chromecast/ and see if it has any info you might be able to use.

2 Likes

I have the mDNS reflector enabled in my router and at this time (temporarily), the firewall rules between VLANs is completely open. I can connect and cast to the google home via my phone across the VLANs just fine,but not with the API.

I temporarily put everything back on the same VLAN, but would really like to get this working. I could buy a raspberryPi and set it up on the IoT VLAN specifically to run the API if needed, but it seems unnecessary when I already have a server with it running.

Hey Alessandro. Sadly you cannot. The cast protocol requires all devices (the api) that communicate with cast-devices to be on the same network. Even if you tunneled it to some server somewhere this is not supported and not a great idea. The api itself is not written with safety in mind, to be hosted publicly. The protocol itself also doesn’t support it.

Exactly. But some dependencies need to be installed as root. Otherwise there install fails. This causes issues with our -g global install. Will figure something out for the next version.

No it won’t be the issue here. The Google Assistant is basically slapped on. It’s separate from the other Google Cast stuff. So no need to clear anything here.

Have you deleted all the devices you had previously set up? Or why do you even need discovery. Updating should keep the devices in place.

Regardless, you can check manually if the api finds any devices. Just open your browser and go to http://{your-api-address}/device . This should return some info. Just post it here and we’ll go from there.

That’s a good indication though. So let me summarize:

  • starting the api from cmd shows some devices coming online
  • visiting http://{your-api-address} shows you: cast-web-api: v1.1.0
  • opening the service manager, entering the api-address, doesn’t show devices in discovery, nor in the check connection tab

Correct the summery if I got something wrong. I’d suggest:

  1. Try opening you browser and go to http://{your-api-address}/device post the response here.
  2. Try Try opening your PHONES browser and go to http://{your-api-address}/device post the response here. If there’s no response it’s probably some kind of network issue.
  3. Make sure that you also updated the service manager, dth, etc. on the ST side, not just the api, last paragraph

Yes you need to change the port cast-web-api is running on. Right now you’re probably starting it with cast-web-api. You can change the port by adding the option --port to it cast-web-api --port=3002 .

Try running the adjusted command first. It should now start on port 3002. Change the port to your liking. Then you also need to adjust the forever command the same way i.e.forever start `which cast-web-api` --port=3002 . Try it and if it works, also adjust your crontab accordingly, by running crontab -e.