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 [CaTS] ForgetMeNot - Week 12: Finalising a few things
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fvan
  • Date Created: 20 Oct 2014 1:28 PM Date Created
  • Views 1145 views
  • Likes 3 likes
  • Comments 4 comments
  • forget_me_not
  • design_challenge
  • openhab
  • tektronix
  • rpisoc
  • iot_pet_care
  • eclipse
  • internet_of_things
  • enocean
  • cats
  • raspberrypi
  • smarthome
  • challenge
  • iot
  • enocean_pi
Related
Recommended

[CaTS] ForgetMeNot - Week 12: Finalising a few things

fvan
fvan
20 Oct 2014

Previous posts for this project:

  • [CaTS] ForgetMeNot - Index
  • [CaTS] ForgetMeNot - Week 0: Project Description
  • [CaTS] ForgetMeNot - Week 1: EnOceanPi and Sensors
  • [CaTS] ForgetMeNot - Week 2: Elro CoCo and Pi Cam with OpenHAB
  • [CaTS] ForgetMeNot - Week 3: Data persistence and charts with OpenHAB
  • [CaTS] ForgetMeNot - Week 4: Arduino-OpenHAB communication
  • [CaTS] ForgetMeNot - Week 5: Getting familiar with EAGLE
  • [CaTS] ForgetMeNot - Week 6: Getting to know the TBS1052B-EDU oscilloscope
  • [CaTS] ForgetMeNot - Week 7: First tests with RPiSoC
  • [CaTS] ForgetMeNot - Week 7 (2): More testing with RPiSoC
  • [CaTS] ForgetMeNot - Week 8: Water dispenser and temperature
  • [CaTS] ForgetMeNot - Week 9: RFID Cat detection and identification
  • [CaTS] ForgetMeNot - Week 10: Peltier cooling experiment
  • [CaTS] ForgetMeNot - Week 11: Starting the build
  • [CaTS] ForgetMeNot - Week 11 (2): Continuing the build
  • [CaTS] ForgetMeNot - 3D Printing: EnOcean sensor bracket
  • [CaTS] ForgetMeNot - 3D Printing: EnOcean rocker switch and magnet holder
  • [CaTS] ForgetMeNot - 3D Printing: Food dispenser prototype
  • [CaTS] ForgetMeNot - 3D Printing: Weighing scale
  • [CaTS] ForgetMeNot - Security: Some basic tips
  • [CaTS] ForgetMeNot - Minion: Dave, the gassy minion
  • [CaTS] ForgetMeNot - Pi Camera: Wide Angle Lens

 

  • Introduction
  • Hiccups & Surprises
    • Solenoid Valve
    • Food Dispenser
    • Weighing Scales
  • Some Little Things
    • Timezone
    • Wifi
    • OpenHAB Notifications
      • API Key
      • openhab.cfg
      • Rule
      • Addon
      • Client
      • Test
    • Camera & LEDs Mount

 

Introduction

 

The end of the Forget Me Not Design Challenge is nearing ... But not before some last minute surprises and hiccups ...


I've been installing the electronics in the build and combining all components that were developed over the course of the project.

At this stage, this was mostly an integration task where the interaction between the different components was tested.

 

There were some pending tasks, things missing or even not working ... Let's have a look at what happened.

 

 

Hiccups & Surprises

 

Solenoid Valve

 

One of the things I overlooked for the water dispenser, is that the DC-DC step up converter driving the solenoid valve is triggered by a LOW signal on the enable pin and disabled with a HIGH signal.

 

This means that, when using the RPiSoC directly, I would flood the kitchen in case of a reset of the RPiSoC, because the pins are LOW by default. And since the Pi takes longer to boot and restore the default HIGH, I'd have a big problem ... As time was short, I went for a quick solution where I made a NOT gate using a transistor.

image

 

Perhaps there were better ways to do this (reprogramming default pin state of RPiSoC ?), but as I said, time was short and I had other issues to resolve as well.

 

Food Dispenser

 

The food dispenser prototype I had built early on didn't seem to work properly after all. The cat food was jamming and wouldn't dispense reliably. I had to come up with another idea, and fast.

To prevent the food getting stuck and not dispensing, I thought something should move inside the food container.

 

This is the new mechanism I've come up with:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

It's not so nice looking, but it does the trick, and now the mechanism works reliably.

 

The software part of driving a servo with the RPiSoC could be reused, it's just the dispensing mechanism itself that changed.

 

Weighing Scales

 

This one is more of a silly mistake during assembly ...

 

While integrating all the different components in the build, it seems I mounted my load cells upside down. The result ?

Pushing/putting weight on the load cells didn't do anything. I was getting crazy: was it the hardware, or the software ? Why wouldn't it work anymore ?

Then I noticed that pulling the scale up was creating a reading. That's when I realised my mistake and mounted them correctly.

 

Some Little Things

 

There were some tasks that still required some attention. Even if they are small, they need to be done.

 

Timezone

 

It's a small thing to be done, but relevant in order to be able to correlate things properly and easily.

 

Setting the timezone is very straightforward:

 

pi@webserver ~ $ sudo dpkg-reconfigure tzdata

 

This will launch a wizard, looking like this:

image

 

Afterwards, the changes are acknowledged:

