SlideShare a Scribd company logo
1 of 26
© All rights reserved 2022 2
SucculentPi
An IoT Panopticon
for a House Plant
© All rights reserved 2022
Cloudreach Service Lines
Cloudreach
Services
Advisory
Software Platform
Data & Analytics
Platform Development
Application Modernisation
Security Transformation
Migration
Management & Resale
© All rights reserved 2022
Our Cloud Partnerships
UK&I Consulting Partner
of the Year 2022
900+ Certifications
15 Competency
Specializations
Data Analytics - Services Specialisation
GCP Security Partner
of the Year 2021
100+ Certifications
12 Competency
Specializations
Gold Data Analytics Competency
Gold Data Platform Competency
Microsoft UK Partner
of the Year 2020
500+ Certifications
12 Gold Certifications
15 Competency
Specializations
© All rights reserved 2022
Dead Plant + Boredom + Raspberry Pi
=
Internet-of-Things!
In The Beginning…
© All rights reserved 2022
Because we usually can’t tell the stories from
our real, customer projects! ☹
But Why?
© All rights reserved 2022
Part 1: The Thing Bit
© All rights reserved 2022
The Hardware
© All rights reserved 2022
The GrovePi+ software is years out of date, and uses an imperative deployment script!
I never managed to escape dependency hell with that outdated script
Did get it working just enough though!
Why, oh why, are we still using imperative deployment scripts in 2022 ?!?
Challenge 1: Imperative Deployment Woes
© All rights reserved 2022
If you can engineer consistency into your data at the point
of generation/capture, you’ll save yourself a ton of hassle
down the line!
Plus I had nowhere to put to the IR camera
Solution: Hacking, of the IKEA variety!
So I built a rig to hold the plant in a consistent position
relative to the camera and other sensors
Challenge 2: Building in Consistency
© All rights reserved 2022
The Awair device provides environmental and air quality data
for the room
It has a handy local network API…
… which seems to be in perpetual beta, and of very beta quality!
Randomly returns HTTP 200 with no data
Had to check actual content of the response on every API call,
instead of just checking the return code
Challenge 3: Beta APIs
© All rights reserved 2022
From the Raspberry Pi Sensors:
1. Infrared image of the plant’s leaves
2. Visible light level
3. Ultraviolet light level
4. Infrared light level
5. Soil moisture level (top of pot)
6. Soil moisture level (middle of pot)
7. Soil moisture level (bottom of pot)
From the Awair Sensors:
1. Room air temperature
2. Dew point for the room
3. Relative humidity level
4. Absolute humidity level
5. Carbon Dioxide (CO2) level
6. Air Volatile Organic Compounds (VOC) level
7. Air hydrogen (H2) level
8. Air ethanol level
9. Airborne particulate matter (PM2.5) level
The Final Data Points
All collected on the following schedule:
*/5 * * * *
© All rights reserved 2022
Part 2: The Internet Bit
© All rights reserved 2022
© All rights reserved 2022
The IR image is uploaded to an S3 bucket
A JSON payload is generated containing all the
sensor readings, plus the S3 URL of the associated
IR image
The payload is sent as a message to an MQTT topic
in AWS IoT Core
{
"timestamp": "2022-01-01-000000",
"plant": {
"pot": {
"soil": {
"moisture_top_a0": 87,
"moisture_middle_a1": 31,
"moisture_bottom_a2": 49
}
},
"env": {
"visible_light": 278,
"uv_light": 0.11,
"ir_light": 349
},
"images": {
"infrared": "https://bucket.s3.region.amazonaws.com/infrared/2022-01-01-000000.png"
}
},
"room": {
"env": {
"dew_point": 16.66,
"temp": 28.34,
"rel_humid": 49.17,
"abs_humid": 13.6,
"co2": 471,
"voc_total": 40,
"voc_h2": 26,
"voc_ethanol": 36,
"pm25": 8
}
}
}
Data Acquisition
© All rights reserved 2022
An AWS IoT Core message routing rule routes the
payload’s contents to AWS Timestream
Message routing rules are just SQL
Here we flatten the hierarchy in the JSON message,
To give a flat structure in Timestream for ease of
future analytics
SELECT
plant.pot.soil.moisture_top_a0 AS plant_pot_soil_moisture_top,
plant.pot.soil.moisture_middle_a1 AS plant_pot_soil_moisture_middle,
plant.pot.soil.moisture_bottom_a2 AS plant_pot_soil_moisture_bottom,
plant.env.visible_light AS plant_env_visiblelight,
plant.env.uv_light AS plant_env_uvlight,
plant.env.ir_light AS plant_env_irlight,
plant.images.infrared AS plant_image_infrared,
room.env.dew_point AS room_env_dewpoint,
room.env.temp AS room_env_temperature,
room.env.rel_humid AS room_env_relativehumidity,
room.env.abs_humid AS room_env_absolutehumidty,
room.env.co2 AS room_env_co2,
room.env.voc_total AS room_env_voctotal,
room.env.voc_h2 AS room_env_voch2,
room.env.voc_ethanol AS room_env_vocethanol,
room.env.pm25 AS room_env_pm25
FROM
'succulentpi/readings'
MQTT Message Routing
© All rights reserved 2022
© All rights reserved 2022
Part 3: The Bit Where it all goes Wrong
© All rights reserved 2022
© All rights reserved 2022
The GrovePi+ board had crapped out… naturally,
right after I stopped manually checking the data flow
regularly!
All the sensors returned data only intermittently, and
all of the readings were garbage - null, 0, or 65536
It took a hard reboot - physically removing power for
a while - to revive it!!!
So…
Beware Hobby IoT Hardware
© All rights reserved 2022
So I need to physically disconnect the power regularly,
automatically, and reliably…
Sooo… robots?!?
I drastically over thought this for a while, until a light bulb
moment came…
Literally - a light bulb came on! I have an IKEA Smart Home
system, which has scheduled actions, and they sell a smart plug
So IKEA to the rescue!
Challenge 4: Automating Hard Power Cycles
© All rights reserved 2022
I don’t want to loose weeks of data if this happens again, therefore I need monitoring!
Monitoring for successfully published MQTT messages won’t fully capture this situation
Instead; the actual values of the sensor readings committed to the Timestream table need to be checked for
sanity
Handily, AWS have a blog post on exactly how to do this with Lambda
I went with checking the one soil moisture sensor reading, as these sensors have a well documented definition
of valid readings:
Challenge 5: What if it Happens Again?
elif result > 0 and (int(response['Rows'][0]['Data'][4]['ScalarValue']) < 0 or
int(response['Rows'][0]['Data'][4]['ScalarValue']) > 950):
logger.info("Sending Data Out Of Range SNS Message...")
sns.publish(TopicArn=SNS_TOPIC, Message=f"ALERT: The SucculentPi sensor data is out of range", Subject="Alert:
Sensor Data Out of Range")
© All rights reserved 2022
© All rights reserved 2022
Keep an eye on the Cloudreach Tech Blog for more of the continuing SucculentPi adventures!
Definitely planning more for this project, once enough (non-garbage) data has been collected
Ideas for future parts include (in no particular order):
● Dashboarding and visualisation of the time-series data with AWS QuickSight
● Can we detect useful/interesting things in the IR images using computer vision ML with AWS
SageMaker and/or Rekognition?
● Can we forecast watering needs using AWS Forecast?
● Can we discover any interesting correlations between watering needs and environmental
factors using AWS Lookout and/or SageMaker?
Watch this Space…
© All rights reserved 2022 25
Questions?
Perhaps Answers
© All rights reserved 2022 26
Thank you
Cloudreach Tech Blog: https://www.cloudreach.com/en/technical-blog
Blog Part 1: https://bit.ly/3T7IFob
Blog Part 2: https://bit.ly/3TtazL0
Sample Code: https://github.com/binghamchris/succulentpi

More Related Content

Similar to SucculentPi [AWS Basel Meetup - Oct 2022].pdf

AWS Startup Insights Kuala Lumpur
AWS Startup Insights Kuala LumpurAWS Startup Insights Kuala Lumpur
AWS Startup Insights Kuala LumpurAmazon Web Services
 
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015Amazon Web Services Korea
 
End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF,...
End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF,...End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF,...
End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF,...andrejusb
 
devworkshop-10_28_1015-amazon-conference-presentation
devworkshop-10_28_1015-amazon-conference-presentationdevworkshop-10_28_1015-amazon-conference-presentation
devworkshop-10_28_1015-amazon-conference-presentationAlex Wu
 
Global Azure Bootcamp 2016 - Real-world Internet of Things Backend with Azure...
Global Azure Bootcamp 2016 - Real-world Internet of Things Backend with Azure...Global Azure Bootcamp 2016 - Real-world Internet of Things Backend with Azure...
Global Azure Bootcamp 2016 - Real-world Internet of Things Backend with Azure...Andri Yadi
 
Reply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case Studies
Reply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case StudiesReply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case Studies
Reply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case StudiesAndrea Mercanti
 
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...HostedbyConfluent
 
SRV304 IoT Building Blocks From Edge Devices to Analytics in the Cloud
SRV304 IoT Building Blocks From Edge Devices to Analytics in the Cloud SRV304 IoT Building Blocks From Edge Devices to Analytics in the Cloud
SRV304 IoT Building Blocks From Edge Devices to Analytics in the Cloud Amazon Web Services
 
Industrial Hazard Monitoring using IOT
Industrial Hazard Monitoring using IOTIndustrial Hazard Monitoring using IOT
Industrial Hazard Monitoring using IOTAyush Chhangani
 
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...mfrancis
 
Overview of IoT Infrastructure and Connectivity at AWS & Getting Started with...
Overview of IoT Infrastructure and Connectivity at AWS & Getting Started with...Overview of IoT Infrastructure and Connectivity at AWS & Getting Started with...
Overview of IoT Infrastructure and Connectivity at AWS & Getting Started with...Amazon Web Services
 
Cloud Monitoring System Using Internet of Things
Cloud Monitoring System Using Internet of ThingsCloud Monitoring System Using Internet of Things
Cloud Monitoring System Using Internet of ThingsIRJET Journal
 
IOT Based Low Cost Irrigation Model
IOT Based Low Cost Irrigation ModelIOT Based Low Cost Irrigation Model
IOT Based Low Cost Irrigation ModelIRJET Journal
 
Using Grid Technologies in the Cloud for High Scalability
Using Grid Technologies in the Cloud for High ScalabilityUsing Grid Technologies in the Cloud for High Scalability
Using Grid Technologies in the Cloud for High Scalabilitymabuhr
 
DWX2018 IoT lecture
DWX2018 IoT lectureDWX2018 IoT lecture
DWX2018 IoT lectureAlon Fliess
 
AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)
AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)
AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)Amazon Web Services
 
