Advertisement
Marion001

MagicMirror config.js

Sep 28th, 2019
673
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Magic Mirror Config Sample
  2.  *
  3.  * By Michael Teeuw http://michaelteeuw.nl
  4.  * MIT Licensed.
  5.  *
  6.  * For more information how you can configurate this file
  7.  * See https://github.com/MichMich/MagicMirror#configuration
  8.  *
  9.  */
  10.  
  11. var config = {
  12. address: "0.0.0.0",
  13. port: 8080,
  14. ipWhitelist: [],
  15. language: "vi",
  16. timeFormat: 24,
  17. units: "metric",
  18.  
  19. modules: [
  20. {
  21. module: "alert",
  22. },
  23.  
  24.  
  25. {
  26. module: "updatenotification",
  27. position: "top_bar"
  28. },
  29.  
  30. {
  31.     module: "MMM-network-signal",
  32.     position: "center_top",
  33.     config: {
  34.         showMessage: false,
  35.     }
  36. },
  37.  
  38. {
  39. module: "clock",
  40. position: "top_left",
  41. config: {
  42. timezone: "Asia/Ho_Chi_Minh"
  43. }
  44. },
  45. {
  46.   module: "MMM-LunarDate",
  47.   position: "top_left",
  48.   config: {
  49.     template: `
  50.       <font color="red">Âm lịch:</font><font  color="#FFFFFF"> %LUNAR_DAY%/%LUNAR_MONTH%/%LUNAR_YEAR% - Kỷ Hợi</font>
  51.      
  52.     `,
  53.   }
  54. },
  55.  
  56.         {
  57.             module: "calendar",
  58.             header: "Ngày lễ Việt Nam",
  59.             position: "top_left",
  60.             config: {
  61.                 calendars: [
  62.                     {
  63.                         symbol: "calendar-check",
  64.                         maximumEntries: "5",
  65.                         //url: "file:///home/pi/MagicMirror/config/vietnam_holidays.ics"                    }
  66.                         url: "http://192.168.99.17/mirror/vietnam_holidays.ics"                 }
  67.                 ]
  68.             }
  69.         },
  70.        
  71.  
  72. {
  73. module: "compliments",
  74. position: "lower_third",
  75. config: {
  76. compliments: {
  77. anytime: [
  78. "Xin Chào!",
  79. "Hãy nói: OK Google"
  80. ],
  81. morning: [
  82. "Chào buổi sáng!"
  83. ],
  84. afternoon: [
  85. "Chào buổi chiều"
  86. ],
  87. evening: [
  88. "Chào buổi tối!"
  89. ]
  90. }
  91. }
  92. },
  93.  
  94. /*
  95. {
  96. module: "currentweather",
  97. position: "top_right",
  98. config: {
  99. location: "Hưng Yên",
  100. locationID: "1580142",//ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
  101. appid: "8473858601dabd3d2cbb24fb50840686"
  102. }
  103. },
  104. {
  105. module: "weatherforecast",
  106. position: "top_right",
  107. header: "Thời Tiết",
  108. config: {
  109. location: "Hưng Yên",
  110. locationID: "1580142",//ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
  111. appid: "8473858601dabd3d2cbb24fb50840686"
  112. }
  113. },
  114. */
  115. {
  116. module: "newsfeed",
  117. position: "bottom_bar",
  118. config: {
  119. feeds: [
  120. {
  121. title: "Báo 24h.com.vn ",
  122. url: "https://www.24h.com.vn/upload/rss/tintuctrongngay.rss"
  123. }
  124. ],
  125. showSourceTitle: true,
  126. showPublishDate: true,
  127. broadcastNewsFeeds: true,
  128. broadcastNewsUpdates: true
  129. }
  130. },
  131.  
  132. {
  133.     module: "MMM-Hotword",
  134.     position: "top_left",
  135.     config: {
  136.         chimeOnFinish: null,
  137.         mic: {
  138.             recordProgram: "arecord",
  139.             device: "plughw:1"
  140.         },
  141.         models: [
  142.             {
  143.                 hotwords    : "OK_Google",
  144.                 file        : "OK_Google.pmdl",
  145.                 sensitivity : "0.5",
  146.             },
  147.                         {
  148.                 hotwords    : "smart_mirror",
  149.                 file        : "smart_mirror.umdl",
  150.                 sensitivity : "0.5",
  151.             },
  152.                         {
  153.                 hotwords    : "Ê_Cu",
  154.                 file        : "E_Cu.pmdl",
  155.                 sensitivity : "0.5",
  156.             },
  157.         ],
  158.         commands: {
  159.             "OK_Google": {
  160.                 notificationExec: {
  161.                     notification: "ASSISTANT_ACTIVATE",
  162.                     payload: (detected, afterRecord) => {
  163.                         return {profile:"default"}
  164.                     }
  165.                 },
  166.                 restart:false,
  167.                 afterRecordLimit:0
  168.             },
  169.             "smart_mirror": {
  170.                 notificationExec: {
  171.                     notification: "ASSISTANT_ACTIVATE",
  172.                     payload: (detected, afterRecord) => {
  173.                         return {profile:"default"}
  174.                     }
  175.                 },
  176.                 restart:false,
  177.                 afterRecordLimit:0
  178.             },
  179.             "Ê_Cu": {
  180.                 notificationExec: {
  181.                     notification: "ASSISTANT_ACTIVATE",
  182.                     payload: (detected, afterRecord) => {
  183.                         return {profile:"default"}
  184.                     }
  185.                 },
  186.                 restart:false,
  187.                 afterRecordLimit:0
  188.             },
  189.         }
  190.     }
  191. },
  192.        
  193.  
  194. {
  195. module: "MMM-AssistantMk2",
  196. position: "top_left",
  197. config: {
  198. deviceLocation: {
  199. coordinates: {
  200. latitude: 20.9333678, //Tọa Độ Nhà Bạn Kinh Độ
  201. longitude: 106.0099915, // Tọa Độ Nhà Bạn VĨ Độ
  202. }},
  203. record: {
  204. sampleRate: 16000,// audio sample rate
  205. threshold : 0.5,// silence threshold (rec only)
  206. thresholdStart: null, // silence threshold to start recording, overrides threshold (rec only)
  207. thresholdEnd: null, // silence threshold to end recording, overrides threshold (rec only)
  208. silence : 1.0,// seconds of silence before ending
  209. verbose : false,// log info to the console
  210. recordProgram : "arecord",
  211. device: "plughw:1"
  212. },
  213. play: {
  214. playProgram: "mpg123",
  215.  
  216. },
  217. responseVoice: true,
  218. responseScreen: true,
  219. responseAlert: true,
  220. screenDuration: 1500,
  221. useGactionCLI: false,
  222. youtubeAutoplay: true,
  223. pauseOnYoutube:true,  //nếu là true thì khi chạy youtube không gọi đc google/ false
  224. projectId: "mirror-f1994",
  225. deviceModelId: "mirror-f1994-mirror-99myfb", //
  226. deviceInstanceId: "mirror",
  227. notifications: {
  228. ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
  229. ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
  230. },
  231. }
  232. },
  233.  
  234.  
  235. {
  236.     module: 'MMM-Remote-Control',
  237.     // uncomment the following line to show the URL of the remote control on the mirror
  238.   //   position: 'bottom_left'
  239.     // you can hide this module afterwards from the remote control itself
  240.     config: {
  241.         customCommand: {},  // Optional, See "Using Custom Commands" below
  242.         customMenu: "custom_menu.json", // Optional, See "Custom Menu Items" below
  243.         showModuleApiMenu: true, // Optional, Enable the Module Controls menu
  244.         //apiKey: "",         // Optional, See API/README.md for details
  245.     }
  246. },       
  247. /*
  248.  {
  249.         module: 'MMM-Screencast',
  250.         position: 'bottom_right', // This position is for a hidden <div /> and not the screencast window
  251.         config: {
  252.             position: 'bottomRight',
  253.             height: 300,
  254.             width: 500,
  255.         }
  256.         },
  257. {
  258.         module: 'MMM-iFrame',
  259.         position: 'top_right',  // This can be any of the regions.
  260.         config: {
  261.             // See 'Configuration options' for more information.
  262.                 url: ["http://192.168.99.17/lich.html"],  // as many URLs you want or you can just ["ENTER IN URL"] if single URL.
  263.                 updateInterval: 0.5 * 60 * 10000, // rotate URLs every 30 seconds
  264.                 width: "1000", // width of iframe
  265.                 height: "1685", // height of iframe
  266. //              frameWidth: "300" // width of embedded iframe, height is beeing calculated by aspect ratio of iframe
  267.             }
  268.         },*/
  269.  
  270.  
  271.  
  272. {
  273.   module: "MMM-DarkSkyForecast",
  274.   header: "Thời Tiết",
  275.   position: "top_right",
  276.   classes: "default everyone",
  277.   disabled: false,
  278.   config: {
  279.     apikey: "355ac48a6f56825706fcf0c9f794a20a",
  280.     latitude: "20.9333678",
  281.     longitude: "106.0099915",      
  282.     iconset: "4c",
  283.     concise: false,
  284.     forecastLayout: "table",
  285.     label_days: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"],
  286.     showForecastTableColumnHeaderIcons: false, // ẩn hiện icon ở các cột
  287.     showHourlyForecast: false, // ẩn hiện thông báo hàng giờ
  288.     showPrecipitation: false, // hiện ẩn lượng mưa
  289.     showWind: false, // ẩn hiện gió
  290.         label_high: "Cao nhất",
  291.     label_low: "Thấp nhất",
  292.     forecastHeaderText: "Dự báo 3 ngày tới",
  293.   }
  294. },
  295. {
  296.     module: 'MMM-connection-status',
  297.     header: "Trạng thái mạng",
  298.     position: 'top_right', // Or any valid MagicMirror position.
  299.     config: {
  300.         // See 'Configuration options' for more information.
  301.     }
  302. },
  303.  
  304.  
  305. ]
  306.  
  307. };
  308.  
  309. /*************** DO NOT EDIT THE LINE BELOW ***************/
  310. if (typeof module !== "undefined") {module.exports = config;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement