Did you complete the IoT Power Outlet guide first? Alternatively see the No-Code WipperSnapper page!
You will not be able to use this guide without completing the the IoT Power Outlet Guide.
If you have not followed this guide, navigate to the IoT Power Outlet Guide's Adafruit IO setup page and come back here when you are done.
Create a New Action
We'll first create a new action to turn on the lights on a certain day (or time). Log into Adafruit IO and navigate to the Adafruit IO Actions page.
Click Actions -> Create a New Action.
A modal dialog should appear, giving you the option of entering a name and description.
Click the Create button after filling in the details.
The schedule trigger can be activated based on specific times and dates, such as “Everyday at 9pm” or “At 2:00 PM, on the 2nd August”, or “Every 4 hours”.
Let's turn the lights on every morning at 6:00 AM to wake us up!
Select the Schedule trigger block from the Triggers category in the toolbox/sidebar, and drag it onto the Triggers:
section of the main diagram.
Use the Grey Cog on a Blue Background to change the Hours section from Every Hour to During Hour 0, and then change the hour to 6. Finally change the Minutes dropdown to be 0 (zero).
The WipperSnapper Device, or CircuitPython or Arduino code, will turn the outlet on depending on the feed's value at this time. Let's publish the value 1
to the relay feed.
Select the Feeds category in the toolbox, then drag the Set Feed block, second in the list, onto the diagram in the Actions:
section.
Choose the appropriate feed (relay
) from the dropdown list of feeds.
Select inside the textbox of the Set Feed block and enter the value 1
It's worth understanding that there are text value blocks and number value blocks, which are treated differently. Luckily all feeds in Adafruit IO are able to be treated as Strings / Text, so I've left the value block as a text one in this case, but be careful when doing maths and comparisons.
Make sure your action looks similar to this before proceeding, although I've used the Power Switch feed.
Now that this action is done, click Save, and if asked then choose Enable and Save.
New Actions are disabled initially to protect you from the action accidentally firing! 🚀
Create an Action to Turn the Lights Off
Next, let's turn off the lights after 11 PM. To do this, you'll need to create another action.
After filling in the details for the new action, use the blocks to create an action that triggers at 23:00 (11 PM in 24-hour clock) and sends the value 0
(zero) to the relay feed.
After filling in the details for the new action, use the blocks to create an action that triggers at 23:00 (11PM in 24-hour clock) and sends the value 0
(zero) to the relay feed.
Once you've done that then Enable and Save the action.
Before proceeding, make sure your second action looks similar to this:
Double-Check Your Actions
Before moving on, make sure your actions page lists both the 6:00AM action and 11:00PM action.
Do this by returning to the Actions list page, also verifying both the actions created are Enabled.
Page last edited May 20, 2025
Text editor powered by tinymce.