more G-Labs products

Author Topic: Help a Newbie with zwave and field formats and timing  (Read 1395 times)

September 16, 2015, 04:38:45 PM
Read 1395 times

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
I am not a coder but have been in computers since the early 70s. I have gotten HG up and running.
Sorry if this has been covered before I am new here and did not find the info I needed so I thought I would post this. Thanks in advance for any help !!

Added my zwave devices to HG. There are many issues that I cannot figure out. These  are my initial questions. Hopefully the answers will get me on track to figuring out some of the other issues.
 
1)the most frustrating issue is what belongs in some of the fields for example when configuring a simple binary switch there is a features/options pull-down. lets say you select timetable . That gives you 4 fields to enter in "week-end, work days, Holidays, Special Days" I have no Idea the format of the entry that should be there. where can I find info on the entry formats?


2) I have a light that once it is turned on I want it to shut off 3 minutes later. it almost works
I turned on the  zwave level poll which is how the system determines the switch was turned on  and in automatic turn off I set it for the correct amount of time. However every time a pole happens it restarts the timer so the light never goes off unless the poll interval is greater that the turn off delay. How do I solve this?
« Last Edit: September 16, 2015, 04:41:21 PM by MItchCECG »

September 16, 2015, 05:16:09 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
1) just put the schedule number you want to use for each field  (1 to 10) - this will be more intuitive (perhaps a select field) in the future
2) use latest hg version (1.1 r494 pre-release) http://genielabs.github.io/HomeGenie/download.html (recommended) or alternatively try updating the "Automatic turn off" program code with the following:

Code: [Select]
When.ModuleParameterIsChanging((module, parameter) => {
  // check if the module raising the event has the Turn Off Delay set
  if (module.HasFeature("HomeGenie.TurnOffDelay") && module.Parameter("HomeGenie.TurnOffDelay").DecimalValue > 0)
  {
    // Check if the module has just been turned on
    if (parameter.Is("Status.Level") && parameter.Statistics.Last.Value == 0 && parameter.DecimalValue > 0)
    {
      // Run a background timer that will turn off the light
      var pausedelay = module.Parameter("HomeGenie.TurnOffDelay").DecimalValue;
      Program.RunAsyncTask(()=>{
        Pause(pausedelay);
        // Check if the light is still on, also module.IsOn could be used
        if (parameter.DecimalValue > 0)
        {
          module.Off();
          Program.Notify(
            "Turn Off Delay",
            module.Instance.Name + "<br>" +
            module.Instance.Address +
            " switched off.");
        }
      });
    }
  }
  return true;
});
// the program will be running in the background waiting for events
Program.GoBackground();


September 16, 2015, 05:51:32 PM
Reply #2

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
Thanks for the quick response
I think I get the timetable issue other than using sundown and sunup to control a light.
1) So how would you do that?

2) you suggest that I use 1.1 r494 pre-release but I am on windows and I do not see the download I am on 1.0 beta(r491) is there a windows version of what you recommend ?

3) You have supplied some code where should I put it (be Nice) ?

THANX
« Last Edit: September 16, 2015, 05:57:11 PM by MItchCECG »

September 16, 2015, 05:58:39 PM
Reply #3

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
1) did not understand
2) http://www.homegenie.it/docs/automation_getstarted.php there's docs about how to get started with HG. the code is meant to be replaced in the existing automation program you find in Programs->Energy Saving group. after replacing the code click on the "Compile" button and you're done. Still suggest to upgrade to 1.1.


September 16, 2015, 06:10:20 PM
Reply #4

MItchCECG

  • *
  • Information
  • Newbie
  • Posts: 19
sorry for the confusion

1) the question is using the timetable or a different method how do i get a zwave  light to turn off at sunrise and on at sunset 

2) i want to follow your suggestion to  "Still suggest to upgrade to 1.1."  is there a Windows version I can download I do not see it at the link supplied

September 16, 2015, 06:54:47 PM
Reply #5

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
1) you can use "Scheduled on/off" feature and fill in the field with @Sunrise or @Sunset. search the forum for "Solar Altitude" which is a nice automation program that can be used with scheduled on/off app
2) did miss that you're running hg on windows. The windows setup will be available with 1.1 final (the currently linked is a pre-release). so try updating the "Automatic turn off" program.