Advertisement
Guest User

Untitled

a guest
Nov 10th, 2022
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.28 KB | None | 0 0
  1.  
  2. let config = {
  3. address: "localhost", // Address to listen on, can be:
  4. // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
  5. // - another specific IPv4/6 to listen on a specific interface
  6. // - "0.0.0.0", "::" to listen on any interface
  7. // Default, when address config is left out or empty, is "localhost"
  8. port: 8080,
  9. basePath: "/", // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
  10. // you must set the sub path here. basePath must end with a /
  11. ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
  12. // or add a specific IPv4 of 192.168.1.5 :
  13. // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
  14. // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
  15. // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
  16.  
  17. useHttps: false, // Support HTTPS or not, default "false" will use HTTP
  18. httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true
  19. httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
  20.  
  21. language: "en",
  22. locale: "en-US",
  23. logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
  24. timeFormat: 24,
  25. units: "metric",
  26. // serverOnly: true/false/"local" ,
  27. // local for armv6l processors, default
  28. // starts serveronly and then starts chrome browser
  29. // false, default for all NON-armv6l devices
  30. // true, force serveronly mode, because you want to.. no UI on this device
  31.  
  32. modules: [
  33. {
  34. module: "alert",
  35. },
  36. {
  37. module: "updatenotification",
  38. position: "top_bar"
  39. },
  40. {
  41. module: "clock",
  42. position: "top_left"
  43. },
  44. {
  45. module: "calendar",
  46. header: "US Holidays",
  47. position: "top_left",
  48. config: {
  49. calendars: [
  50. {
  51. symbol: "calendar-check",
  52. url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
  53. }
  54. ]
  55. }
  56. },
  57. {
  58. module: "compliments",
  59. position: "lower_third"
  60. },
  61. {
  62. module: "weather",
  63. position: "top_right",
  64. config: {
  65. weatherProvider: "openweathermap",
  66. type: "current",
  67. location: "Fojnica",
  68. locationID: "3200829", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
  69. apiKey: "ab2165780c1d43140857340114d7180b"
  70. }
  71. },
  72. {
  73. module: "weather",
  74. position: "top_right",
  75. header: "Weather Forecast",
  76. config: {
  77. weatherProvider: "openweathermap",
  78. type: "forecast",
  79. location: "Fojnica",
  80. locationID: "3200829", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
  81. apiKey: "ab2165780c1d43140857340114d7180b"
  82. }
  83. },
  84. {
  85. module: "newsfeed",
  86. position: "bottom_bar",
  87. config: {
  88. feeds: [
  89. {
  90. title: "New York Times",
  91. url: "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
  92. }
  93. ],
  94. showSourceTitle: true,
  95. showPublishDate: true,
  96. broadcastNewsFeeds: true,
  97. broadcastNewsUpdates: true
  98. }
  99. },
  100.  
  101. {
  102. module: 'MMM-Face-Reco-DNN',
  103. config: {
  104. // Logout 15 seconds after user was not detected any more
  105. // If they are detected within this period, the delay will start again
  106. logoutDelay: 15000,
  107. // How often the recognition starts in milliseconds
  108. // With a Raspberry Pi 3+ it works well every 2 seconds
  109. checkInterval: 2000,
  110. // Module set used for when there is no face detected ie no one is in front of the camera
  111. noFaceClass: 'noface',
  112. // Module set used for when there is an unknown/unrecognised face detected
  113. unknownClass: 'unknown',
  114. // Module set used for when there is a known/recognised face detected
  115. knownClass: 'known',
  116. // Module set used for strangers and if no user is detected
  117. defaultClass: 'default',
  118. // Set of modules which should be shown for any user ie when there is any face detected
  119. everyoneClass: 'everyone',
  120. // Set of modules that are always shown - show if there is a face or no face detected
  121. alwaysClass: 'always',
  122. // XML to recognize with haarcascade
  123. cascade: 'modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml',
  124. // Pre-encoded pickle with the faces
  125. encodings: 'modules/MMM-Face-Reco-DNN/tools/encodings.pickle',
  126. // Use Raspberry Pi camera or another type
  127. // 1 = RasPi camera, 0 = other camera
  128. usePiCamera: 1,
  129. // If using another type of camera, you can choose
  130. // i.e. 0 = /dev/video0 or 'http://link.to/live'
  131. source: 0,
  132. // Rotate camera
  133. rotateCamera: 0,
  134. // Method of facial recognition
  135. // dnn = deep neural network, haar = haarcascade
  136. method: 'dnn',
  137. // Which face detection model to use
  138. // "hog" is less accurate but faster on CPUs
  139. // "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated
  140. detectionMethod: 'hog',
  141. // How long in milliseconds modules take to hide and show
  142. animationSpeed: 0,
  143. // Path to Python to run the face recognition
  144. // null or '' means default path
  145. pythonPath: null,
  146. // Should a welcome message be shown using the MagicMirror alerts module?
  147. welcomeMessage: true,
  148. // Dictionary for person name mapping in welcome message
  149. // Allows for displaying name with complex character sets in welcome message e.g. jerome => Jérôme, hideyuki => 英之
  150. usernameDisplayMapping: null,
  151. // Capture new pictures of recognized people, if unknown we save it in folder "unknown"
  152. // So you can extend your dataset and retrain it afterwards for better recognitions
  153. extendDataset: false,
  154. // If extendDataset is true, you need to set the full path of the dataset
  155. dataset: 'modules/MMM-Face-Reco-DNN/dataset/',
  156. // How much distance between faces to consider it a match. Lower is more strict.
  157. tolerance: 0.6,
  158. // allow multiple concurrent user logins, 0=no, any other number is the maximum number of concurrent logins
  159. multiUser: 0,
  160. }
  161. }
  162. ]
  163. };
  164.  
  165.  
  166.  
  167.  
  168. /*************** DO NOT EDIT THE LINE BELOW ***************/
  169. if (typeof module !== "undefined") {module.exports = config;}
  170.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement