Beispiel #1
0
        private static void ConfigureOptions()
        {
            if (optionsConfigured)
            {
                return;
            }

            var path = Path.GetFullPath(ConfigurationPath);

            if (!Directory.Exists(path))
            {
                throw new HomeAutomationException("Open Z-Wave configuration path not found at " + path);
            }

            optionsConfigured = true;

            var options = new ZWOptions();

            options.Create(path, string.Empty, string.Empty);

            // Add any app specific options here...
            options.AddOptionInt("SaveLogLevel", (int)ZWLogLevel.Error);                // ordinarily, just write "Detail" level messages to the log
            options.AddOptionInt("QueueLogLevel", (int)ZWLogLevel.Debug);               // save recent messages with "Debug" level messages to be dumped if an error occurs
            options.AddOptionInt("DumpTriggerLevel", (int)ZWLogLevel.Error);            // only "dump" Debug  to the log emessages when an error-level message is logged

            // Lock the options
            options.Lock();
        }
        private void SetOptions()
        {
            // the directory the config files are copied to in the post build
            _options.Create(_settings.ConfigurationPath, @"", @"");

            // logging options
            _options.AddOptionInt("SaveLogLevel", (int)ZWLogLevel.Debug);
            _options.AddOptionInt("QueueLogLevel", (int)ZWLogLevel.Debug);
            _options.AddOptionInt("DumpTriggerLevel", (int)ZWLogLevel.Error);

            // lock the options
            _options.Lock();
        }
