Abstract | To customize the behavior of a smart home, an end user writes rules. When an external event satisfies the rule's trigger, the rule's action executes; for example, when the temperature is above a certain threshold, then window awnings might be extended. End users often write incorrect rules. This paper presents a technique that prevents \textiterrors due to too few triggers in the rules. The technique statically analyzes a rule's actions to determine what triggers are necessary. \par We implemented the technique in a tool called TrigGen and tested it on 96 end user written rules for openHAB, an open-source home automation required for correct behavior. The missing triggers could lead to unexpected behavior and security vulnerabilities in a smart home. |