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

I am talking about the Cast Server on my computer, not my phone.

The only suggestion I have is to use the cast web - service manager smartapp on your phone and enter your computer’s IP address and port 3000, for example 192.168.xx.xx:3000. If there is no field in the smartapp to enter the API host address then look at post 1455 above for the fix.

1 Like

EDIT: Feel ashamed, it was a firewall blocking everything for me :blush:

It works now…

Thank you

I’m trying to install cast-web on a android 7.0 tablet.

getting an error running the npm -install command.

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

npm WARN deprecated har-validator@5.1.5: this library is no longer supported

grpc@1.24.4 install /storage/emulated/0/cast-web-api/node_modules/grpc

node-pre-gyp install --fallback-to-build --library=static_library

sh: node-pre-gyp: not found

I’m very new to all of this. Following an isntruction set is ok for me, however I have no clue how figure out what is going wrong. I’m trying to get some spoken message to a Google Nest HUB mini. Preferably starting from Smartthings.

1 Like

Hello, can someone update the Smart App so I can enter the API address, can do this in the old Smartthings app but not the new one, thank you

Read above in this thread

I install the API in my Rasp Pi and my devices are discovered and added. They showed up in the device list in the new Smartthings app, but it always shows the ā€œChecking Statusā€. When I changed the volume level in the app, it makes a sound, but it revert back to the old volume level.
Any help will be appreciated.

1 Like

Hi
Been using cast web api for about 1½ year flawlessly on my raspberry pi (no changes done in setup), but for about a month ago or so, spoken TTS announcements from webcore automations only causses silence in GA and chromecast speakers. In the beginning this only happened seldom, but now there is only totally silence.
Anybody else experience this and solvet it?

Same story here. I rebooted my pi and it helped temporarily, but then it started happening again shortly after.

I’ve been trying to get this to work and was sure that there’s something wrong on my end, but I just noticed that logs show ā€œgoogleTTS error: Error: get key failed from googleā€ so could there be an issue with Google changing their shit again?

Edit: seems that speech works when I disable TTS on the cast device settings.

Are you having issues with webcore or regular smartthings automations? The regular automation notifications work for me. Webcore doesn’t.

@Wajo357 issue is with webcore, haven’t tried directly with ST.

Try. Let me know if we have consistent behavior.

Seems it works on ST automations with TTS on and off. On webcore pistons it works only when TTS is set off on the device. This on Nest Mini and on a Lenovo ā€œSmart Clockā€.

I still have issues on the Nest hub, can’t get anything out of that. Probably some other issue with that one…

What do you mean you set TTS to off in Webcore?

No sorry, not in webCoRe, but in the ST app. Once I updated the device settings in ST app to disable TTS, the webCoRe piston started working.

Native automation in ST worked with both settings for the casting device (TTS on/off).

confirmed. At least I got it working for now. Thanks for your testing! Weird that something changed.

1 Like

Agree, I think you’re right that Google must have changed something in their TTS service lately, because I can too get it work with setting OFF in device smartapp, but only for english TTS voice talkback. So my localized (danish) sentence is pronouned in english only :frowning:

@vervallsweg are you still active developing on this great DH/SmartApp?
If so, are you able to look into this TTS issue

2 Likes

The google-tts-api node was just updated to 2.0.0 due to Google TTS API change, see Break Change from 0.x.x to 2.x.x

I just verified it fixed the google TTS issue for cast web:

  • Change google-tts dependency of cast-web-api from 0.04 to 2.0.0, and update/install the 2.0.0 google-tts-api node (see detailed instructions below)
  • Edit file /usr/local/lib/node_modules/cast-web-api-cli/node_modules/cast-web-api/lib/device/id/google-tts.js, change getGoogleTTSUrl as below
  • Restart cast-web-api-cli

Someone may submit it to the cast-web github repository.

    static getGoogleTTSUrl(message, lang, index) {
        return new Promise((resolve) => {
            const url = googleTTS.getAudioUrl(message, {
              lang: lang, slow: false, host: 'https://translate.google.com',
            });
            resolve({index: index, url: url});
        });
    }

EDIT: More details about the first step above

Assuming the cast-web-api is installed under ~/CastWebApi (someone may install it globally under /usr/local/lib/):

cd ~/CastWebApi
Edit file package-lock.json, change "google-tts-api" in the "requires" of "cast-web-api" from 0.0.4 to 2.0.0
In the same file, remove the entire "google-tts-api":{} under dependencies.
Edit file node_modules/cast-web-api/package.json, change "google-tts-api"'s value from 0.0.4 to 2.0.0
rm -rf node_modules/google-tts-api
npm install
1 Like