I am trying to write some scripts to synchronize some Insteon keypads with z-wave door locks and I am seeing different behavior between script function calls versus HS3 events using Easy Trigger. I have been using Easy Trigger to disable events and the events do not trigger as expected. If I use hs.DisableEvent and hs.EnableEvent function calls in a script I see different behavior. My script is structured as follows:
1. Disable lock/keypad change events
2. Process Keypad or Lock Status changes.
3. Update Keypads and Locks.
4. Wait 2 seconds to allow Z-Wave and Insteon to finish.
5. Enable lock/keypad change events.
When I look at the HS log, I see an Insteon keypad event 2 seconds after the script is run. If I increase the delay, the event occurs later by the same amount. I looked at the HS event queue with the tenHSEvent tool and I saw no backlog of events so there must be some difference between HS and Easy Trigger implementation.
1. Disable lock/keypad change events
2. Process Keypad or Lock Status changes.
3. Update Keypads and Locks.
4. Wait 2 seconds to allow Z-Wave and Insteon to finish.
5. Enable lock/keypad change events.
When I look at the HS log, I see an Insteon keypad event 2 seconds after the script is run. If I increase the delay, the event occurs later by the same amount. I looked at the HS event queue with the tenHSEvent tool and I saw no backlog of events so there must be some difference between HS and Easy Trigger implementation.
Comment