I get problems like that with my Google Nest Mini device. I’ve attributed it to wifi problems and I’ve researched similar problems online and found that frequent disconnects are not uncommon for these devices. These seem to have a cheap wifi chip and are susceptible to interference or weak signals. I don’t know if that’s the same problem you are seeing, but just wanted to share that.
Max number for the driver or for your hub? There are no built-in limitations for the driver, but how many do you have?
Regarding the log - not sure what is happening there. Could you get a log of the SmartThings driver using the CLI? The command is:
I have to suspect that cast-web-api-cli won’t work on Fedora 39 or more effort is required. It just spins “Starting cast-web-api”.
2023-12-03T23:13:21: PM2 error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (210176)
at Object.writeFileSync (node:fs:2281:5)
at /usr/local/lib/node_modules/cast-web-api-cli/node_modules/pm2/lib/God/ForkMode.js:258:12
at /usr/local/lib/node_modules/cast-web-api-cli/node_modules/async/internal/once.js:12:16
at next (/usr/local/lib/node_modules/cast-web-api-cli/node_modules/async/waterfall.js:21:29)
at /usr/local/lib/node_modules/cast-web-api-cli/node_modules/async/internal/onlyOnce.js:12:16
at WriteStream.<anonymous> (/usr/local/lib/node_modules/cast-web-api-cli/node_modules/pm2/lib/Utility.js:186:13)
at WriteStream.emit (node:events:514:28)
at WriteStream.emit (node:domain:551:15)
at node:internal/fs/streams:77:16
at FSReqCallback.oncomplete (node:fs:189:23)
2023-12-03T23:13:21: PM2 log: App [cast-web-api:0] online
I ran Fedora 39 in a docker image, and installed cast-web-api-cli there, and it can run, but then I get this
but those files are there so I don’t know what it means cannot find google-assistant.
note also, I have the files mentioned above in
/usr/local/lib/node_modules/cast-web-api-cli/node_modules/cast-web-api/node_modules/google-tts-api/dist/
-rw-r--r-- 1 root root 178 Dec 4 22:09 assertInputTypes.d.ts
-rw-r--r-- 1 root root 221 Dec 4 22:09 assertInputTypes.d.ts.map
-rw-r--r-- 1 root root 676 Dec 4 22:09 assertInputTypes.js
-rw-r--r-- 1 root root 652 Dec 4 22:09 assertInputTypes.js.map
-rw-r--r-- 1 root root 1565 Dec 4 22:09 getAudioBase64.d.ts
-rw-r--r-- 1 root root 574 Dec 4 22:09 getAudioBase64.d.ts.map
-rw-r--r-- 1 root root 8367 Dec 4 22:09 getAudioBase64.js
-rw-r--r-- 1 root root 2816 Dec 4 22:09 getAudioBase64.js.map
-rw-r--r-- 1 root root 1369 Dec 4 22:09 getAudioUrl.d.ts
-rw-r--r-- 1 root root 537 Dec 4 22:09 getAudioUrl.d.ts.map
-rw-r--r-- 1 root root 3089 Dec 4 22:09 getAudioUrl.js
-rw-r--r-- 1 root root 1578 Dec 4 22:09 getAudioUrl.js.map
-rw-r--r-- 1 root root 243 Dec 4 22:09 index.d.ts
-rw-r--r-- 1 root root 271 Dec 4 22:09 index.d.ts.map
-rw-r--r-- 1 root root 849 Dec 4 22:09 index.js
-rw-r--r-- 1 root root 224 Dec 4 22:09 index.js.map
-rw-r--r-- 1 root root 506 Dec 4 22:09 splitLongText.d.ts
-rw-r--r-- 1 root root 303 Dec 4 22:09 splitLongText.d.ts.map
-rw-r--r-- 1 root root 2423 Dec 4 22:09 splitLongText.js
-rw-r--r-- 1 root root 1909 Dec 4 22:09 splitLongText.js.map
-rw-r--r-- 1 root root 1473 Dec 4 22:09 types.d.ts
-rw-r--r-- 1 root root 1515 Dec 4 22:09 types.d.ts.map
-rw-r--r-- 1 root root 110 Dec 4 22:09 types.js
-rw-r--r-- 1 root root 102 Dec 4 22:09 types.js.map
but still continue to encounter this issue with the replaced file mentioned above google-tts.js
this.splitGoogleTTS(): googleTTS error: TypeError: googleTTS.getAudioUrl is not a function
EDIT:
OK - so this problem is caused by the google-assistant problem. sudo npm install google-assistant -g --unsafe-perm
seemed to have fixed the issue.
sheesh…
Anyone have suggestions as to why in ST the status shows “Cannot reach cast-web-api”? I’m sure I am just missing something. Any help is greatly appreciated!!
Some weeks ago, I was successful in installing cast-web on my windows laptop computer. Because this was not a permanent solution, running node.js on my laptop I tried to install on an old mobile phone using the Dory app. Everything seemed to proceed according plan until I executed the NPM install. As a result I got error messages:
npm WARN tar EACCES: permission denied …cast-web-api/node modules/ etc.
Because my mobile phone didn’t have a SD card option I selected the download directory which worked fine during the installation. Can someone help me? I spend several hours on this forum without a workable solution. Thxs
I think it’s on action files to correct this. They were swamped with the API changeover and said they would look into it at some point, but I haven’t followed up on it with them.
Several days ago, every Smartthings routine that plays an MP3 has stopped producing any sound. Google Home shows the assigned speaker is playing the correct MP3. I have several routines that play mp3’s on different speakers but all now produce no sound. I rebooted the server hosting the cast.web.api app and all the Google speakers throughout the house.
Routines that “play message on speaker” (i,e, “freezer door has been open for five minutes”) still work. Any ideas as to what to look for on my end or is this a Google issue? It has been working perfectly for months.
I opened Google cast manager in Smartthings, copied a preset url, pasted it into a browser and it downloaded a mp3. It played perfectly so I l know the url and permissions are correct. It’s just now playing on any of Google speakers.
I just tested mine and it’s working ok, so it doesn’t appear to be a general platform issue. Has anything changed in your network config? Are your IP addresses for SmartThings hub and cast-web server configured as static?
Nothing had changed in months. Server and all Google speakers are assigned fixed addresses from the DHCP server in the router. I have a mp3 that says “Fire, fire leave immediately” and repeats for about three minutes as preset1. I created a virtual device and routine to set the volume at 100% and play that mp3 on one speaker. I get the “knock” volume change sound and then the “ding” from the speaker before the mp3 plays but still no sound. Voice announcements work perfectly. Just the MP3’s won’t play as they used to.
Here is the log but to me, they look OK. I’m lost
Good work! Now what you want to do to start the driver logging with the following command:
smartthings edge:drivers:logcat
You will be prompted for the hub address and to select the driver (in this case, “Google Cast V0.11”).
You might get a browser window opened that requires you to sign in to your SmartThings account and give permissions. This is a first-time only requirement. Once you complete that you can close the browser window and return to your command prompt window and you should see it connect and start outputting log messages.
While that is running, you can trigger your automation. Capture the log activity and DM me the result. Be sure to begin and end the log text with triple back-tick characters (```) to ensure readable formatting.
Hi TAustin,
I really like all of your Edge drivers and as a new user I have found your work to be one of the main things keeping Samsung in the running for a solid HA solution for people who don’t have hours to sink into things. I am reaching out to you about this edge driver. I have looked everywhere and tried to trouble shoot but have had no such luck. So I installed this Server onto my PC as instructed on your site. It ran successfully and worked for a few days. It then began getting errors about 1 hour after connecting. I wanted to paste the log files and if you could advise me on what I may be doing wrong that would be amazing. this is my first time posting and I don’t see a way to upload txt files so I am going to try the block quote function. Hopefully this works
Is there a way to set up a routine/task in SmartThings/Tasker to run a cast web device (Living room speaker) with a persistent notification/announcement (Front door lock left unlocked) until a SmartThings device state (locked/unlocked or closed/opened) has changed back… like garage door or a door lock?