Now that you have verified that the sensor is working, it's time to create a visual dashboard that represents the room's occupancy status via the sensor's output.
Step 1: Create a New Feed
Before you create the dashboard with the icons that represent the room's occupancy, you will need to create a feed to give the dashboard. This feed will eventually contain the values icon names that will appear in the dashboard.
- In the top pane, click "Feeds"
- Then click "view all"
- Create a new feed group and call it "WipperSnapper" or whatever you'd like
Step 2: Set Up the Actions and Choose Icons
Now that there's a home for the icon values, you'll need to point those values to the Dashboard when certain events happen. You'll define those events with actions. Here are the actions to create:
- When the sensor detects motion (value is 1), send the message "close"
- When the sensor detects no motion (value is 0), send the message "circle-o"
- These will be icons used for the project.
- "circle-o" is a simple circle icon and represents a vacant room
- "close" is an "X" icon and represents an occupied room
- To see other symbols to choose head to
- In the top pane, click "Actions"
- Then click "view all"
- Click "New Action" in the top left of the page
- Choose "Reactive Action"
First, create a action for when motion is detected.
- If
movement detected
isequal to
Comparison Value
1
- Then
publish a message to
feedRoom Occupancy
feed withclose
- Hit save
Next, create a trigger for when no motion is detected.
- If
movement detected
isequal to
Comparison Value
0
- Then
publish a message to
feedRoom Occupancy
feed withcircle-o
- Hit save
Step 3: Create a Dashboard
Now that the feed and triggers are set up. You can create a dashboard to view the status of the room occupancy based via the icons in the feed.
- In the top pane, click "Dashboards"
- Next click "view all"
- Click "New Dashboard"
- Enter the title and description for the dashboard
- Click the gear icon then click the "create new block" option
- These are all the different blocks available.
- From the different blocks, click on the one entitled "Icon"
- From your WipperSnapper feeds, select "Room Occupancy" for the icon feed. This is the feed you just created.
- Name the block and hit "create block"
Test it Out
The block is created now, try moving your hand over the sensor and see if the Dashboard block responds.
Lastly, if you'd like other people in your organization or building to have access to the room's occupancy status, you can make the dashboard public.
- Click on the dashboard settings gear
- Click the "Dashboard Privacy" button to make the Dashboard public and confirm you'd like to make it public when asked.
- Click the "Share Links" button that is now available in the Dashboard settings.
- Copy either of these links and share with whomever.
Dashboard Sharing Link Options
There are two types of links to share a Dashboard for others to view.
Option 1: This is the main URL for the dashboard, anyone that has an Adafruit IO account can view and edit the Dashboard.
Option 2: Kiosk Mode. This link will only allow others to view the data from the dashboard and does not require the user to have an AdafruitIO account. For the purposes of this guide, this link is the better option of the two for sharing with those who will want access to the room occupancy status.
Page last edited March 08, 2024
Text editor powered by tinymce.