When I try to install casp-web-api-cli, i keep getting this in the log.
Since these mention grpc, I did the --unsafe-perm for the install. Nothing changed.
node /usr/local/lib/node_modules/cast-web-api-cli/node_modules/cast-web-api/api.js: symbol lookup error: /usr/local/lib/node_modules/cast-web-api-cli/node_modules/grpc/src/node/extension_binary/node-v108-linux-x64-glibc/grpc_node.node: undefined symbol: __wrap_memcpy
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
Hi @TAustin, thanks, yes i looked at the installation instructions, but i do not know how to install the package with synology. is there some basic guidelines to install this in synology? do i need to create a docker etc. i am not familar with the installation in synology… thanks
@Tin_Hwee_Wang I am successfully using this docker container for cast-web-api. I’m not running it on synology, but I imagine you could get it to work there.
Hopefully @Hoodah77 's reply is helpful to you, as I don’t know anything about a Synology box or what implications that may have on installing the cast-web-api app.
groupsUp: {"id":"2881ce78292e6b54b66d6fa70658e257","groups":["6a1e7972-5a22-4af5-b372-81984ed94f07"]}new status: {"groupPlayback":{"on":false,"from":"6a1e7972-5a22-4af5-b372-81984ed94f07"},"application":"","status":"","title":"","subtitle":"","image":""}
playMedia: [{"mediaTitle":"TESTING","mediaType":"audio/mp3","mediaImageUrl":"https://lh3.googleusercontent.com/nQBLtHKqZycERjdjMGulMLMLDoPXnrZKYoJ8ijaVs8tDD6cypInQRtxgngk9SAXHkA=w300","mediaStreamType":"BUFFERED","mediaSubtitle":"SmartThings notification","googleTTS":"en-US"}]
this.splitGoogleTTS(): googleTTS error: **TypeError: googleTTS.getAudioUrl is not a function**
Doing it directly from SmartThings this works: playMedia: [{"mediaTitle":"SmartThings","mediaType":"audio/mp3","mediaImageUrl":"https://lh3.googleusercontent.com/nQBLtHKqZycERjdjMGulMLMLDoPXnrZKYoJ8ijaVs8tDD6cypInQRtxgngk9SAXHkA=w300","mediaStreamType":"BUFFERED","mediaUrl":"https://audionotification-na04.smartthings.com/once/ec2cc661-b646-4c52-8535-4b2431d40f99.dbf36981-e016-4c7e-96f8-9ac585eb99cc.mp3","mediaSubtitle":"Notification"}]
I would say try to unplug those devices, count to 10, then plug back in.
If this is something that happens frequently, we should try to get some driver logs to diagnose why it’s happening and why they aren’t getting reconnected.
Using the ‘Play message on speaker’ from a SmartThings routine doesn’t actually use the Google TTS function - rather the TTS is done by SmartThings and then the audio file sent to the speaker to be played.
To replicate within SmartThings routine what you are problably doing from SharpTools, is to use the ‘Speech Synthesis’ action within the device. So in the ‘Then’ part of your routine, select the speaker device and then ‘Speech Synthesis’ from the list of actions, enable it, then type in the text you want. This text WILL be sent to Google TTS.
That will probably fail just as your SharpTools routine did, since there appears to be something wrong in your cast-web-api installation. From the log errors you posted, it appears that it is not finding the Google TTS module in your application path. Make sure you have a child directory structure something like this (yours may be under a different parent directory like /usr/lib, depending on how you installed cast-web-api):
Note how there are nested levels of node modules that must exist under your cast-web-api cli app. Make sure the dist subdirectory under google-tts-api contains a file called getAudioURL.js, among others. And be sure that when you start up cast-web-api, that it has access to these sub directories as part of its working directory.
Not sure what OS you are running cast-web-api under, but if it is Linux-based, be sure you followed the command line instructions under Mac OS for installing.
If you’re running in a Windows environment, maybe someone here can share their directory structure.
If you can’t get this to work, then see if SharpTools allows you to specify the equivalent of SmartThing’s ‘Play message on speaker’, which will bypass Google TTS and use SmartThings TTS.
@TAustin , thanks. yes, only 2 devices happened frequently , disconnected, the rest got disconnected but connect within a minute back on its on. the 2 devices that went disconnected is my google nest hub and upon restart of the server, it went back online, but got disconnected, connecting, connected repeatedly until it stop and show disconnected.
can i check what is the max. devices to connect?