Beispiel #3
0
        private static void SetOptions()
        {
            var options = new ZWOptions();

            options.Create(@"C:\work\OSS\ZBuildLights\lib\OpenZWave_1-3-Release\config", @"c:\temp\OzwDemo\UserData",
                           string.Empty);
            options.AddOptionInt("SaveLogLevel", (int)ZWLogLevel.None);
            options.Lock();
        }
        public override void RunInterface(string pluginName)
        {
            pName = pluginName;
            int poll = 60;
            if (OSAEObjectPropertyManager.GetObjectPropertyValue(pName, "Polling Interval").Value != string.Empty)
                poll = Int32.Parse(OSAEObjectPropertyManager.GetObjectPropertyValue(pName, "Polling Interval").Value);

            string port = OSAEObjectPropertyManager.GetObjectPropertyValue(pName, "Port").Value;

            logging.AddToLog("Port: " + port, true);
            try
            {
                if (port != "")
                {
                    // Create the Options
                    m_options = new ZWOptions();
                    m_options.Create(Common.ApiPath + @"\Plugins\ZWave\config\", Common.ApiPath + @"\Plugins\ZWave\", @"");

                    // Add any app specific options here...
                    m_options.AddOptionBool("ConsoleOutput", false);
                    m_options.AddOptionBool("IntervalBetweenPolls", true);
                    m_options.AddOptionInt("PollInterval", poll);

                    // Lock the options
                    m_options.Lock();

                    // Create the OpenZWave Manager
                    m_manager = new ZWManager();
                    m_manager.Create();
                    m_manager.OnNotification += new ManagedNotificationsHandler(NotificationHandler);

                    // Add a driver
                    m_manager.AddDriver(@"\\.\COM" + port);

                    //logging.AddToLog("Setting poll interval: " + poll.ToString(), true);
                    //m_manager.SetPollInterval(poll);
                    logging.AddToLog(Common.ApiPath + @"\Plugins\ZWave\Config", true);
                    logging.AddToLog("Zwave plugin initialized", true);
                }

            }
            catch (Exception ex)
            {
                logging.AddToLog("Error initalizing plugin: " + ex.Message, true);
            }
        }
Beispiel #5
0
        public MainForm()
        {
            // Initialize the form
            InitializeComponent();

            // Add the columns to the grid view
            // Data Grid
            NodeGridView.AutoGenerateColumns = false;
            NodeGridView.AllowUserToResizeColumns = true;
            NodeGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;

            DataGridViewTextBoxColumn column;
            //DataGridViewCheckBoxColumn check;

            // Id
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "ID";
            column.Name = "Node";
            column.ReadOnly = true;
            column.Frozen = false;
            column.Resizable = DataGridViewTriState.True;
            column.SortMode = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText = "The Z-Wave node ID of the device.\nThis value is not editable.";
            NodeGridView.Columns.Add(column);

            // Location
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Location";
            column.Name = "Location";
            column.Frozen = false;
            column.Resizable = DataGridViewTriState.True;
            column.SortMode = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText = "The user-defined location of the Z-Wave device.";
            NodeGridView.Columns.Add(column);

            // Name
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Name";
            column.Name = "Name";
            column.Frozen = false;
            column.Resizable = DataGridViewTriState.True;
            column.SortMode = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText = "The user-defined name for the Z-Wave device.";
            NodeGridView.Columns.Add(column);

            // Device Type
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Label";
            column.Name = "Type";
            column.ReadOnly = true;
            column.Frozen = false;
            column.Resizable = DataGridViewTriState.True;
            column.SortMode = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText = "The Z-Wave device type.\nThis value is not editable.";
            NodeGridView.Columns.Add(column);

            // Manufacturer
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Manufacturer";
            column.Name = "Manufacturer";
            column.Frozen = false;
            column.Resizable = DataGridViewTriState.True;
            column.SortMode = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText = "The manufacturer of the Z-Wave device.";
            NodeGridView.Columns.Add(column);

            // Product
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Product";
            column.Name = "Product";
            column.Frozen = false;
            column.Resizable = DataGridViewTriState.True;
            column.SortMode = DataGridViewColumnSortMode.NotSortable;
            column.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            column.ToolTipText = "The product name of the Z-Wave device.";
            NodeGridView.Columns.Add(column);

            /*            // Poll Interval
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "PollInterval";
            column.Name = "Poll Interval";
            column.ReadOnly = false;
            column.Frozen = false;
            column.Resizable = DataGridViewTriState.True;
            column.SortMode = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText = "Polling interval in seconds, or zero for no polling.\nNewer devices should not need to be polled for\nyour PC to know their current state.\nFor those that do requre polling, the interval should\nbe as long as possible to reduce network traffic.";
            NodeGridView.Columns.Add(column);
            */
            /*            // Schema
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Schema";
            column.Name = "Schema";
            column.ReadOnly = true;
            column.Frozen = false;
            column.Resizable = DataGridViewTriState.True;
            column.SortMode = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText = "The xPL message schema family that will be used\nif the 'Use zwave.basic' option is not checked.\nThe schema is chosen automatically according to\nthe Z-Wave device type, and cannot be changed.";
            NodeGridView.Columns.Add(column);

            // ZWaveBasic
            //check = new DataGridViewCheckBoxColumn();
            //check.DataPropertyName = "ZWaveBasic";
            //check.Name = "Use zwave.basic";
            //check.Frozen = false;
            //check.Resizable = DataGridViewTriState.True;
            //check.SortMode = DataGridViewColumnSortMode.NotSortable;
            //check.ToolTipText = "If the box is checked, the device will send and respond to\nnative zwave.basic messages rather than those of the\ngeneric schema family listed under the Schema column.";
            //NodeGridView.Columns.Add(check);
            */
            // Level
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Level";
            column.Name = "Level";
            column.Frozen = false;
            column.Resizable = DataGridViewTriState.True;
            column.SortMode = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText = "Current level of the device";
            NodeGridView.Columns.Add(column);

            // On-Off button
            DataGridViewButtonColumn buttonColumn = new DataGridViewButtonColumn();
            buttonColumn.DataPropertyName = "ButtonText";
            buttonColumn.Name = "Power";
            buttonColumn.Frozen = false;
            buttonColumn.Resizable = DataGridViewTriState.True;
            buttonColumn.SortMode = DataGridViewColumnSortMode.NotSortable;
            buttonColumn.ToolTipText = "Click a button to turn a light on or off";
            NodeGridView.Columns.Add(buttonColumn);

            BindingSource bs = new BindingSource();
            bs.DataSource = m_nodeList;
            NodeGridView.DataSource = bs;

            // Create the Options
            m_options = new ZWOptions();
            m_options.Create(@"..\..\..\..\..\..\..\config\", @"", @"");

            // Add any app specific options here...
            m_options.AddOptionInt("SaveLogLevel", (int)ZWLogLevel.Detail);			// ordinarily, just write "Detail" level messages to the log
            m_options.AddOptionInt("QueueLogLevel", (int)ZWLogLevel.Debug);			// save recent messages with "Debug" level messages to be dumped if an error occurs
            m_options.AddOptionInt("DumpTriggerLevel", (int)ZWLogLevel.Error);		// only "dump" Debug  to the log emessages when an error-level message is logged

            // Lock the options
            m_options.Lock();

            // Create the OpenZWave Manager
            m_manager = new ZWManager();
            m_manager.Create();
            m_manager.OnNotification += new ManagedNotificationsHandler(NotificationHandler);

            // Add a driver
            m_driverPort = @"\\.\COM4";
            m_manager.AddDriver(m_driverPort);
            //			m_manager.AddDriver(@"HID Controller", ZWControllerInterface.Hid);
        }
        public void RunInterface(string pluginName)
        {
            pName = pluginName;
            int poll = 60;
            if (osae.GetObjectPropertyValue(pName, "Polling Interval").Value != "")
                poll = Int32.Parse(osae.GetObjectPropertyValue(pName, "Polling Interval").Value);

            string port = osae.GetObjectPropertyValue(pName, "Port").Value;

            osae.AddToLog("Port: " + port, true);
            try
            {
                if (port != "")
                {
                    // Create the Options
                    m_options = new ZWOptions();
                    m_options.Create(osae.APIpath + @"\AddIns\ZWave\config\", osae.APIpath + @"\AddIns\ZWave\", @"");

                    // Add any app specific options here...
                    m_options.AddOptionBool("ConsoleOutput", false);
                    m_options.AddOptionBool("IntervalBetweenPolls", true);
                    m_options.AddOptionInt("PollInterval", 50);

                    // Lock the options
                    m_options.Lock();

                    // Create the OpenZWave Manager
                    m_manager = new ZWManager();
                    m_manager.Create();
                    m_manager.OnNotification += new ManagedNotificationsHandler(NotificationHandler);

                    // Add a driver
                    m_manager.AddDriver(@"\\.\COM" + port);

                    //osae.AddToLog("Setting poll interval: " + poll.ToString(), true);
                    //m_manager.SetPollInterval(poll);
                    osae.AddToLog(osae.APIpath + @"\AddIns\ZWave\Config", true);
                    osae.AddToLog("Zwave plugin initialized", true);
                }

                osae.ObjectTypeUpdate("ZWAVE DIMMER", "ZWAVE DIMMER", "ZWave Dimmer", pName, "MULTILEVEL SWITCH", 0, 0, 0, 1);
                osae.ObjectTypeUpdate("ZWAVE BINARY SWITCH", "ZWAVE BINARY SWITCH", "ZWave Binary Switch", pName, "BINARY SWITCH", 0, 0, 0, 1);
                osae.ObjectTypeUpdate("ZWAVE THERMOSTAT", "ZWAVE THERMOSTAT", "ZWave Thermostat", pName, "THERMOSTAT", 0, 0, 0, 1);
                osae.ObjectTypeUpdate("ZWAVE REMOTE", "ZWAVE REMOTE", "ZWave Remote", pName, "ZWAVE REMOTE", 0, 0, 0, 1);
                osae.ObjectTypeUpdate("ZWAVE MULTISENSOR", "ZWAVE MULTISENSOR", "ZWave MultiSensor", pName, "ZWAVE MULTISENSOR", 0, 0, 0, 1);
                osae.ObjectTypeUpdate("ZWAVE HOME ENERGY METER", "ZWAVE HOME ENERGY METER", "ZWave Home Energy Meter", pName, "ZWAVE HOME ENERGY METER", 0, 0, 0, 1);
                osae.ObjectTypeUpdate("ZWAVE SMART ENERGY SWITCH", "ZWAVE SMART ENERGY SWITCH", "ZWave Smart Energy Switch", pName, "ZWAVE SMART ENERGY SWITCH", 0, 0, 0, 1);

                #region Screen Init
                //osae.ObjectPropertySet("Screen - ZWave Manager - ZWave - ADD CONTROLLER", "Object Name", pName);
                //osae.ObjectPropertySet("Screen - ZWave Manager - ZWave - ADD DEVICE", "Object Name", pName);
                //osae.ObjectPropertySet("Screen - ZWave Manager - ZWave - REMOVE CONTROLLER", "Object Name", pName);
                //osae.ObjectPropertySet("Screen - ZWave Manager - ZWave - REMOVE DEVICE", "Object Name", pName);
                #endregion
            }
            catch (Exception ex)
            {
                osae.AddToLog("Error initalizing plugin: " + ex.Message, true);
            }
        }
Beispiel #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainForm"/> class.
        /// </summary>
        public MainForm()
        {
            // Initialize the form
            InitializeComponent();

            // Add the columns to the grid view
            // Data Grid
            NodeGridView.AutoGenerateColumns      = false;
            NodeGridView.AllowUserToResizeColumns = true;
            NodeGridView.AutoSizeColumnsMode      = DataGridViewAutoSizeColumnsMode.DisplayedCells;

            DataGridViewTextBoxColumn column;

            //DataGridViewCheckBoxColumn check;

            // Id
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "ID";
            column.Name             = "Node";
            column.ReadOnly         = true;
            column.Frozen           = false;
            column.Resizable        = DataGridViewTriState.True;
            column.SortMode         = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText      = "The Z-Wave node ID of the device.\nThis value is not editable.";
            NodeGridView.Columns.Add(column);

            // Location
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Location";
            column.Name             = "Location";
            column.Frozen           = false;
            column.Resizable        = DataGridViewTriState.True;
            column.SortMode         = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText      = "The user-defined location of the Z-Wave device.";
            NodeGridView.Columns.Add(column);

            // Name
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Name";
            column.Name             = "Name";
            column.Frozen           = false;
            column.Resizable        = DataGridViewTriState.True;
            column.SortMode         = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText      = "The user-defined name for the Z-Wave device.";
            NodeGridView.Columns.Add(column);

            // Device Type
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Label";
            column.Name             = "Type";
            column.ReadOnly         = true;
            column.Frozen           = false;
            column.Resizable        = DataGridViewTriState.True;
            column.SortMode         = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText      = "The Z-Wave device type.\nThis value is not editable.";
            NodeGridView.Columns.Add(column);

            // Manufacturer
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Manufacturer";
            column.Name             = "Manufacturer";
            column.Frozen           = false;
            column.Resizable        = DataGridViewTriState.True;
            column.SortMode         = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText      = "The manufacturer of the Z-Wave device.";
            NodeGridView.Columns.Add(column);

            // Product
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Product";
            column.Name             = "Product";
            column.Frozen           = false;
            column.Resizable        = DataGridViewTriState.True;
            column.SortMode         = DataGridViewColumnSortMode.NotSortable;
            column.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            column.ToolTipText      = "The product name of the Z-Wave device.";
            NodeGridView.Columns.Add(column);

/*            // Poll Interval
 *          column = new DataGridViewTextBoxColumn();
 *          column.DataPropertyName = "PollInterval";
 *          column.Name = "Poll Interval";
 *          column.ReadOnly = false;
 *          column.Frozen = false;
 *          column.Resizable = DataGridViewTriState.True;
 *          column.SortMode = DataGridViewColumnSortMode.NotSortable;
 *          column.ToolTipText = "Polling interval in seconds, or zero for no polling.\nNewer devices should not need to be polled for\nyour PC to know their current state.\nFor those that do requre polling, the interval should\nbe as long as possible to reduce network traffic.";
 *          NodeGridView.Columns.Add(column);
 */
/*            // Schema
 *          column = new DataGridViewTextBoxColumn();
 *          column.DataPropertyName = "Schema";
 *          column.Name = "Schema";
 *          column.ReadOnly = true;
 *          column.Frozen = false;
 *          column.Resizable = DataGridViewTriState.True;
 *          column.SortMode = DataGridViewColumnSortMode.NotSortable;
 *          column.ToolTipText = "The xPL message schema family that will be used\nif the 'Use zwave.basic' option is not checked.\nThe schema is chosen automatically according to\nthe Z-Wave device type, and cannot be changed.";
 *          NodeGridView.Columns.Add(column);
 *
 *          // ZWaveBasic
 *          //check = new DataGridViewCheckBoxColumn();
 *          //check.DataPropertyName = "ZWaveBasic";
 *          //check.Name = "Use zwave.basic";
 *          //check.Frozen = false;
 *          //check.Resizable = DataGridViewTriState.True;
 *          //check.SortMode = DataGridViewColumnSortMode.NotSortable;
 *          //check.ToolTipText = "If the box is checked, the device will send and respond to\nnative zwave.basic messages rather than those of the\ngeneric schema family listed under the Schema column.";
 *          //NodeGridView.Columns.Add(check);
 */
            // Level
            column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = "Level";
            column.Name             = "Level";
            column.Frozen           = false;
            column.Resizable        = DataGridViewTriState.True;
            column.SortMode         = DataGridViewColumnSortMode.NotSortable;
            column.ToolTipText      = "Current level of the device";
            NodeGridView.Columns.Add(column);

            // On-Off button
            DataGridViewButtonColumn buttonColumn = new DataGridViewButtonColumn();

            buttonColumn.DataPropertyName = "ButtonText";
            buttonColumn.Name             = "Power";
            buttonColumn.Frozen           = false;
            buttonColumn.Resizable        = DataGridViewTriState.True;
            buttonColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            buttonColumn.ToolTipText      = "Click a button to turn a light on or off";
            NodeGridView.Columns.Add(buttonColumn);

            BindingSource bs = new BindingSource();

            bs.DataSource           = m_nodeList;
            NodeGridView.DataSource = bs;

            // Create the Options
            m_options = new ZWOptions();
            m_options.Create(@"C:\code\open-zwave\config", @"", @"");

            // Add any app specific options here...
            m_options.AddOptionInt("SaveLogLevel", (int)ZWLogLevel.Detail);
            // ordinarily, just write "Detail" level messages to the log
            m_options.AddOptionInt("QueueLogLevel", (int)ZWLogLevel.Debug);
            // save recent messages with "Debug" level messages to be dumped if an error occurs
            m_options.AddOptionInt("DumpTriggerLevel", (int)ZWLogLevel.Error);
            // only "dump" Debug  to the log emessages when an error-level message is logged

            // Lock the options
            m_options.Lock();

            // Create the OpenZWave Manager
            m_manager = new ZWManager();
            m_manager.Create();
            m_manager.OnNotification += new ManagedNotificationsHandler(NotificationHandler);

            // Add a driver
            m_driverPort = @"\\.\COM5";
            m_manager.AddDriver(m_driverPort);
//			m_manager.AddDriver(@"HID Controller", ZWControllerInterface.Hid);
        }
Beispiel #8
0
        private static void ConfigureOptions()
        {
            if (optionsConfigured)
            {
                return;
            }

            var path = Path.GetFullPath(ConfigurationPath);

            if (!Directory.Exists(path))
            {
                throw new HomeAutomationException("Open Z-Wave configuration path not found at " + path);
            }

            optionsConfigured = true;

            var options = new ZWOptions();
            options.Create(path, string.Empty, string.Empty);

            // Add any app specific options here...
            options.AddOptionInt("SaveLogLevel", (int)ZWLogLevel.Error);			// ordinarily, just write "Detail" level messages to the log
            options.AddOptionInt("QueueLogLevel", (int)ZWLogLevel.Debug);			// save recent messages with "Debug" level messages to be dumped if an error occurs
            options.AddOptionInt("DumpTriggerLevel", (int)ZWLogLevel.Error);		// only "dump" Debug  to the log emessages when an error-level message is logged

            // Lock the options
            options.Lock();
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            Console.WriteLine("Begin");
            _mre = new ManualResetEvent(false);

            OpenZWaveDotNet.ZWManager manager = new OpenZWaveDotNet.ZWManager();

            var options = new ZWOptions();
            options.Create(@"..\..\config", @"", @"");

            // Add any app specific options here...
            options.AddOptionInt("SaveLogLevel", (int)ZWLogLevel.None);
            // ordinarily, just write "Detail" level messages to the log
            options.AddOptionInt("QueueLogLevel", (int)ZWLogLevel.None);
            // save recent messages with "Debug" level messages to be dumped if an error occurs
            options.AddOptionInt("DumpTriggerLevel", (int)ZWLogLevel.None);
            // only "dump" Debug  to the log emessages when an error-level message is logged

            // Lock the options
            options.Lock();

            _manager = new ZWManager();

            _manager.Create();

            _manager.OnNotification += new ManagedNotificationsHandler(NotificationHandler);

            var driverPort = @"\\.\COM3";
            _manager.AddDriver(driverPort);

            _mre.WaitOne();

            var sensor = PrintValuesForDevice("Routing Binary Sensor");
            _manager.SetNodeProductName(sensor.HomeId, sensor.Id, "Garage Door Sensor");

            foreach (var n in _nodeList)
            {
                Console.WriteLine("======================================");
                Console.WriteLine("Label: " + n.Label);
                Console.WriteLine("location: " + n.Location);
                Console.WriteLine("Manufacturer: " + n.ManufacturerName);

                var name = _manager.GetNodeName(sensor.HomeId, n.Id);
                n.Name = name;

                Console.WriteLine("Name: " + n.Name);
                Console.WriteLine("Product: " + n.Product);
                Console.WriteLine("Node Id: " + n.Id);
                Console.WriteLine("======================================");
            }

            // var node = _nodeList.FirstOrDefault(x => x.Product == "45609 On/Off Relay Switch");

            // _manager.SetPollInterval(1000, true);
            var node = PrintValuesForDevice("Binary Power Switch");

            Console.WriteLine("");
            Console.WriteLine("");
            Console.WriteLine("Getting value of basement light switch:");
            ZWValueID v = node.ValueIds.First(x => _manager.GetValueLabel(x) == "Switch");
            bool ret;
            bool b;
            ret = _manager.GetValueAsBool(v, out b);
            Console.WriteLine("SWITCH: Got bool value of " + b + ", success: " + ret);

            var v2 = sensor.ValueIds.First(x => _manager.GetValueLabel(x) == "Sensor");
            ret = _manager.GetValueAsBool(v2, out b);
            Console.WriteLine("SENSOR: Got bool value of " + b + ", success: " + ret);

            //int i;
            //ret = _manager.GetValueAsInt(v, out i);
            //Console.WriteLine("got in value of " + i + ", success: " + ret);

            //string str;
            //ret = _manager.GetValueAsString(v, out str);
            //Console.WriteLine("got string value of " + str + ", success: " + ret);

            // ret = _manager.SetValue(v, true);
            //Console.WriteLine("Set bool value to false, success: " + ret);

            Console.WriteLine("Press enter...");
            Console.ReadLine();
        }