GithubHelp home page GithubHelp logo

camera's Introduction

Module: Camera

The camera module allows you to display a webcamera video feed on your MagicMirror. The webcamera needs to be connected to the Raspberry Pi via USB. This module also allows you to make "selfie" photo snapshots with the camera and send them via specified email account.

Using the module

To use camera module, add it to the modules array in the config/config.js file with the following settings:

modules: [
    module: 'camera',
    position: 'top_center',
    config: selfieInterval: 3,  // Time interval in seconds before the photo will be taken.
		emailConfig: {
			service: 'Hotmail', // Email provider to use to send email with a photo.
			auth: {
				user: '<[email protected]>', // Your email account
				pass: '<password>'        // Your password for email account
			}
		}
]

Here is a list of the supported Email providers:

Service names are case insensitive

  • '1und1'
  • 'AOL'
  • 'DebugMail.io'
  • 'DynectEmail'
  • 'FastMail'
  • 'GandiMail'
  • 'Gmail'
  • 'Godaddy'
  • 'GodaddyAsia'
  • 'GodaddyEurope'
  • 'hot.ee'
  • 'Hotmail'
  • 'iCloud'
  • 'mail.ee'
  • 'Mail.ru'
  • 'Mailgun'
  • 'Mailjet'
  • 'Mandrill'
  • 'Naver'
  • 'OpenMailBox'
  • 'Postmark'
  • 'QQ'
  • 'QQex'
  • 'SendCloud'
  • 'SendGrid'
  • 'SES'
  • 'SES-US-EAST-1'
  • 'SES-US-WEST-2'
  • 'SES-EU-WEST-1'
  • 'Sparkpost'
  • 'Yahoo'
  • 'Yandex'
  • 'Zoho'

To use Gmail you may need to configure "Allow Less Secure Apps" in your Gmail account unless you are using 2FA in which case you would have to create an Application Specific password. You also may need to unlock your account with "Allow access to your Google account" to use SMTP.

The camera module is using the nodemailer to send email, so please refer to its original documentation if you have any problems.

The camera module works together with the Voice Control module which you will also need to install on your mirror.

The camera module will be reacting on the notification messages that are send from the voice control module to show/hide camera or make a snapshot.

In order to enable this functionality you will need to create a trained model for each command/keyword at snowboy.kitt.ai. In particular you will need to create models for `Show Camera', 'Hide Camera' and 'Selfie'.

Download the gerenated models and copy them into the root of the MagicMirror directory.

Setup

  • Clone the module into your modules folder in the MagicMirror's code location by running this command:
git clone https://github.com/Rallymen007/camera
  • Navigate to the camera sub folder: cd camera and run the following command to install node.js dependencies:
npm install
  • If you have not already done so install the Voice Control module by running the following command in the `modules' folder:
git clone https://github.com/alexyak/voicecontrol.git

Check the README.md for the Voice Control module to configure it for the MagicMirror.

  • In order to use the generated models mentioned above, update the configuration section for the voicecontrol module to look like this:
{
	module: 'voicecontrol',
	position: 'bottom_left',
	config: {
		models: [
			{
				keyword: "Show Camera",
				description: "Say 'Show Camera' to display camera",
				file: "showCamera.pmdl",
				message: "SHOW_CAMERA"
			},
			{
				keyword: "Hide Camera",
				description: "Say 'Hide Camera' to hide camera",
				file: "hideCamera.pmdl",
				message: "HIDE_CAMERA"
			},
			{
				keyword: "Selfie",
				description: "Say 'Selfie' when camera is visible",
				file: "selfie.pmdl",
				message: "SELFIE"
			},
		]
	}
}

camera's People

Contributors

kristjanesperanto avatar rallymen007 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.