Smart parking system using IOT
Smart parking system using IOTSmart parking system using IOT
Smart parking system using IOTUdit Deo
 
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...Amazon Web Services
 

Similar to SucculentPi [AWS Basel Meetup - Oct 2022].pdf (20)

AWS Startup Insights Kuala Lumpur
AWS Startup Insights Kuala LumpurAWS Startup Insights Kuala Lumpur
AWS Startup Insights Kuala Lumpur
 
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
AWS IoT 및 Mobile Hub 서비스 소개 (김일호) :: re:Invent re:Cap Webinar 2015
 
End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF,...
End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF,...End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF,...
End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF,...
 
devworkshop-10_28_1015-amazon-conference-presentation
devworkshop-10_28_1015-amazon-conference-presentationdevworkshop-10_28_1015-amazon-conference-presentation
devworkshop-10_28_1015-amazon-conference-presentation
 
AWS Startup Insights Singapore
AWS Startup Insights SingaporeAWS Startup Insights Singapore
AWS Startup Insights Singapore
 
Global Azure Bootcamp 2016 - Real-world Internet of Things Backend with Azure...
Global Azure Bootcamp 2016 - Real-world Internet of Things Backend with Azure...Global Azure Bootcamp 2016 - Real-world Internet of Things Backend with Azure...
Global Azure Bootcamp 2016 - Real-world Internet of Things Backend with Azure...
 
