Camera is a Nitrogen device application that watches a device's message stream and reacts to incoming cameraCommand messages.
- Install OpenCV on the device. OpenCV is used for motion detection camera commands.
- Clone this repo onto your target device:
git clone https://github.com/nitrogenjs/camera.git
- Install
imagesnap
on your Mac if you are going to use the default config:brew install imagesnap
. - Run
npm install
node camera.js
- To run this application as a daemon, modify
scripts/camera
to point to your installation directory and then copy it to /etc/init.d - Run
sudo update-rc.d camera defaults
so that it starts at boot. - Rebooting or running
/etc/init.d/camera start
will then start the daemon.
Nitrogen has three other projects that you should have a look at as well.
- service: Core platform responsible for managing principals, security, and messaging.
- client: JavaScript client library for building Nitrogen devices and applications.
- admin: Web admin tool for working with the Nitrogen service.
- device: Device principals for common pieces of hardware.
- commands: CommandManagers and schemas for well known command types.
- cli: Command line interface for working with the Nitrogen service.
- reactor: Always-on hosted application execution platform.
- apps: Project maintained Nitrogen applications.