Current default time zone: 'Europe/Brussels'
Local time is now:      Mon Oct 20 15:18:09 CEST 2014.
Universal Time is now:  Mon Oct 20 13:18:09 UTC 2014.

 

I did a small verification:

pi@webserver ~ $ date
Mon Oct 20 15:18:20 CEST 2014

pi@webserver ~ $ cat /etc/timezone
Europe/Brussels

 

Et voila, correct timezone configured!

 

Wifi

 

I've been developing the project using an ethernet connection to the Raspberry Pi. Since I started the build and mounted the Pi in the enclosure, I configured wifi for remote access.

 

By editing the interfaces file and adding the correct SSID and password, the Pi should be able to connect the the network.

 

pi@webserver ~ $ sudo nano /etc/network/interfaces

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
        wpa-ssid "<your_ssid>"
        wpa-psk "<your_password>"

 

OpenHAB Notifications

 

I didn't have any notifications set up in openHAB, so I decided to give that a quick go.

michaelwylie has done a great job describing this for Android users, I'll quickly describe it for iOS users image

 

iOS notifications can be achieved using "Prowl".

 

Some things are required for Prowl notifications with openHAB:

- an API key

- updating openhab.cfg

- a notification rule in openHAB

- the prowl action jar in the addons folder

- a Prowl client on the iOS device

 

API Key

 

This step is easy.

 

Go to Prowl - iOS Push Notifications and register for a free account. You can then generate an API key to be used by your application.

image

 

openhab.cfg

 

There are three parameters that need to be set in the openhab.cfg file for Prowl to work.

- the API key which was generated earlier

- a default priority

- API URL

image

Don't forget to uncomment the lines by removing the "#" at the start of the line.

 

########################## Prowl Action configuration #################################
#
# the apikey for authentication (generated on the Prowl website)
prowl:apikey=<my generated key>

# the default priority of a Prowl notifications (optional, defaults to '0')
prowl:defaultpriority=0

# the url of the Prowl public api
# (optional, defaults to 'https://prowl.weks.net/publicapi/')
prowl:url=https://api.prowlapp.com/publicapi/

 

Note that the URL used is different than the default. I think the default value is obsolete, as the page is not accessible.

 

Rule

 

It seems there are multiple ways to define the pushNotification, so I tried them all to see which notification I would (or not) receive.

 

var Timer front_door_timer = null

rule "Front door"
when Item EnOcean_sensor_frontdoor changed
then
        if(EnOcean_sensor_frontdoor.state == OPEN) {
                if(front_door_timer==null) {
                        front_door_timer = createTimer(now.plusMinutes(5)) [|
                                pushNotification("Front door 1", "The front door has been open for 5 minutes! Is it supposed to be?")
                                pushNotification("<api_key>", "Front door 2", "The front door has been open for 5 minutes! Is it supposed to be?")
                                pushNotification("<api_key>", "Front door 3", "The front door has been open for 5 minutes! Is it supposed to be?", 0)
                        ]
                }
        }
        else if(EnOcean_sensor_frontdoor.state == CLOSED) {
                if(front_door_timer!=null) {
                        front_door_timer.cancel
                        front_door_timer = null
                }
        }
end

 

The first notification makes use of the API key and priority defined in the openhab.cfg file. The other two notifications override these values by defining the API key and or priority in the call.

 

What this rule does is the following:

- when the front door is opened, start a 5 minute timer

- if the front door is closed, abort the timer if it is still running

- if the door is still open when the timer reaches the end, a notification is sent

 

Addon

 

The prowl jar needs to be put in the openhab addons folder for it to work.

 

pi@webserver ~ $ ls -l /opt/openhab/addons/*prowl*
-rw-r--r-- 1 root root 59510 Jun 16 04:26 /opt/openhab/addons/org.openhab.action.prowl-1.5.0.jar

 

Client

 

The client can be downloaded from the App Store. Unfortunately, it's not free ... But at $2.99 and for the sake of testing and being notified when something happens, I bought the app.

image

 

Test

 

As stated earlier, I defined 3 different notifications, each with a different set of parameters. I received all 3 of them, meaning that the syntax for each of them is valid, which is good to know.

The different syntaxes allow to experiment with different API keys or priorities depending on the notification.

 

The notifications appeared on my phone and the details could then be viewed:

image

 

This last minute feature is working!

 

Camera & LEDs Mount

 

As part of the pet care system, I used a camera to be able to watch the cats while they eat or drink. Later on I also found a wide angle lens for that camera.

I needed a way to mount these, including some LEDs to light up the direct environment. To do all of this, I designed a bracket and 3D printed it ...

 

This is the result:

image

 

 

Pfiew, all those small changes and hiccups add up and become time consuming ... But, it's almost done and Friday is getting very close, *eek* !

 

image
  • Sign in to reply
  • fvan
    fvan over 10 years ago in reply to mcb1

    I have something else in mind for them, more info by the end of the week image

     

    Frederick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago

    Nice work.

    This application has some real benefits.

     

    I can see it being used as a trigger when certain events require attention.

     

    I take it you'll be hooking up the switch so the cats can use this to call you. image

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 10 years ago in reply to DAB

    Thanks DAB,

     

    the build is ready for paint and finishing touches. After that, the cats will be the new owners of this device image

     

    Frederick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 10 years ago

    Good Post Frederick.

     

    It looks like your cats are set now.

     

    DAB

    • 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