LOGIN  |  REGISTER
Smart Living Made Brilliant!
CASTLEOS FORUM

HomeBug Reports

A forum topic for reporting bugs and other issues with CastleOS

Core Scripts: Default demo script doesn't work Messages in this topic - RSS

Phil Hawthorne
Phil Hawthorne
Posts: 400


1/29/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
Just tried to use the demo script to select my Sonos speakers. It didn't work.

I created an event to run the default demo script at the date and time specified. The event fired, but this line didn't fire, or anything else in the script.

ScriptingAPI.WriteDatabaseEntry("This is a test database entry.");


Neither did the announcement to "all speakers".

In the event log, it says "running scheduled event", and "running DemoScript", but that test line above does not appear in the raw log at all.

Just to confirm, I haven't changed the default script in any way. I've attached it here incase its different somehow.
edited by philhawthorne on 1/29/2016


Attachments:
DemoScript.cs
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


2/2/2016
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Seems as though the script didn't run at all. Are other scripts running?
0 link
Phil Hawthorne
Phil Hawthorne
Posts: 400


2/2/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
To be honest I'm not sure.

I first changed my Kinect script over from Using CastleOSKinect to using CastleOSCore, and tried to run it. Then tried the demo script after a restart etc.

I was hoping the demo script was a way for me to verify that everything was executing as expected, but I couldn't get it to run.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


2/2/2016
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Create a demo script that only calls a line to log "I'm running". Restart the core service and see if it logs it. I think that if a script throws and errors, scripts won't run until it reboots. So this will at least allow us to ensure the script script processor is processing the script.
0 link
Phil Hawthorne
Phil Hawthorne
Posts: 400


2/2/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
Aha!

I definitely tried just outputtig to the log, but don't think I did the restart. I'll give that a go and see if I can get it to log.
0 link
Phil Hawthorne
Phil Hawthorne
Posts: 400


2/3/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
OK reset the CastleHUB, and scheduled the demo script, this time only outputting data to the log file. Same result, log file shows the event was triggered, but no output to the event log
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


2/4/2016
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Is anything being output to the Windows Event Log, aka the Event Viewer? Sounds like something is failing in the stack, but it's passing our tests here..
0 link
Phil Hawthorne
Phil Hawthorne
Posts: 400


2/4/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
Hmm good question. I'll check the Windows event log here and see what it has in it.

Does CastleOS output any debug/info notices to the Windows Event viewer when running a script? When running a Kinect command I can always see what was said via that.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390


2/4/2016
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3390
Only the Kinect Service uses the Windows log for tracking voice commands. Everything else is either handled, and goes to CastleOS' Errors.xml, or is unhandled, and goes to the Windows error log.
0 link
Phil Hawthorne
Phil Hawthorne
Posts: 400


2/4/2016
Phil Hawthorne
Phil Hawthorne
Posts: 400
Chris Cicchitelli wrote:
Only the Kinect Service uses the Windows log for tracking voice commands. Everything else is either handled, and goes to CastleOS' Errors.xml, or is unhandled, and goes to the Windows error log.


Cool, I'll check both places and see if there's anything there
0 link