Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How software gave us green fingers

Avatar for Rick Slinkman Rick Slinkman
December 06, 2018

How software gave us green fingers

A fun talk about experimenting with innovative software products to keep our office plant in good condition.

Avatar for Rick Slinkman

Rick Slinkman

December 06, 2018

Other Decks in Technology

Transcript

  1. • Distribution & Access (DT) • Handling orders and licensing

    to online study materials • Java • Designed and built in 2013 • Running in AWS • DT Platform in the works • Agile team: 11 colleagues + Arnout + Rick What we do
  2. Our product owner gave us a nice plant Awesome! So

    how do these things work? According to biology teacher: 1. Water 2. Sunlight 3. Take out dead leaves
  3. Then we found this Xiaomi Mi Flora Bluetooth enabled Plant

    Sensor • Moisture • Sunlight • Temperature • Soil fertility
  4. Can we... • Show stats in our metrics dashboard? •

    Store the data in the cloud? • Run that cloud application in Kubernetes? • Be notified when the plant needs water?
  5. PlantAdapter NodeJS Arnout • Open source MiFlora reader • Collects

    data periodically • Handles multiple sensors at once Android Things Rick • Custom BLE device scanning • Custom Xiaomi data decoding • Awaits device discovery • Retrofit REST client And then we’ll POST it to some cloud application...
  6. Building cloud applications is what we do Don’t settle for

    a basic application Learn by practice Show cool new innovations to colleagues & friends Great way to show the boss what’s new Show our muscle! Arnout Schwarzenegger
  7. So we came up with... Tech • Containerization • Orchestration

    • Modern web Fun • Alexa • Time lapse Learn about • Docker • Kubernetes • Angular Learn about • Lambda • RPi Camera All this for 1 plant...
  8. PlantVorm RainCloud • Persisting of all sensor data • 2

    rest end-points ◦ Save sensor data ◦ Fetch sensor data • Database ◦ 14385 measurements saved
  9. Kubernetes • Orchestration of docker images • Infra as code

    • Automating deployment • Self-healing • Service discovery and load-balancing • Docker vs. Kubernetes?
  10. Basic workings How your skill knows what the user said

    Alexa, ... Uploads audio Calls your skill Amazon Voice Services my custom Skill Calls your endpoint Alexa enabled device
  11. Building your custom Skill Interaction model • What can Alexa

    understand? Skill endpoint • Respond to user’s calls Account linking (optional) • Amazon account ←→ myUser.userId
  12. Interaction model The hardest part Invocation name How Alexa knows

    to target your skill Amazon translates speech to Intents • AMAZON.HelpIntent • AMAZON.StopIntent • PlantConditionIntent • LatestInfoIntent Variables in Intents are called Slots • AMAZON.Date, AMAZON.Time • AMAZON.Number, AMAZON.City • PlantDataType Alexa, ask OfficePlantStats how it’s going… Alexa, tell OfficePlantStats to get me the plant’s state Alexa, ask OfficePlantStats if it needs water Alexa, ask OfficePlantStats if it needs sunlight Alexa, ask OfficePlantStats if it needs {{type}} Alexa, tell OfficePlantStats I need help Alexa, ask OfficePlantStats to tell me it’s secrets
  13. Handling IntentRequests Dealing with IntentRequests as JSON AWS Lambda OR

    • Easy setup • Security is taken care of • Super scalable • Alexa Skills Kit Custom HTTPS endpoint • Your language of choice • Full control • Could fit in existing application • Alexa Skills Kit
  14. Current state Project overview Estimated billed amount: € 200 DT

    PlantVorm exists of.. 1x Kubernetes cluster 2x Spring Boot application 1x Alexa skill 1x AWS Lambda 2x Raspberry Pi 1x Angular application
  15. But is it alive? Did all this technology help to

    keep the plant in good condition?