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 "Remember Me Always" - Part 025
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: COMPACT
  • Date Created: 23 Oct 2014 12:25 AM Date Created
  • Views 563 views
  • Likes 0 likes
  • Comments 0 comments
  • forget_me_not
  • raspberry
  • pi
  • remember_always
Related
Recommended

"Remember Me Always" - Part 025

COMPACT
COMPACT
23 Oct 2014

Three's a Crowd

 

The easiest way I could think of to monitor the cat bowl is to have a fixed camera overhead.

If you're unsure you've fed your cat then whip out your phone and check to see if the cat bowl is full.

 

For this challenge I have already got two cameras working with a Raspberry Pi and OpenHAB.

One camera is one the Raspberry Pi hosting OpenHAB and the other is a PTZ (Pan, Tilt and Zoom) Network Camera.

 

Now I've got a third for the cat bowl. I've now configured another Raspberry Pi Model B+ with Camera to act as a network camera.

It was pretty easy to do using the Raspberry Pi version of motion-MMAL.

  • Install Raspbian (ensure you have the latest updates)
  • Enable Pi Camera
  • Install Raspberry Pi version of motion-MMAL
  • Install supporting libraries
  • Adjust the motion-MMAL configuration file to suit your needs
  • Start the application

 

And before you know it you can use a browser like FireFox and access the footage from the camera.

 

 

Always have a Plan B!

There's usually many ways to accomplish the same or similar result and there's not always the need for streaming video.

I just want to capture images from the remote RPi Camera and make it easily available for OpenHAB.

The easiest way I could think of was to install a lightweight web (HTTP) server and put pictures in the published area for OpenHAB to access it.

Sure enough there is a simple way to accomplish this with next to no knowledge or effort.

With the latest version of raspiban Wheezy with Pi Camera enabled the procedure is as follows;

 

Install lighttpd with sudo apt-get install lighttpd

This will automatically start the web service and publish the default installation page.

This can be tested from a remote web browser.

This will create folder /www/var that is published.

 

In this folder create another folder called images (/www/var/images).

This will be used to store the images from the camera to be published.

 

To enable OpenHAB to take snapshot on demand, the web server needs to be configured to respond to requests.

This is done quite easily with lighttp be enabling cgi-bin scripting.

To do this you need to add an entry into the /etc/lighttpd/lighttpd.conf file.

Under server modules add an item "mod-cgi",

 

To select the shells used for the cgi-bin based scripts add the following to the end of the .conf file

 

$HTTP["url"] =~ "^/cgi-bin/" {

    cgi-assign = ".py => "/usr/bin/python",

    cgi-assign = ".sh" => "/bin/bash" )

}

 

Create the cgi-bin folder (/var/www/cgi-bin) to house your scripts.

 

Then write up your server side scripts and configure the system security to do your bidding!

  • Sign in to reply
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