Reply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case Studies
Reply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case StudiesReply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case Studies
Reply Netcamp PoliTo - AWS IoT - Grohe and Caleffi Case Studies
 
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
Uncover the Root Cause of Kafka Performance Anomalies, Daniel Kim & Antón Rod...
 
SRV304 IoT Building Blocks From Edge Devices to Analytics in the Cloud
SRV304 IoT Building Blocks From Edge Devices to Analytics in the Cloud SRV304 IoT Building Blocks From Edge Devices to Analytics in the Cloud
SRV304 IoT Building Blocks From Edge Devices to Analytics in the Cloud
 
Industrial Hazard Monitoring using IOT
Industrial Hazard Monitoring using IOTIndustrial Hazard Monitoring using IOT
Industrial Hazard Monitoring using IOT
 
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
 
Overview of IoT Infrastructure and Connectivity at AWS & Getting Started with...
Overview of IoT Infrastructure and Connectivity at AWS & Getting Started with...Overview of IoT Infrastructure and Connectivity at AWS & Getting Started with...
Overview of IoT Infrastructure and Connectivity at AWS & Getting Started with...
 
Cloud Monitoring System Using Internet of Things
Cloud Monitoring System Using Internet of ThingsCloud Monitoring System Using Internet of Things
Cloud Monitoring System Using Internet of Things
 
