If you do not already have an Adafruit IO account set up, head over to io.adafruit.com to link your Adafruit.com account to Adafruit IO.
You will to need to obtain your Adafruit IO username and secret API key.
Navigate to your profile and click the View AIO Key button to retrieve them. Write them down in a safe place, you'll need them later in this guide.
The first step is to create a new Adafruit IO feed to hold the state of the relay. Navigate to the feeds page on Adafruit IO. Then click Actions -> Create New Feed, and name this feed relay.
- If you do not already know how to create a feed, head over to Adafruit IO Basics: Feeds.
Next, you'll create a dashboard to write to the relay feed. Navigate to the dashboards page on Adafruit IO. Then click Actions -> Create New Dashboard, and name this dashboard the name of the appliance you want to control. I'm controlling an Air Conditioner in my office, so I named the dashboard Air Conditioner.
- If you do not know how to create or use Dashboards in Adafruit IO, head over to the Adafruit IO Basics: Dashboards guide.
Next, add a Toggle Block to your dashboard. Click the '+' button next to the dashboard title.
From the block selection modal, select the Toggle Button.
On Choose Feed, select the relay feed.
On Block Settings, change the Block Title to Power.
Click Create Block
Your completed dashboard should look like the following: