Hello, first off I am a hardware guy, coding is not something I regularly use, and I’m slowly slogging through this, it is intimidating.
I am trying to add a Camera module with voice control to my Magic Mirror (RPi3), from https://github.com/alexyak/camera
Here is what I have for a config file so far, but I am getting the error:
“If you get this message while your config file is already created, your config file probably contains an error.”
Here is my config.js contents:
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information how you can configurate this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
var config = {
address: "localhost", // Address to listen on, can be:
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
// - another specific IPv4/6 to listen on a specific interface
// - "", "0.0.0.0", "::" to listen on any interface
// Default, when address config is left out, is "localhost"
port: 8080,
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
language: "en",
timeFormat: 12,
units: "imperial",
modules: [
{
module: "alert",
},
{
module: "updatenotification",
position: "top_bar"
},
{
module: "clock",
position: "top_left"
},
{
module: "calendar",
header: "US Holidays",
position: "top_left",
config: {
calendars: [
{
symbol: "calendar-check-o ",
url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
}
]
}
},
{
module: "compliments",
position: "lower_third"
},
{
module: 'camera',
position: 'top_center',
config: selfieInterval: 3, // Time interval in seconds before the photo will be taken.
emailConfig: {
service: 'GMail', // Email provider to use to send email with a photo.
auth: {
user: '', // Your email account
pass: '' // Your password for email account
}
},
{
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"
},
]
},
{
module: "currentweather",
position: "top_right",
config: {
location: "Boston",
locationID: "4930956", //ID from http://www.openweathermap.org/help/city_list.txt
appid: "My API"
}
},
{
module: "weatherforecast",
position: "top_right",
header: "Weather Forecast",
config: {
location: "Boston",
locationID: "4930956", //ID from http://www.openweathermap.org/help/city_list.txt
appid: "My API"
}
},
{
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
title: "New York Times",
url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
}
],
showSourceTitle: true,
showPublishDate: true
}
},
]
};
I had a difficult time editing this natively on the Pi, have copied the config.js files to a Windows machine and using NotePad++ to edit the file, the lines lining the code up help me immensely. Wish there was an easier workflow for me to use?