No announcement yet.

HS Event occurring when condition is false

  • Filter
  • Time
  • Show
Clear All
new posts

    HS Event occurring when condition is false

    Node-Red is involved in this issue, but isn't the cause. I'm hoping one of us reading this had the same problem/discovery.

    I have a sequence in Node-Red that runs an HS Event. In HS4, I have the event set to manually triggered, then I have an is-nighttime condition. I expect my condition to block manual execution when the condition is false. The event executes when the trigger occurs, even if the time condition is false. I've tried using Easy Trigger's time conditions, and I've checked the time and sun information in setup. I've even done "and if the time is 12:00AM" when it isn't, and it still runs.

    Is there a different trigger than manual that I should use?

    In my brief 13 years running HS, did I just never realize that manual triggers ignore conditions? Even though the UI allows you to create conditions on a manual trigger?

    Should I control a virtual with NR rather than running an event, then redo the HS event as a state change on the virtual?

    I know I can condition the run of the event at NR, and to be honest that's probably the best design - don't bother HS unless you know you have business for it to process. But for now, I want to see if I can add event conditions in HS over the conditions in NR.

    It does depend on how you are manually triggering the Event. The only way that Conditions are honored in the called event is if it is called from an event with the advanced configuration "Run only if other Event Conditions are TRUE.

    From the post linked below:

    It is important to note that by default HomeSeer will ignore conditions in events that are called from another event. Conditions are also ignored when an Event is run from HSTouch. This is the normal behavior. The event above will always run when called from another event, regardless of the value of the switch or the time of day. This is where the first of the advanced options comes into play. As in other actions if advanced options are available there is a little red icon letting you know there are advanced options available. As with all events you can enable this option by default on all events within a group by clicking on the icon in the row of icons at the top of the event group.

    It is also very important to remember Conditions are ALWAYS ignored when an event is run from HSTouch, IFTTT, Google Home, Echo or manually triggered from the "Run" button. It is also important to note that any event run from any means other than self triggering will ignore the Trigger.

    read the whole story here.
    HS4 Pro, Windows 10 pro, Supermicro LP Xeon


      Thanks Randy. I forgot about event clinic, I should have just gone there.

      So this means Node-Red is a member of that group of integrations that cannot run an event and enforce its conditions, therefore I either need to do all my logic in Node-Red, or toggle a virtual and write an event on state change.

      Or I could go all in with duct tape and Bondo by having NR run an event that runs another event with the run only if other event conditions are true advanced config. Yeah, that would be a blast to maintain.


        Not to be argumentative…. I can think of instances where I might want to ignore conditions in a manually triggered event, so I like having the choice. With regard to maintenance headaches, I make it easy. The calling event has exactly the same name as the called event with ‘with conditions” appended to the name. It is simply a manually triggered event calling the second event with conditions honored. I need these intermediate events for Echo voice called events. There is no maintenance. If I change the structure of the called event, it requires no changes to the calling event or of the Echo routine. My system is comprised of over 1600 Events and over 3400 devices. I was very careful in my locations, Device naming, event group and event naming, making maintenance a breeze. Honestly I rarely touch my system any more.
        HS4 Pro, Windows 10 pro, Supermicro LP Xeon


          Thanks Randy. I agree.

          I ended up going the virtual route but I think I want to do double events instead. With a virtual that has conditions on top of its state change, such as 'and it is daytime' I found shutting the virtual off when the conditions are false to be easiest in Node-Red. Set virtual on, delay 2, set virtual off.

          What I don't like, and it's likely my beginner knowledge of Node-Red, is the on shows one log entry and the off shows three. There are two together at 2 seconds after the on, then one more 2 seconds later. Something is firing twice.

          Yesterday, when I was testing the motion sensor that runs this NR flow, HS4 restarted. The log shows a couple of orderly plugin shutdowns, but no cause for the restart. I'm going to guess it was a quirk, a coincidence, or it was related to the flood of events.