Announcement

Collapse
No announcement yet.

"Index was out of Range" Error.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SteveMSJ
    replied
    Originally posted by MichaelV View Post
    Thanks, I think I understand where I went wrong. I really do not need the five minutes after sunset or the 5 minutes before sunrise so how does this look?

    If the zone is opened any time between sun set and sun rise, the action will occur.
    That looks good.

    Leave a comment:


  • MichaelV
    replied
    Thanks, I think I understand where I went wrong. I really do not need the five minutes after sunset or the 5 minutes before sunrise so how does this look?

    If the zone is opened any time between sun set and sun rise, the action will occur.





    Attached Files

    Leave a comment:


  • SteveMSJ
    replied
    Originally posted by MichaelV View Post
    You are right about the events being named differently, my bad, but the conditions, Time period, would be the same. For example, I would want this event to run from 5 minutes after sunset on lets say "Tuesday" to 5 minutes before Sunrise the following day, Wednesday, if the event trigger happened. Did I write the Time condition correctly for that?

    Thanks

    MV
    No, your time Trigger and time Condition are both exact times not before or afters. The trigger (IF) needs to be a moment in time. Not necessarily time related but something that happens like a device changing state.

    I don't fully understand what your setup is, and there are many ways of arranging things, but you probably want your Zone opening ( if that is some kind of motion sensor) to be the trigger (IF). Your conditions (AND IF) would be the time range. As your time range spans midnight the easiest way is to split this so that you have two triggers each with a condition, something like:

    IF the motion sensor changes to open
    AND IF the time is before Sunrise
    OR IF the motion sensor changes to open
    AND IF The time is after sunset
    THEN Whatever your action is

    The OR IF is a separate Trigger just like the IF and each trigger can have its own set of Conditions (AND IFs).
    However if you want the start and end of your time ranges to be offset from Sunset and Sunrise I don't think offhand that HS has a native condition. You could use the EasyTrigger plug-in which can do that or else you can set up a virtual device and use events to turn it off and on at the beginning and end of the time range. You would then use the virtual device state as a condition in an event triggered by the motion sensor.

    Search for the Event Clinic on this board which explains all this and much more. It was written for HS3 but it is almost all the same in HS4.

    Steve
    ​​​

    ​EDIT whilst I was typing this Wade has also answered and I see we have interpreted what you are trying to do very differently. You will need to be more specific.

    Leave a comment:


  • Wade
    replied
    Originally posted by MichaelV View Post
    You are right about the events being named differently, my bad, but the conditions, Time period, would be the same. For example, I would want this event to run from 5 minutes after sunset on lets say "Tuesday" to 5 minutes before Sunrise the following day, Wednesday, if the event trigger happened. Did I write the Time condition correctly for that?

    Thanks

    MV
    You need separate ON and OFF events. An event typically runs just once, not continuously over a period of time.

    IF the time is 5m, 0s after sunset
    AND IF Napco Gemini : Zone Opened for [Area 2]...
    THEN Set Device Garage Flood Lights to ON

    IF the time is 5m before sunrise
    THEN Set Device Garage Flood Lights to OFF


    edit: I realize now it's not fully clear what your intent is. Above is for the light to be on all night. If your intention is that the Napco Gemini device trigger the light to come on anytime between sunset and sunrise, then the above isn't correct.

    Leave a comment:


  • MichaelV
    replied
    You are right about the events being named differently, my bad, but the conditions, Time period, would be the same. For example, I would want this event to run from 5 minutes after sunset on lets say "Tuesday" to 5 minutes before Sunrise the following day, Wednesday, if the event trigger happened. Did I write the Time condition correctly for that?

    Thanks

    MV

    Leave a comment:


  • SteveMSJ
    replied
    Originally posted by MichaelV View Post
    Set up a new scene triggered by a napco Gemini trigger.

    I am getting this message

    10/20/2021 6:05:02 PM
    HomeSeer
    Error
    Event Turn On Garage Floods with Car-Tel action to control a device failed: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index


    Here is the event:



    I'm not sure of your error message but the event you have posted would only fire automatically in the unlikely case that Sunrise was exactly 10 minutes after Sunset. Your trigger (IF) is 5 minutes after sunset with a condition (AND IF) that the time is 5 minutes before sunrise. Are you perhaps triggering the event manually?

    Also, the name of the event you posted appears slightly different to the one in the error message which is missing 'Lights' off the end. Is it a different event or has HS truncated the name in the error message?

    Steve

    Leave a comment:


  • MichaelV
    started a topic "Index was out of Range" Error.

    "Index was out of Range" Error.

    Set up a new scene triggered by a napco Gemini trigger.

    I am getting this message

    10/20/2021 6:05:02 PM
    HomeSeer
    Error
    Event Turn On Garage Floods with Car-Tel action to control a device failed: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index


    Here is the event:




    Attached Files
Working...
X