element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Forget Me Not Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Forget Me Not Design Challenge
  • More
  • Cancel
Forget Me Not Design Challenge
Blog Did I remember to close the diaper wipe box?
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: electronichamsters
  • Date Created: 29 Aug 2014 5:33 AM Date Created
  • Views 598 views
  • Likes 0 likes
  • Comments 1 comment
  • forget_me_not
  • flexible_home
Related
Recommended

Did I remember to close the diaper wipe box?

electronichamsters
electronichamsters
29 Aug 2014
  1. [INDEX]
  2. Introduction and project description
  3. Sensor Node and Gateway Design
  4. How I use OpenHAB - audio notification and dashboards
  5. Design detail for wireless sensor nodes and gateway
  6. Uber Sensor - wireless sensor for fire, smoke, gas, barking, light, movement
  7. Diaper Box Sensor
  8. Laundry Room Sensor

 

The small size and energy harvesting capability means it fits in small places, like the diaper wipe box.  We’re always forgetting to close the diaper wipe box and it dries out.  The EnOcean reed switch sensor is great for monitoring if the top is left opened too long.  And you can use OpenHAB on the Pi to remind you to close it.

 

image

image

 

OpenHAB Item Definition:

Contact itm_baby_wipe "Baby Wipe [%s]" <contact> (All) {enocean="{id=01:81:3C:A4, eep=D5:00:01, parameter=CONTACT_STATE"}

 

OpenHAB Sitemap - though not really needed unless you want to remotely view diaper box status image

T

ext item=itm_baby_wipe

 

OpenHAB Rule - this is where the timer is used to determine when to alarm.  Adjust timer length to whatever you want.

var Timer door_timer = null
var boolean door_left_open = false
var boolean door_first_time = false

rule "baby wipes"
when
    Item itm_baby_wipe changed
then
        if (door_timer != null)
                door_timer.cancel()
        if (itm_baby_wipe.state == OPEN)
                {
                door_left_open = true
                door_timer = createTimer(now.plusSeconds(60)) [|
                        say("Baby Wipe Door Left Opened")
                        door_first_time = true
                ]
    } else {
        door_left_open = false
        door_first_time = false
    }
end


rule "Check every 2 minutes"
when
    Time cron "0 0/2 * * * ?"
then
    if ((door_left_open == true) && (door_first_time == true) {
        say("Door still left open")
    }
end


If someone could tell me how to put the code in those nice code blocks like the other people in this competition, I'd appreciate it!  Thanks Mark!

 

Also, thanks very much to Kimmo for helping me with my EnOcean issues earlier.

  • Sign in to reply
  • mcb1
    mcb1 over 11 years ago

    Eric

    If someone could tell me how to put the code in those nice code blocks like the other people in this competition, I'd appreciate it!

    Its a bit cryptic

    image

    Click on the >> and you'll get a choice.

    image

    Not sure what the others have chosen but try one or two.

     

    be warned that sometimes this highlighting thinks the text is Excel and try's to put it into rows and columns.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube