Learning Goals 5 min
A dashboard you can't show off is half-built. Today you learn the three sharing levels: read-only public link, per-user invitation, and embedded views. By the end of this lesson you will:
- Generate a read-only public link and understand its security implications.
- Invite specific users (by email) with view-only or edit-and-control permissions.
- Embed a dashboard widget into an external webpage with an iframe.
Warm-Up 10 min
From L04-10 you have a CloudLamp dashboard. Today you decide who can see / control it.
Question: who should be able to do what?
For a real product, think about three audiences:
- You: full control.
- Family / housemates: control allowed (toggle the lamp), but can't change the wiring or sketch.
- Demo audience (e.g. classmates, parents at a fair): view only — they can see the values but can't click toggles.
New Concept · Three sharing levels 25 min
Level 1 — Public link (read-only)
- Dashboard → Share → Public link → Read only.
- Copy the generated URL.
- Anyone with the URL can open it (no Arduino account required) and view values. No widget control.
Use for: demos, live status pages, sharing with non-tech viewers.
Don't use for: anything you wouldn't want shared. URLs leak.
Level 2 — Public link (read-and-write)
Same flow, but flip the "Allow control" switch. Now anyone with the URL can also toggle widgets.
Use for: friends-and-family quick control without account hassles.
Risks: anyone with the URL has full control. Don't share on social media. Treat the URL as a password. Rotate it (regenerate) if compromised.
Level 3 — Per-user sharing
- Dashboard → Share → invite by email.
- Pick the user's permission: View only, or Edit and Control.
- The user gets an email → signs in to their own Arduino account → sees your dashboard listed alongside their own.
Use for: collaborators, family members who'll use the dashboard regularly.
Benefits: revocable per-person, auditable, no URL leakage.
Level 4 — Embedded iframe
Available on paid tiers. Generates an <iframe> snippet you can embed in your own website. The dashboard appears inline.
<iframe src="https://app.arduino.cc/dashboards/<id>/embed" width="600" height="400"></iframe>
Use for: blog posts, school newsletters, building your own website with live IoT widgets.
Permission matrix
| Method | Account required? | Read | Write | Revocable |
|---|---|---|---|---|
| Public read-only link | No | ✓ | ✗ | Regenerate URL |
| Public read-write link | No | ✓ | ✓ | Regenerate URL |
| Per-user view-only invite | Yes | ✓ | ✗ | Per-user |
| Per-user edit-and-control invite | Yes | ✓ | ✓ | Per-user |
| Embedded iframe | No | ✓ | (depends) | Regenerate dashboard |
Worked Example · Share three ways 25 min
Step 1 — generate a public read-only link
Click Share → Public link → keep "Allow control" OFF. Copy URL. Open in your browser's incognito mode. Confirm: widgets show values, but tapping the Switch does nothing.
Step 2 — invite a classmate
Click Share → invite by email. Enter their Arduino-account email. Permission = "View only". They get an email → accept → dashboard appears in their account's "Shared with me".
Step 3 — share via the Arduino IoT Remote app
On your phone's Arduino IoT Remote, share a dashboard → invite. Same flow as the web. Useful for adding family members who use the phone app.
Step 4 — show the dashboard on a tablet kiosk
Open the public read-only link on a tablet, fullscreen the browser, set the tablet to never sleep. Now you have a wall-mounted live IoT display — no app, no install, no login.
Step 5 — revoke sharing
Click Share → see the list of users / public links. Remove or regenerate. Test that an old URL becomes invalid after regeneration.
Basic 5 min
Goal: Generate two public links — one read-only, one read-write. Open both in browsers. Confirm the controls work / don't work as expected.
Challenge 1 5 min
Goal: Invite a classmate as "View only". Have them open the dashboard. Confirm they see live values but can't control.
Challenge 2 5 min
At an open day you share CloudLamp with a read-write public link. Anyone can now press anything. Change the L04-10 sketch so the device protects itself:
- Brightness can never go above 200, whatever the slider says.
- The power switch only accepts one change every 2 seconds. A faster change is undone.
Use millis(), not delay(). Writing to a Property from the sketch sends the new value back to the dashboard.
It works if the slider at 255 glows the same as 200. Fast taps on the switch change the lamp only every 2 seconds.
Challenge 3 · Log who changed what 10 min
With shared control, you want an audit trail. Add a String Property lastCommand (READ) to CloudLamp. Bind it to a Value widget.
Each time a callback runs, set lastCommand to a short line saying what changed and when, using uptime. For example:
power ON at 125 s brightness 180 at 131 s
Test it from your public read-write link in a private browser window.
It works if every tap and slider move from the shared link shows in the Value widget within a few seconds.
Recap 5 min
Four sharing levels: public read-only (URL anyone can open), public read-write (URL = full control), per-user invite (account required, revocable), embedded iframe (in your own webpage). Pick by audience size and risk tolerance. Tomorrow we ship Cluster B's capstone — the IoT Room Monitor.
- Public link
- Unauthenticated URL to a dashboard. Anyone with the URL can access at the configured permission level.
- Per-user invitation
- Email-based sharing requiring the recipient to have an Arduino account. Revocable per-person.
- Embedded iframe
- An HTML snippet you paste into another webpage to display the dashboard inline.
- Permission level
- View only vs Edit and Control. View-only shows values; Edit and Control allows toggling widgets.
- Revocable
- Property of a sharing method that lets you withdraw access from specific recipients without affecting others.
- Kiosk mode
- A tablet / monitor showing a dashboard fullscreen as a wall display. Use public read-only link.
Extra Mission 5 min
Part 1 — Design a sharing plan
Pick one of your cloud gadgets. Imagine three audiences. A family member controls it, a classmate only watches, and 100 visitors come to an open day. Plan the sharing on paper.
Your plan must include:
- The sharing level for each audience, and one reason for each.
- What could go wrong if each link leaked.
- One guard you would add in the sketch, like the Challenge 2 limits.
Part 2 — Make it
Set up the sharing for real: a read-only public link and one per-user invite. Add your guard to the sketch and upload. Test the read-only link in a private browser window.
Bring back next class: a screenshot of your Share settings, the uploaded sketch, and a photo of the circuit. For ARD-L04-12, bring a DHT11 and an LDR.