From 2c61160dbd0bb57e54ea94c4a07fb02679af7d6e Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Tue, 10 Jun 2025 19:25:44 +0100 Subject: [PATCH] Add email template and WipperSnapper device config --- .../rpi-pico-w-potty-training.json | 83 +++++++++++++++++++ Adafruit_IO_Template_Emails/template.liquid | 72 ++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 Adafruit_IO_Template_Emails/rpi-pico-w-potty-training.json create mode 100644 Adafruit_IO_Template_Emails/template.liquid diff --git a/Adafruit_IO_Template_Emails/rpi-pico-w-potty-training.json b/Adafruit_IO_Template_Emails/rpi-pico-w-potty-training.json new file mode 100644 index 000000000..8eec8ca1a --- /dev/null +++ b/Adafruit_IO_Template_Emails/rpi-pico-w-potty-training.json @@ -0,0 +1,83 @@ +{ + "exportVersion": "1.0.0", + "exportedBy": "tyeth", + "exportedAt": "2025-06-10T18:13:03.071Z", + "exportedFromDevice": { + "board": "rpi-pico-w", + "firmwareVersion": "1.0.0-beta.100" + }, + "components": [ + { + "name": "💦 Wee Button", + "pinName": "D18", + "type": "push_button", + "mode": "DIGITAL", + "direction": "INPUT", + "period": 0, + "pull": "UP", + "isPin": true + }, + { + "name": "💦 Wee LED", + "pinName": "D2", + "type": "led", + "mode": "DIGITAL", + "direction": "OUTPUT", + "isPin": true + }, + { + "name": "💩 Poo Button", + "pinName": "D19", + "type": "push_button", + "mode": "DIGITAL", + "direction": "INPUT", + "period": 0, + "pull": "UP", + "isPin": true + }, + { + "name": "💩 Poo LED", + "pinName": "D3", + "type": "led", + "mode": "DIGITAL", + "direction": "OUTPUT", + "isPin": true + }, + { + "name": "❌ Didn't Go Button", + "pinName": "D20", + "type": "push_button", + "mode": "DIGITAL", + "direction": "INPUT", + "period": 0, + "pull": "UP", + "isPin": true + }, + { + "name": "❌ Didn't Go LED", + "pinName": "D4", + "type": "led", + "mode": "DIGITAL", + "direction": "OUTPUT", + "isPin": true + }, + { + "name": "🔔 Tell Adult Button", + "pinName": "D21", + "type": "push_button", + "mode": "DIGITAL", + "direction": "INPUT", + "period": 0, + "pull": "UP", + "isPin": true + }, + { + "name": "🔔 Tell Adult LED", + "pinName": "D5", + "type": "led", + "mode": "DIGITAL", + "direction": "OUTPUT", + "isPin": true + } + ] +} \ No newline at end of file diff --git a/Adafruit_IO_Template_Emails/template.liquid b/Adafruit_IO_Template_Emails/template.liquid new file mode 100644 index 000000000..9c802c0c5 --- /dev/null +++ b/Adafruit_IO_Template_Emails/template.liquid @@ -0,0 +1,72 @@ +🌟 Daily Potty Training Report 🌟 +Hi there! Here's how our little superstar did: +--- +🚽 Successful Wees: {{ vars.wee_progress }} +{% for i in (1..vars.wee_progress) %}💧{% endfor %} +{% if vars.wee_progress <= 5 %} +Great start! Every success counts, and we're building good habits one wee at a time! 🌱 +{% elsif vars.wee_progress <= 15 %} +Fantastic progress! You're really getting the hang of this - keep up the amazing work! 🎯 +{% else %} +SUPERSTAR ALERT! 🌟 Absolutely crushing it with those wee successes! You're a potty champion! 🏆 +{% endif %}--- + +💩 Successful Poos: {{ vars.poo_progress }} +{% for i in (1..vars.poo_progress) %}🟤{% endfor %} +{% if vars.poo_progress == 0 %} +Poos can be tricky, but they're being so brave! Every try is a step forward! 💪 +{% elsif vars.poo_progress < 2 %} +Look at them go! They're becoming a real poo pro - that's awesome progress! 🎉 +{% else %} +POO CHAMPION! 🏅 They've mastered one of the trickiest parts - so proud! 🎊 +{% endif %}--- + +🤝 Told an Adult: {{ vars.informed_progress }} +{% for i in (1..vars.informed_progress) %}🗣️{% endfor %} +{% if vars.informed_progress <= 5 %} +Communication is key! Keep practicing saying when they need to go - They're doing great! 📢 +{% elsif vars.informed_progress <= 15 %} +Wonderful communication skills! They're really good at letting us know - that's so helpful! 👏 +{% else %} +COMMUNICATION SUPERSTAR! 🌟 They're amazing at telling adults - that's such a big kid skill! 🎯 +{% endif %}--- + +👻 Nothing Happened: {{ vars.nothing_progress }} +{% for i in (1..vars.nothing_progress) %}⭕{% endfor %} +{% if vars.nothing_progress <= 3 %} +That's okay! Trying is what matters, and they're body will let them know when it's ready! 🌈 +{% else %} +So patient and persistent! Even when nothing happens, they keep trying - that's real determination! 💫 +{% endif %}--- + +📊 Week Summary: +{% capture total_tries -%}{{ vars.wee_progress | plus: vars.poo_progress | plus: vars.nothing_progress }}{% endcapture -%} +{% capture successes -%}{{ vars.wee_progress | plus: vars.poo_progress }}{% endcapture -%} +{% capture success_rate -%}{% if total_tries != 0 -%}{{ successes | times: 100 | divided_by: total_tries }}{% else -%}0{% endif -%}{% endcapture -%} +{% capture bar_filled -%}{{ success_rate | divided_by: 10 }}{% endcapture -%} +{% capture bar_empty -%}{{ 10 | minus: bar_filled }}{% endcapture -%} +Total potty visits: {{ total_tries }} +Success rate: {{ success_rate }}% [{%- for i in (1..bar_filled) -%}█{%- endfor -%}{%- for i in (1..bar_empty) -%}░{%- endfor -%}] +{%- assign total_events = vars.wee_progress | plus: vars.poo_progress | plus: vars.nothing_progress | plus: vars.informed_progress -%} + ({{ total_events }} events this week ) +{% if total_events <= 3 %} +💝 This Week: They're doing such a great job learning! Every day gets a little easier... +{% elsif total_events <= 5 %} +🌟 This Week: Ayee! They're really getting the hang of this potty training thing! Keep it up! +{% elsif total_events <= 8 %} +🌟 This Week: WOW! Look at all that practice! They're becoming such a potty expert. +{% else %} +🏆 This Week: INCREDIBLE WEEK! They're absolutely rocking this potty training journey! 🎊🎉 +{% endif %} + +Keep being awesome! +With love and high-fives! 🙌 +--- +{%- capture event_mod -%}{{ total_events | modulo: 3 }}{%- endcapture %} +{% if event_mod == 0 %} +P.S. Remember: Every expert was once a beginner - they're doing brilliantly! 🌟 +{% elsif event_mod == 1 %} +P.S. Fun fact: Even superheroes had to learn to use the potty! 🦸 +{% else %} +P.S. Remember: accidents are just practice in disguise! They're doing amazingly! 💕 +{% endif %} \ No newline at end of file