Tutorial 5: Local Control with an ioBridge Web Gateway

ioBridge gateways like the IO-204 or Gamma include Onboard Rules and Actions that makes it possible to perform local control even when the gateway is not connected to the Internet. Onboard Rules and Actions are created using step-by-step wizards without writing any software. Onboard rules can be combined to perform quite sophisticated local control.

This tutorial shows a simple example of how to use Onboard rules to make a buzzer beep when the temperature goes above 80F.

Project Components

Step 1 – Connect your Temperature Probe and Buzzer

Plug your temperature probe into channel 1 and your buzzer into channel 2.

Step 2 – Create an Onboard Rule

You are now going to create a rule that runs every 10 seconds. The rule checks the value of the temperature on channel 1 and beeps the buzzer for 250ms for as long as the temperature is 80F or higher.

Click on the Modules page, select your web gateway, and then click on Onboard Rules. This tutorial assumes that you have no other rules (for simplicity as rules can conflict unless they are designed correctly) so click Clear Rules to delete any existing rules.

Click Add Rule, Periodic Rule, and then Next». Enter a Frequency of 10 to have the rule execute every 10 seconds and then click Add Action. Click on Add Condition, Analog Input (since the temperature probe is an Analog Input), and then Next». Select Channel 1, Greater than or equal to analog value, and enter 530 into Analog Value [0 – 1023] and click Finish.

Where did 530 come from you may ask? Note the Analog Value has a range of 0-1023. 0-1023 corresponds to the so-called RAW value from the Temperature Probe. The RAW value of 530 corresponds to a temperature of 80F as shown in the Temperature Probe Lookup Table that relates the RAW value read by the PIC microcontroller to the temperature.

The next step is to make the buzzer buzz when the temperature is 80F or higher. Click Add Action, Pulse Digital Output, Next», Channel 1, Positive Toggle (positive makes the buzzer buzz), Milliseconds (ms), and enter Send Pulse Width of 250 and click Finish.

You should now have a periodic rule that looks like this:

Click Sync Rules to save the rules to the web gateway.

You can now test your rules by heating the temperature probe to 80F or higher. You should hear a 1/4 second beep every 10 seconds even when the Ethernet cable is disconnected.