{"id":872,"date":"2025-08-18T12:21:56","date_gmt":"2025-08-18T12:21:56","guid":{"rendered":"https:\/\/tipcontrol.com\/?page_id=872"},"modified":"2025-08-18T12:28:36","modified_gmt":"2025-08-18T12:28:36","slug":"events","status":"publish","type":"page","link":"https:\/\/tipcontrol.com\/?page_id=872","title":{"rendered":"Events"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\u26a1 TipControl Events: Reacting to Driver Variables<\/h3>\n\n\n\n<p>Events in TipControl allow your IoT system to&nbsp;<strong>respond dynamically<\/strong>&nbsp;to changes in driver variables. Each event (except timer events) is tied to a specific variable located under&nbsp;<code>drv.&lt;drivername&gt;.var...<\/code>. Events are triggered when driver variables are updated or when the driver\u2019s&nbsp;<code>update()<\/code>&nbsp;function is manually called (though this is rarely necessary).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd27 Event Settings<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Enabled<\/strong>&nbsp;\u2013 Toggle each event on or off.<\/li>\n\n\n\n<li><strong>startEnabled<\/strong>&nbsp;\u2013 Determines if the event is active when the driver is first enabled.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udde0 Supported Event Types<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Type<\/th><th>Behavior<\/th><\/tr><\/thead><tbody><tr><td><code>EQUAL<\/code><\/td><td>Fires once when variable equals value; resets if not equal.<\/td><\/tr><tr><td><code>BELOW<\/code><\/td><td>Fires once when variable is below value; resets if equal or above.<\/td><\/tr><tr><td><code>EQUALBELOW<\/code><\/td><td>Fires once when variable is below or equal; resets if above.<\/td><\/tr><tr><td><code>ABOVE<\/code><\/td><td>Fires once when variable is above value; resets if equal or below.<\/td><\/tr><tr><td><code>EQUALABOVE<\/code><\/td><td>Fires once when variable is above or equal; resets if below.<\/td><\/tr><tr><td><code>WEQUAL<\/code><\/td><td>Fires on every update while variable equals value.<\/td><\/tr><tr><td><code>WBELOW<\/code><\/td><td>Fires on every update while variable is below value.<\/td><\/tr><tr><td><code>WEQUALBELOW<\/code><\/td><td>Fires on every update while variable is below or equal to value.<\/td><\/tr><tr><td><code>WABOVE<\/code><\/td><td>Fires on every update while variable is above value.<\/td><\/tr><tr><td><code>WEQUALABOVE<\/code><\/td><td>Fires on every update while variable is above or equal to value.<\/td><\/tr><tr><td><code>CHANGE<\/code><\/td><td>Fires when variable changes by a specified amount (numeric only), for all other variable types on any change.<\/td><\/tr><tr><td><code>TIMER<\/code><\/td><td>Fires every X milliseconds; variable is ignored.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udee0\ufe0f Using Events in TipControl Designer<\/h2>\n\n\n\n<p>Events are easiest to manage via the&nbsp;<strong>TipControl Designer<\/strong>:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Navigate to&nbsp;<strong>Event<\/strong>&nbsp;via the toolbar or&nbsp;<strong>GoTo \u2192 Event<\/strong>.<\/li>\n\n\n\n<li>Select your device from the&nbsp;<strong>Devices<\/strong>&nbsp;list.<\/li>\n\n\n\n<li>Use the&nbsp;<strong>Location<\/strong>&nbsp;dropdown to view drivers with installed events.<\/li>\n\n\n\n<li>Below the drivers, you\u2019ll find locally stored events.<\/li>\n\n\n\n<li>Select a driver to view its installed events.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udca1 Event Management<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Right-click<\/strong>&nbsp;an event to rename or delete it.<\/li>\n\n\n\n<li><strong>Checkbox<\/strong>&nbsp;next to the event name toggles its enabled state.<\/li>\n\n\n\n<li><strong>Variable List<\/strong>&nbsp;shows available variables (may be empty if driver is disabled).<\/li>\n\n\n\n<li><strong>Condition &amp; Value<\/strong>&nbsp;\u2013 Set the trigger condition and test value.<\/li>\n\n\n\n<li><strong>onStartEnabled<\/strong>&nbsp;\u2013 Determines if the event activates with the driver.<\/li>\n\n\n\n<li><strong>New<\/strong>&nbsp;\u2013 Create a blank event.<\/li>\n\n\n\n<li><strong>Test<\/strong>&nbsp;\u2013 Run the event directly on the chip.<\/li>\n\n\n\n<li><strong>Install<\/strong>&nbsp;\u2013 Deploy the event to the device.<\/li>\n\n\n\n<li><strong>Save<\/strong>&nbsp;\u2013 Store the event locally.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddec Event Coding in TipControl Language<\/h2>\n\n\n\n<p>Each event includes a&nbsp;<strong>Code Box<\/strong>&nbsp;where you define the actions to perform when the event fires. This is written in&nbsp;<strong>TipControl Language<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udde0 Key Concepts<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>me<\/code>&nbsp;refers to the driver the event is installed on. Example: If installed on&nbsp;<code>drv.button<\/code>,&nbsp;<code>me<\/code>&nbsp;is equivalent to&nbsp;<code>drv.button<\/code>.<\/li>\n\n\n\n<li>Use&nbsp;<code>me<\/code>&nbsp;to write&nbsp;<strong>generalized code<\/strong>&nbsp;without hardcoding driver names.<\/li>\n\n\n\n<li>For&nbsp;<strong>low-memory devices<\/strong>, encapsulate long code in&nbsp;<strong>macros<\/strong>\u2014event code stays in memory.<\/li>\n\n\n\n<li>To\u00a0<strong>disable an event after execution<\/strong>, use\u00a0<code>return(false)<\/code>. Note:\u00a0<code>me.event<\/code>Enabled(eventName,false) will\u00a0<strong>not<\/strong>\u00a0work for the event itself, even in a subsequantially called macro.<\/li>\n<\/ul>\n\n\n\n<p>Want to see it in action? Download an example project from our website to explore how events work in real-world scenarios.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u26a1 TipControl Events: Reacting to Driver Variables Events in TipControl allow your IoT system to&nbsp;respond dynamically&nbsp;to changes in driver variables. Each event (except timer events) is tied to a specific variable located under&nbsp;drv.&lt;drivername&gt;.var&#8230;. Events are triggered when driver variables are updated or when the driver\u2019s&nbsp;update()&nbsp;function is manually called (though this is rarely necessary). \ud83d\udd27 Event [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-872","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/tipcontrol.com\/index.php?rest_route=\/wp\/v2\/pages\/872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tipcontrol.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tipcontrol.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tipcontrol.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/tipcontrol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=872"}],"version-history":[{"count":7,"href":"https:\/\/tipcontrol.com\/index.php?rest_route=\/wp\/v2\/pages\/872\/revisions"}],"predecessor-version":[{"id":910,"href":"https:\/\/tipcontrol.com\/index.php?rest_route=\/wp\/v2\/pages\/872\/revisions\/910"}],"wp:attachment":[{"href":"https:\/\/tipcontrol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}