LOGIN  |  REGISTER
Smart Living Made Brilliant!
CASTLEOS FORUM

rpiwally

all messages by user

12/12/2015
Topic:
API

Michael Wallace
Michael Wallace
New Core Service available for download.
12/24/2015
Topic:
This isn't the white Christmas I signed up for!

Michael Wallace
Michael Wallace
Chris, I am getting the same issue. I have tried with 1.3.2160 on my Win7 laptop, as well as 1.3.1977, .2130, and .2160 on my desktop. Between all installs, the ProgramData\CastleOS and Program Files (x86)\CastleOS folders were deleted. On one of them, I got a 503 error vice the white screen. I don't know if that helps. Any ideas? When my CastleHub stopped working, it was working, I restarted it, and the white screen began.

Mike
12/26/2015
Topic:
Scripts not running

Michael Wallace
Michael Wallace
So I am using the http request Node.js server for Sonos, and am attempting to setup Kinect scripts to make the http requests. The below script is an example of one. It works just fine when compiled via csc in the command line, but does not work at all throu CastleOS. Any ideas?

using System.IO;
using System.Net;
using System.Text;
using System.Diagnostics;

public class MyScript
{
public static void Main()
{
Process.Start(@".\RemoteAppLaunchClient.exe","10.75.130.10 iexplore.exe http://localhost:5005/office/playlist/mix");
System.Threading.Thread.Sleep((int)System.TimeSpan.FromSeconds(3).TotalMilliseconds);
Process[] AllProcesses = Process.GetProcesses();
foreach (var process in AllProcesses)
{
if (process.MainWindowTitle != "")
{
string s = process.ProcessName.ToLower();
if (s.Contains("iexplore"))
process.Kill();
}
}
}
}

Thanks,
Mike
1/2/2016
Topic:
Scripts not running

Michael Wallace
Michael Wallace
Hey Chris,

Here is the msdn csc info: https://msdn.microsoft.com/en-us/library/78f4aasd.aspx

My end all goal for these scripts currently is to have CastleOS navigate to http://localhost:5005/office/volume/50 (an example) to set the volume of the office Sonos Play1 to 50%. I tried using the example script that Nick put out earlier, but nothing happens with that one either. The above coe, when compiled in an exe and run on its own runs perfectly. Remote App Launcher starts IE, goes to the page, the volume changes, and after a few second wait, IE closes. If tried putting various versions of the script in as Kinect scripts as well as Action scripts as a standalone scene. Nothing happens, though the Kinect command is recognized. Any ideas?
1/7/2016
Topic:
Scripts not running

Michael Wallace
Michael Wallace
So,

I made a scene and attached a .cs file with the above LOC and the appropriate headers. Nothing happened. Any ideas? Also, in the Kinect configurator, the credentials are accepted, but the device/group/scene lists are empty. However, in the Core service, all is normal. Ideas on this?

Thanks,

Mike
1/11/2016
Topic:
Scripts not running

Michael Wallace
Michael Wallace
Hahaha yes! Victory! And I feel dumb now. I debug/write software for a living and missed that. Smh. Thank you both for the help. Chris, on the Kinect versioning, maybe you could put the version on the website so that we know what version we are getting? Thanks again.
1/15/2016
Topic:
Scripts not running

Michael Wallace
Michael Wallace
Tommy,

Nothing in particular. The using CastleOSCoreService, which I forgot, basically tells the computer to use that service to execute the script. You would use using CastleOSKinectService; for Kinect executed scripts.

Mike
1/27/2016
Topic:
Remote Application Launcher

Michael Wallace
Michael Wallace
Looking to send multiple parameters to control my Harmony Hub via the Harmony Console project (google Harmony C#). I need to send something along the lines of "192.168.1.2 HarmonyConsole.exe -u myemail@domain.com -p mypassword -i Harmony.hub.ip.address -s activity_id_#"

All it seems to do is open the app launcher and chill there. Opening Internet explorer works find, so it seems that there may need to be a code modification.

Mike
1/27/2016
Topic:
Remote Application Launcher

Michael Wallace
Michael Wallace
Phil Hawthorne wrote:
Michael Wallace wrote:
Looking to send multiple parameters to control my Harmony Hub via the Harmony Console project (google Harmony C#). I need to send something along the lines of "192.168.1.2 HarmonyConsole.exe -u myemail@domain.com -p mypassword -i Harmony.hub.ip.address -s activity_id_#"

All it seems to do is open the app launcher and chill there. Opening Internet explorer works find, so it seems that there may need to be a code modification.

Mike


Hey Mike

That's frustrating. Just out of curiosity, how are you getting client to execute in your c# script? I'm using the latest version of CastleOS Kinect, and as soon as my c# script tries to call the client.exe, the service crashes.




I registered RemoteAppLaunchClient.exe in the registry in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths, so that I can just call "RemoteAppLaunchClient.exe" and was using the parameters as above. I got the harmony working, and I will post that in a separate post with instructions shortly. Big Grin
1/27/2016
Topic:
Logitech Harmony Hub scripting

Michael Wallace
Michael Wallace
I'd like to start this off with a huge thank you to the pyharmony, harmonyhubclient, harmony c# git users that laid the ground work.

That being said, below is how I implemented the harmony c# project code with CastleOS.

First download the attached Harmony.zip. It is the built version of this git repository:https://github.com/hdurdle/harmony

Second: My recommendation is to register HarmonyConsole in the registry. Go to run (Windows + R) and type regedit,. Hit Enter.
Go to: HKLM (HKEY-LOCAL-MACHINE)\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths. Right click on App Paths and Add new Key. Name it HarmonyConsole.exe. In the right side of the registry editor, double click on Default. Type the path to HarmonyConsole.exe (e.g. C:\ProgramData\CastleOS\Harmony\HarmonyConsole.exe). Hit Enter. Close the registry editor.

Okay, now to learn the activity and device ids. Download HarmonyHubControl.exe1 and rename it to remove the 1. (Note, the other program may work for you instead of this one, but this one definitely worked for me). Run the command prompt (Windows + R then type cmd and hit enter). Navigate to where harmonyhubcontrol.exe is located. Type the following: Harmonyhubcontrol.exe myemail@domain.com my_password harmony.hub.ip.address get_config > C:\harmony.txt (Yes type the > and all).

The above command sends everything on your hub to that text file. In it are your activity and device ids, as well as potential commands to send to the hub (e.g. VolumeUp on the TV). You are now done with HarmonyHubControl.exe. You will have some sifting to do to determine which devices are which, but if you search by manufacturer or device name it is fairly straightforward.

Now, FINALLY time to link up with CastleOS. Attached is a script with 4 sample commands to the hub. Replace activity and device id with the NUMBER not the phrase (e.g. 12345678 not WatchTV). Load the script in as you would any other.


Edit: Steps 1 and 2 would need to be done on EACH computer that controls a Kinect that you wish to use to control a Harmony Hub in addition to loading the scripts on each computer. Sorry. I tried to use the RemoteAppLaunchClient, but it would not work correctly.
edited by rpiwally on 1/28/2016
1/29/2016
Topic:
Hue Bridge Not Found

Michael Wallace
Michael Wallace
Same issue. I'm running CastleOS 1.3.2175. Both Hub and Hue hub connected via Ethernet.
1/30/2016
Topic:
NPR News script

Michael Wallace
Michael Wallace
For some reason, CastleOS does not read the following script. Commenting out the using CastleOSKinectService line, changing ScriptingAPI.Speak to MessageBox.Show and compiling with the Developer command prompt seems to work perfectly. Any ideas?
1/30/2016
Topic:
NPR News script

Michael Wallace
Michael Wallace
Removed it, no dice. I just compiled it into a Console app and used System.Speech for TTS. Called it using Process.Start. It works perfectly. Console window doesn't even show up, which is even better.
2/10/2016
Topic:
API

Michael Wallace
Michael Wallace
Any update on 2.0 Chris?
2/14/2016
Topic:
Protocol & Device Support Suggestions

Michael Wallace
Michael Wallace
Chris,

A couple of things: In the original post you said that you'd keep a running list on there. Can you update that as Z-wave in general is supported, so it is obviously outdated.

1. Power meters, are they supported, specifically Aeotec v2?
2. Arduino with Z-wave (ZIY.io)
2/15/2016
Topic:
The Aeotec Z-Wave Z-Stick, Gen5

Michael Wallace
Michael Wallace
Mbassham wrote:
Looks like I'm running 1.3.2157. Aaaarrrggghh! How do I update?


Download from the downloads page (https://castleos.com/download.aspx) and run the install.
edited by rpiwally on 2/15/2016
2/18/2016
Topic:
Z-Wave Parameters

Michael Wallace
Michael Wallace
Chris,

Anything coming allowing us to modify the various parameters in the GUI for z-wave products (e.g. whether the blue light is on for the GE switches or whether the dimmer goes straight to 100% or ramps up to 100%)?
3/3/2016
Topic:
Calendar based events

Michael Wallace
Michael Wallace
Chris (well both of you I guess),

I have had some luck integrating Google's Calendar API with C#. Start here: https://developers.google.com/google-apps/calendar/quickstart/dotnet
It has pretty straightforward instructions. You can probably add some if statements to the end to execute specific C# functions that would call CastleOS functions. I currently have it modified to read my events for the current month and next month out load when asked via Kinect custom command.

Edit: I attached MY program.cs file, which varies from the Google one as I mentioned above. Instead of reading out loud, just run your wakeup scene in CastleOS.
edited by rpiwally on 3/3/2016
3/3/2016
Topic:
Calendar based events

Michael Wallace
Michael Wallace
What it reads to me is "Event name" "Start date" "Start time", so it definitely can read those. I don't know if # are even necessary.

if(eventname="Event Name")
run wakeup scene

(obviously IMMENSELY simplified) Downside, you need some COS trigger to run the C# script to run the compiled .exe, sooooooooooooooooo..................yeah
3/3/2016
Topic:
Phillips hue support

Michael Wallace
Michael Wallace
Still can't find my Hue Gen1 Hub. Just searches to find nothing. How long should it realistically take if both Hue Hub and CastleHub are plugged into same router (hardwired)?