IOT Based Low Cost Irrigation Model
IOT Based Low Cost Irrigation ModelIOT Based Low Cost Irrigation Model
IOT Based Low Cost Irrigation Model
 
Using Grid Technologies in the Cloud for High Scalability
Using Grid Technologies in the Cloud for High ScalabilityUsing Grid Technologies in the Cloud for High Scalability
Using Grid Technologies in the Cloud for High Scalability
 
DWX2018 IoT lecture
DWX2018 IoT lectureDWX2018 IoT lecture
DWX2018 IoT lecture
 
AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)
AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)
AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)
 
Smart parking system using IOT
Smart parking system using IOTSmart parking system using IOT
Smart parking system using IOT
 
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
 
Aquarius_IJARCCE
Aquarius_IJARCCEAquarius_IJARCCE
Aquarius_IJARCCE
 

Recently uploaded

dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAbdelrhman abooda
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Recently uploaded (20)

dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 

SucculentPi [AWS Basel Meetup - Oct 2022].pdf

  • 1.
  • 2. © All rights reserved 2022 2 SucculentPi An IoT Panopticon for a House Plant
  • 3. © All rights reserved 2022 Cloudreach Service Lines Cloudreach Services Advisory Software Platform Data & Analytics Platform Development Application Modernisation Security Transformation Migration Management & Resale
  • 4. © All rights reserved 2022 Our Cloud Partnerships UK&I Consulting Partner of the Year 2022 900+ Certifications 15 Competency Specializations Data Analytics - Services Specialisation GCP Security Partner of the Year 2021 100+ Certifications 12 Competency Specializations Gold Data Analytics Competency Gold Data Platform Competency Microsoft UK Partner of the Year 2020 500+ Certifications 12 Gold Certifications 15 Competency Specializations
  • 5. © All rights reserved 2022 Dead Plant + Boredom + Raspberry Pi = Internet-of-Things! In The Beginning…
  • 6. © All rights reserved 2022 Because we usually can’t tell the stories from our real, customer projects! ☹ But Why?
  • 7. © All rights reserved 2022 Part 1: The Thing Bit
  • 8. © All rights reserved 2022 The Hardware
  • 9. © All rights reserved 2022 The GrovePi+ software is years out of date, and uses an imperative deployment script! I never managed to escape dependency hell with that outdated script Did get it working just enough though! Why, oh why, are we still using imperative deployment scripts in 2022 ?!? Challenge 1: Imperative Deployment Woes
  • 10. © All rights reserved 2022 If you can engineer consistency into your data at the point of generation/capture, you’ll save yourself a ton of hassle down the line! Plus I had nowhere to put to the IR camera Solution: Hacking, of the IKEA variety! So I built a rig to hold the plant in a consistent position relative to the camera and other sensors Challenge 2: Building in Consistency
  • 11. © All rights reserved 2022 The Awair device provides environmental and air quality data for the room It has a handy local network API… … which seems to be in perpetual beta, and of very beta quality! Randomly returns HTTP 200 with no data Had to check actual content of the response on every API call, instead of just checking the return code Challenge 3: Beta APIs
  • 12. © All rights reserved 2022 From the Raspberry Pi Sensors: 1. Infrared image of the plant’s leaves 2. Visible light level 3. Ultraviolet light level 4. Infrared light level 5. Soil moisture level (top of pot) 6. Soil moisture level (middle of pot) 7. Soil moisture level (bottom of pot) From the Awair Sensors: 1. Room air temperature 2. Dew point for the room 3. Relative humidity level 4. Absolute humidity level 5. Carbon Dioxide (CO2) level 6. Air Volatile Organic Compounds (VOC) level 7. Air hydrogen (H2) level 8. Air ethanol level 9. Airborne particulate matter (PM2.5) level The Final Data Points All collected on the following schedule: */5 * * * *
  • 13. © All rights reserved 2022 Part 2: The Internet Bit
  • 14. © All rights reserved 2022
  • 15. © All rights reserved 2022 The IR image is uploaded to an S3 bucket A JSON payload is generated containing all the sensor readings, plus the S3 URL of the associated IR image The payload is sent as a message to an MQTT topic in AWS IoT Core { "timestamp": "2022-01-01-000000", "plant": { "pot": { "soil": { "moisture_top_a0": 87, "moisture_middle_a1": 31, "moisture_bottom_a2": 49 } }, "env": { "visible_light": 278, "uv_light": 0.11, "ir_light": 349 }, "images": { "infrared": "https://bucket.s3.region.amazonaws.com/infrared/2022-01-01-000000.png" } }, "room": { "env": { "dew_point": 16.66, "temp": 28.34, "rel_humid": 49.17, "abs_humid": 13.6, "co2": 471, "voc_total": 40, "voc_h2": 26, "voc_ethanol": 36, "pm25": 8 } } } Data Acquisition
  • 16. © All rights reserved 2022 An AWS IoT Core message routing rule routes the payload’s contents to AWS Timestream Message routing rules are just SQL Here we flatten the hierarchy in the JSON message, To give a flat structure in Timestream for ease of future analytics SELECT plant.pot.soil.moisture_top_a0 AS plant_pot_soil_moisture_top, plant.pot.soil.moisture_middle_a1 AS plant_pot_soil_moisture_middle, plant.pot.soil.moisture_bottom_a2 AS plant_pot_soil_moisture_bottom, plant.env.visible_light AS plant_env_visiblelight, plant.env.uv_light AS plant_env_uvlight, plant.env.ir_light AS plant_env_irlight, plant.images.infrared AS plant_image_infrared, room.env.dew_point AS room_env_dewpoint, room.env.temp AS room_env_temperature, room.env.rel_humid AS room_env_relativehumidity, room.env.abs_humid AS room_env_absolutehumidty, room.env.co2 AS room_env_co2, room.env.voc_total AS room_env_voctotal, room.env.voc_h2 AS room_env_voch2, room.env.voc_ethanol AS room_env_vocethanol, room.env.pm25 AS room_env_pm25 FROM 'succulentpi/readings' MQTT Message Routing
  • 17. © All rights reserved 2022
  • 18. © All rights reserved 2022 Part 3: The Bit Where it all goes Wrong
  • 19. © All rights reserved 2022
  • 20. © All rights reserved 2022 The GrovePi+ board had crapped out… naturally, right after I stopped manually checking the data flow regularly! All the sensors returned data only intermittently, and all of the readings were garbage - null, 0, or 65536 It took a hard reboot - physically removing power for a while - to revive it!!! So… Beware Hobby IoT Hardware
  • 21. © All rights reserved 2022 So I need to physically disconnect the power regularly, automatically, and reliably… Sooo… robots?!? I drastically over thought this for a while, until a light bulb moment came… Literally - a light bulb came on! I have an IKEA Smart Home system, which has scheduled actions, and they sell a smart plug So IKEA to the rescue! Challenge 4: Automating Hard Power Cycles
  • 22. © All rights reserved 2022 I don’t want to loose weeks of data if this happens again, therefore I need monitoring! Monitoring for successfully published MQTT messages won’t fully capture this situation Instead; the actual values of the sensor readings committed to the Timestream table need to be checked for sanity Handily, AWS have a blog post on exactly how to do this with Lambda I went with checking the one soil moisture sensor reading, as these sensors have a well documented definition of valid readings: Challenge 5: What if it Happens Again? elif result > 0 and (int(response['Rows'][0]['Data'][4]['ScalarValue']) < 0 or int(response['Rows'][0]['Data'][4]['ScalarValue']) > 950): logger.info("Sending Data Out Of Range SNS Message...") sns.publish(TopicArn=SNS_TOPIC, Message=f"ALERT: The SucculentPi sensor data is out of range", Subject="Alert: Sensor Data Out of Range")
  • 23. © All rights reserved 2022
  • 24. © All rights reserved 2022 Keep an eye on the Cloudreach Tech Blog for more of the continuing SucculentPi adventures! Definitely planning more for this project, once enough (non-garbage) data has been collected Ideas for future parts include (in no particular order): ● Dashboarding and visualisation of the time-series data with AWS QuickSight ● Can we detect useful/interesting things in the IR images using computer vision ML with AWS SageMaker and/or Rekognition? ● Can we forecast watering needs using AWS Forecast? ● Can we discover any interesting correlations between watering needs and environmental factors using AWS Lookout and/or SageMaker? Watch this Space…
  • 25. © All rights reserved 2022 25 Questions? Perhaps Answers
  • 26. © All rights reserved 2022 26 Thank you Cloudreach Tech Blog: https://www.cloudreach.com/en/technical-blog Blog Part 1: https://bit.ly/3T7IFob Blog Part 2: https://bit.ly/3TtazL0 Sample Code: https://github.com/binghamchris/succulentpi