Hi Ryan, I have exactly the same TTS problem you had here. Can you please list the exact command line sequence you executed to stop the previous running version, reinstall from git and run npm install, etc. Many thanks.
[RELEASE] cast-web 1.0.0 - Chromecast Device Handler & SmartApps
The OP has instructions linked in his guide a bit above. The detailed instructions for cast-web-api are here https://github.com/vervallsweg/cast-web-api#installation
Iām getting the following error while running node castWebApi.js: āError: listen EADDRINUSE 169.254.41.71:3000ā - thatās the usb0 IP address the raspberry PI is running on, whilst I setup castWebApi.js to use the IP address from wlan0 (WiFi) instead. ā I can now see that means Iām running another server on the same port. Iāll kill the process and try again. Thanks.
Is anyone else experiencing problems recently? All of a sudden I canāt get any of my Homes to play anything via CastWeb. Iāve tried restarting the raspberry pi that the server is running on, but no luck.
I can change the volume via the app successfully, but canāt get mp3s or TTS to work. Has been working for months with no issues.
I know thereās logging happening somewhere. Any tips on how to access those logs?
Playback not working but controls work? Please check the version of the API youāre running.
That did it, thanks so much!
Is there a way to disable the sound / tone the Google home plays prior to playback of a cast stream or TTS?
Hi community
Iām pretty experienced at smart things but have no idea about node.js and would love to get this up and running on my system.
Could someone post or point me to how to setup and install node.js on Windows or in dory node on Android and then install castAPI?
I have tried to follow the steps in the documentation but I need something a bit more basic. Iām not even sure which screens I need to be in and am just getting error messages. Iām sure itās something very basic I am missing.
Thanks for any help
Hi all,
I notice TTS is not working lately. I see from previous posts that the cast-web-api needs to be updated?
I update my cast-web-api to 0.3.0, when testing using BigTalker2 I got the google bleep . . but the it doesnt say anything. I checked the console output of the cast-web-api and see an exception being thrown:
Exception caught: TypeError: Cannot read property āplayerStateā of undefined
Did I missed something?
Thanks!
Hey TTS is back, it stopped working on all platforms for about 24 hours, but itās back, nothing to do with this great dth and smartapp.
Ok, so these two things are related? Will check if my tts works with and without BigTalker.
Thanks a lot
Trying to install on RPi3 running Jessie using this guide,
but canāt get API to respond to the ST app
Any ideas what Iām doing wrong?
Thanks
pi@raspberrypi:~ $ sudo apt-get install npm
Reading package lists⦠Done
Building dependency tree
Reading state information⦠Done
npm is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
pi@raspberrypi:~ $ sudo apt-get install libavahi-compat-libdnssd-dev
Reading package lists⦠Done
Building dependency tree
Reading state information⦠Done
libavahi-compat-libdnssd-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
pi@raspberrypi:~ $ sudo npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
pi@raspberrypi:~ $ sudo npm install -g n
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
- n@2.1.8
updated 1 package in 3.15s
pi@raspberrypi:~ $ sudo n stable
pi@raspberrypi:~ $ node -v
v9.10.1
pi@raspberrypi:~ $ mkdir castAPI
pi@raspberrypi:~ $ cd castAPI
pi@raspberrypi:~/castAPI $ git clone https://github.com/vervallsweg/cast-web-api.git
Cloning into ācast-web-apiāā¦
remote: Counting objects: 440, done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 440 (delta 29), reused 33 (delta 14), pack-reused 387
Receiving objects: 100% (440/440), 111.41 KiB | 0 bytes/s, done.
Resolving deltas: 100% (231/231), done.
Checking connectivity⦠done.
pi@raspberrypi:~/castAPI $ sudo npm install
npm WARN saveError ENOENT: no such file or directory, open ā/home/pi/castAPI/package.jsonā
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open ā/home/pi/castAPI/package.jsonā
npm WARN castAPI No description
npm WARN castAPI No repository field.
npm WARN castAPI No README data
npm WARN castAPI No license field.
up to date in 0.845s
pi@raspberrypi:~/castAPI $ cd cast-web-api
pi@raspberrypi:~/castAPI/cast-web-api $ sudo npm install castv2-client
npm notice created a lockfile as package-lock.json. You should commit this file.
-
castv2-client@1.2.0
added 11 packages from 6 contributors in 7.05s
pi@raspberrypi:~/castAPI/cast-web-api $ sudo npm install forever -g
/usr/local/bin/forever -> /usr/local/lib/node_modules/forever/bin/forever
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/forever/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {āosā:ādarwinā,āarchā:āanyā} (current: {āosā:ālinuxā,āarchā:āarmā}) -
forever@0.15.3
updated 1 package in 39.22s
pi@raspberrypi:~/castAPI/cast-web-api $ sudo nano castWebApi.js
pi@raspberrypi:~/castAPI/cast-web-api $ sudo forever start castWebApi.js
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: castWebApi.js
pi@raspberrypi:~/castAPI/cast-web-api $
Maybe using the official installation instructions youāll have more luck: https://vervallsweg.github.io/smartthings/cast-web-installation-guide
Thereās now also installation videos. The video for mac (after installing nodejs) should have the same instructions for the command line
Update: Also the output you posted here seems quite normal. Does it work from your browser? In the video I also paste the address into a browser window and the API responds.
When I paste http://192.168.1.118:3000 (yes 192.168.1.118 is static address of my RPi and it was configured as per the posted guide)
I get error canāt reach this page, so itās not working
To start over, can I just delete those directories created and start over, or do I have to do some uninstalling first?
Thanks
Reinstalling probably wonāt solve that issue. So you run the API and it outputs you the above address to the command line? Seems more like a network issue. Do you have some kind of firewall on your rpi or computer? If not, how are the rpi and your computer connected?
Update: maybe try running it without forever first. It should output the address:port itās running on. I assume the issue is somewhere there.
Thanks for reply !
The RPi is just headless sitting in the closet running DSC alarmserver to integrate the alarm wit SmartThings. I use VNC viewer to manage it. No firewall that I know of, I can access it remotely without problems using VNC
Is there way to check if the process is running correctly on the RPi and did not crash?
When I try to start it without the forever I get error
pi@raspberrypi:~/castAPI/cast-web-api $ start castWebApi.js
bash: start: command not found
I presume the server is configured properly
const http = require(āhttpā);
const Client = require(ācastv2ā).Client;
const Castv2Client = require(ācastv2-clientā).Client;
const DefaultMediaReceiver = require(ācastv2-clientā).DefaultMediaReceiver;
const mdns = require(āmdns-jsā);
const url = require(āurlā);
const debug = require(ādebugā)(ācast-web-apiā);
const args = require(āminimistā)(process.argv.slice(2));
const fetch = require(ānode-fetchā);
const os = require(āosā);
const pkg = require(ā./package.jsonā);
var hostname = ā192.168.1.118ā;
var port = 3000;
var currentRequestId = 1;
var networkTimeout = 2000;
var discoveryTimeout = 4000;
var appLoadTimeout = 6000;
var thisVersion = pkg.version;
interpretArguments();
createWebServer();
Thanks
Miracle, changed the default port from 3000 to 3300 and itās responding now I presume the port was used by something else?
Thanks
Great!
Was about to reply: You just run it with node castWebApi.js
or if you installed it according to the docs with cast-web-api
Probably. The API without forever would output an error message for you