Firmware version C4 for the ioBridge IO-204 module and the IO-204-PRO module include onboard program space for you to create rules and actions. The onboard rules and actions operate when the module is online or offline. They also let you create some very complex logic to control X10, servos, outputs, serial devices, etc without having a connection to a server (the IO-204-PRO does not support X10 and Servos). All of the “programming” is done thru web-based wizards on the ioBridge.com or ioBridgePro.com Interface.
Onboard Rules and Actions require that the module has the C4 firmware or better. To access the Onboard Rules and Actions for your module, follow these steps:
* Then select the Onboard Rules subtab
A rule is essentially an if/then statement. “If the temperature is too high, then turn on the fan.” You can break that rule down into two distinct parts: a condition and an action. Onboard rules for the IO-204 follow the same pattern. You can create multiple conditions and multiple actions under each rule. If there are multiple conditions for a rule, all the conditions must be true for the action(s) to be executed. In rules with multiple actions, all of the actions will be execute when the rule is true.
To add a rule, click Add Rule on the Onboard Rules and Actions part of the ioBridge.com Interface.
The IO-204 support three types of rules:
A standard rule is a set of conditions that are continually checked and when they are all true, the associated actions are executed.
A periodic rule is a set of conditions that are checked periodically and at that time if they are all true, the associated actions are executed.
A push update rule allows you to push updates to the server. The updates can contain the state of a digital input, the value of the analog input, and the pulse count of a particular module channel. Once the server has the updated value, you can created server-based actions to push messages to web services like email, RSS, Twitter, and web application APIs.
There six types of push update rules:
Once a base rule is added, you can add conditions to the rule by clicking “Add Condition” under the rule. A rule with no conditions is always true. You can add more than one condition and in this case all conditions must be true in order to execute the associated actions.
There are 6 conditions that you can add to a standard or periodic rule:
Included in the onboard rules program space are four variables that you can set using the rules. Each variable is designated by a letter, namely A, B, C, D. Each variable can hold a number from 0 - 255. Use variables to check whether or not an action has executed. Variables also help coordinate conditions from multiple rules.
Once a base rule is added, you can add actions to the rule by clicking “Add Actions” under the rule. You can add more than one action to a standard or periodic rule.
Any of the functions of the module can be an action. There are 8 different action types possible to add to standard or periodic rule:
There is program space onboard the IO-204 module that stores the rules and actions that you create. You design the set of rules using the ioBridge.com Interface and when you are all finished, you then synchronize the rules to the module by clicking “Sync Rules”. The server responds with the percentage of the program space used when synchronization is successful. The interface warns you when the rules are out of sync - you want to sync after you have completed all of your changes. The module will display a ”-” briefly when it receives the new rules.
To clear the actions from the module, click Clear Rules. This does not delete your rules but clears them from the module's memory space. The module will briefly display a ”-” when the module has cleared its rules.
To delete a rule, condition, or action from the ioBridge.com interface, click the “X” and confirm that you want to delete that item.
This mini project involves moving a servo between two set positions based on the state of a button.
The IO-204 knows if the network connection is up or down. You can created a very quick project that reboots your router when ever it locks up or signal an alarm when the module is offline.