goHACK.me Triggers
This demonstrates an end-to-end solution, using only ACKme hardware, WiConnect firmware and sensors.com (SDC) software, for controlling one hardware device by another via the cloud. No coding is required. All the devices need is a Wi-Fi internet connection. They can be on opposite sides of the earth.
Features demonstrated
- goHACK.me triggers
Method
This application uses two ACKme evaluation boards to demonstrate goHACK.me triggers. The buttons on one evaluation board control LED 1 on the other board. Both devices operate in solo mode.
Set up both modules for goHACK.me solo mode, and activate with your free goHACK.me account. On the goHACK.me site, set up a trigger on Module 1 Button 1, on change, to turn on the Module 2 LED 1 on. Set up a trigger on Module 1 Button 2, on change, to turn on the Module 2 LED 1 off. Press Button 1 on Module 1, and Module 2 LED 1 turns on. Press Button 2 on Module 1, and Module 2 LED 1 turns off.
Procedure
First, set up a free goHACK.me account, and for each device download the goHACK.me solo caps file and activate the device with the account. See Getting Started with goHACK.me.
Editing Device Details
Go to the goHACK.me site and log in. The Devices tab shows the two Mackerel boards.
Click the title of the first device and change it to Mackerel 1. Change the title of the second device to Mackerel 2.
Verifying goHACKme Connections
To verify that the goHACK.me connection is working, on the Devices tab, switch the Mackerel 1 LED 1 to On. After a network latency of up to 5 seconds, LED 1 on your Mackerel 1 device switches on. Switch LED 1 off on the Devices tab to verify that it turns off. Allow for network latency.
Similarly, verify the Mackerel 2 goHACK.me connection.
Adding a Trigger
On the Triggers tab, click the + button to add a trigger.
In Devices, select the Mackerel 1 board.
In Streams, select Button 1.
For Condition, select Change.
Click Done.
The Mackerel 1 Button 1 Trigger appears on the Triggers tab.
Adding an Action to a Trigger
Click the + Add action button on the Trigger
For Actions, select Control.
In the next steps for Set Control on Device, select Mackerel 2, then LED 1, then On.
Click Done.
The Action appears on the Trigger as: On Mackerel 2 set control LED 1 to 1.
Similarly, create a trigger on Mackerel 2, Button 2 Change, with the action: On Mackerel 2, select Control LED 1 to 0.
On both Triggers, select Reset trigger after: 30s.
Select Enabled on both Triggers.
The triggers are now set up. Both triggers show the green lightning stroke Ready icon.
Triggering Actions
Press Button 1 on Mackerel 1, and after a few seconds the Mackerel 1 Button 1 trigger shows the red alert Triggered icon. A few seconds after that, LED 1 on the Mackerel 2 lights up.
Press Button 2 on Mackerel 1, and after a few seconds the Mackerel 1 Button 2 trigger shows the red alert Triggered icon. A few seconds after that, LED 1 on the Mackerel 2 turns off.
Note that the minimum trigger reset is 30 seconds. After 30 seconds, the trigger resets and shows the Ready icon again. Until the trigger is reset and ready, pressing the button does not trigger the associated actions.
Change Log
Modified | Changes | WiConnect Version Required |
---|---|---|
2015-02-03 | Created | 1.2+ |