When my plug-in is shut down or when the connection is lost, I change the value of all its devices to a special value indicating that the actual current value is not known. After the connection with the device is reestablished, I update the values to the actual values.
What is the best practice for event triggers for the first value update after a successful reconnection?
What is the best practice for event triggers for the first value update after a successful reconnection?
- Always trigger events. This may result in events undoing manual changes.
- Never trigger events. This may require manual changes to get the system in the desired state.
- Save the last value when disconnecting, and only trigger if the current value is different. This may result in a combination of undoing manual changes and requiring manual changes.
- Turn on relay 1.
- HomeSeer runs the event, and relay 2 is turned on.
- The user manually turns off relay 2.
- The connection is lost.
- Both relay values are changed to idle.
- The connection is reestablished.
- The plug-in updates the relay values: 1 = on, 2 = off.
- Should relay 2 be turned on by the event at this point?
Comment