LOGIN  |  REGISTER
Smart Living Made Brilliant!
CASTLEOS FORUM

HomeScripting

A forum for information about scripting with CastleOS. Get samples, suggestions, and other help here

help with my morning wake up weather script Messages in this topic - RSS

Phil Hawthorne
Phil Hawthorne
Posts: 400


1/28/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
Bazinga!

Got it.

So...your try{} catch{} statement worked. Got an error that it couldn't find the file! So I changed this part


Process.Start(@"C:\ProgramData\CastleOS\CastleOS Kinect Service\Scripts\RemoteAppLaunchClient.exe", "192.168.1.21 iexplore.exe www.google.com");


Now we are in business! Thank you so much.

Now onto finishing up this script so everyone can enjoy it!
0 link
Phil Hawthorne
Phil Hawthorne
Posts: 400


1/29/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
Hey Chris,

I got this mostly working via an EXE, and a C# script that speaks the response from that EXE file, using the Kinect Script. Now, I can ask the computer current weather, and it spits out the weather from this script.

However, I want this script to run as an alarm. I change the Using CastleOSKinectService to using CastleOSCoreService, and uploaded it to action scripts. I set the script to fire as an event, and the logs have line items saying they ran the event, but I did not hear the announcement.

Can action scripts call TTS announcements the same way Kinect scripts can, with functions like ScriptingAPI.Speak(()?
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


1/29/2016
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Phil Hawthorne wrote:

Can action scripts call TTS announcements the same way Kinect scripts can, with functions like ScriptingAPI.Speak(()?



Yes they can, though there are a couple extra steps needed. In the Kinect scripts, they use the default speaker selection. But in the Core Service scripts, there is no default speaker selection, and the speaker must be selected.

There is a full explanation and walkthrough in DemoScript.cs located in C:\ProgramData\CastleOS\CastleOS Core Service\Scripts.
0 link
Phil Hawthorne
Phil Hawthorne
Posts: 400


1/29/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
Chris Cicchitelli wrote:

Yes they can, though there are a couple extra steps needed. In the Kinect scripts, they use the default speaker selection. But in the Core Service scripts, there is no default speaker selection, and the speaker must be selected.

There is a full explanation and walkthrough in DemoScript.cs located in C:\ProgramData\CastleOS\CastleOS Core Service\Scripts.

Thank you! I see those steps now

Cheers
0 link
Phil Hawthorne
Phil Hawthorne
Posts: 400


2/5/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
Hey Chris,

Just letting you know I finally got it to work. Had to restart the core service for scripts to work.

I'm going to tidy up the code, and make a new thread with instructions for others when this is ready.

Cheers
0 link
Phil Hawthorne
Phil Hawthorne
Posts: 400


2/6/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
This is just for anyone who comes onto this thread. I got this working, and have posted the code you can use for yourself to Github.

See this thread for more info: https://www.castleos.com/forum/topic771-jarvis-inspired-weather-wakeup-announcment.aspx?MessageID=5671#post5671
+1 link