首页
关于
Search
1
CentOS安装Nginx
81 阅读
2
Ubuntu 安装 Docker 的两种方法
49 阅读
3
Linux安装Maven
43 阅读
4
MagicMirror模块安装
43 阅读
5
在CentOS 7.9里源码编译安装Mysql 5.7
41 阅读
WordPress
MagicMirror
Mysql
登录
Search
〆尐亻寸ゾ
累计撰写
11
篇文章
累计收到
2
条评论
首页
栏目
WordPress
MagicMirror
Mysql
页面
关于
搜索到
3
篇与
的结果
2023-10-25
2023年10树莓派4B安装智能魔镜(MagicMirror)
首先看一下我的系统版本# 查看系统版本 $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" # 查看系统位数 $ getconf LONG_BIT 32 # 查看树莓派内核信息 $ uname -a Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux 中国大陆地区先更换国内源# 备份源 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak sudo nano /etc/apt/sources.list # 注释掉原来的,添加下面清华大学的镜像源 deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ bullseye main non-free contrib rpi # 注释掉原来的,添加下面清华大学的镜像源 sudo nano /etc/apt/sources.list.d/raspi.list deb https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bullseye main # 提示: Ctrl+x退出编辑,会提示是否保存,输入y按Enter键保存换好国内源后更新系统sudo apt update sudo apt upgrade安装MagicMirror之前,需要先安装Node.js# 安装Node.js # curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - # sudo apt install -y nodejs # 原安装脚本已经弃用,换用新的安装方式 # 参考https://deb.nodesource.com/ # 安装 Node.js 20.x sudo apt-get update && sudo apt-get install -y ca-certificates curl gnupg sudo mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg NODE_MAJOR=20 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list sudo apt-get update && sudo apt-get install nodejs -y为了后面的安装顺畅,先修改配置npm的镜像源,这里用淘宝的npm镜像源# 查看npm的默认下载地址 npm config get registry # 配置国内镜像源(https://registry.npm.taobao.org) # 旧版npm.taobao.org换为新版地址npmmirror.com npm config set registry https://registry.npmmirror.com/ npm config set disturl https://registry.npmmirror.com/dist/ npm config set electron_mirror https://npmmirror.com/mirrors/electron/ npm config set sass_binary_site https://npmmirror.com/mirrors/node-sass/ npm config set phantomjs_cdnurl https://npmmirror.com/mirrors/phantomjs/ # 执行如下的npm config set时可能有些会报错 # npm config set disturl # npm config set electron_mirror # npm config set sass_binary_site # npm config set phantomjs_cdnurl # 可以编辑/home/pi/.npmrc,最后行添加 sudo nano /home/pi/.npmrc registry=https://registry.npmmirror.com/ disturl=https://registry.npmmirror.com/dist/ electron_mirror=https://npmmirror.com/mirrors/electron/ sass_binary_site=https://npmmirror.com/mirrors/node-sass/ phantomjs_cdnurl=https://npmmirror.com/mirrors/phantomjs/配置完所有的系统环境后,接下来开始安装MagicMirror克隆仓库并查看主分支# 克隆仓库并查看主分支 git clone https://github.com/MichMich/MagicMirror # 国内慢,用镜像加速 # git clone https://ghproxy.com/https://github.com/MichMich/MagicMirror进入仓库cd MagicMirror安装应用程序npm run install-mm复制配置示例文件cp config/config.js.sample config/config.js启动应用程序npm run start # 仅适用于服务器 # npm run server
2023年10月25日
5 阅读
0 评论
0 点赞
2023-07-20
MagicMirror模块安装
Google Assistant模块及扩展插件安装https://wiki.bugsounet.fr/MMM-GoogleAssistant# MMM-GoogleAssistant cd ~/MagicMirror/modules/ git clone https://github.com/bugsounet/MMM-GoogleAssistant cd ~/MagicMirror/modules/MMM-GoogleAssistant npm install # Gateway cd ~/MagicMirror/modules/ git clone https://github.com/bugsounet/Gateway cd ~/MagicMirror/modules/Gateway npm install # EXT-Detector cd ~/MagicMirror/modules/ git clone https://github.com/bugsounet/EXT-Detector cd ~/MagicMirror/modules/EXT-Detector npm install # EXT-Alert cd ~/MagicMirror/modules/ git clone https://github.com/bugsounet/EXT-Alert cd ~/MagicMirror/modules/EXT-Alert npm install # EXT-YouTubeCast cd ~/MagicMirror/modules/ git clone https://github.com/bugsounet/EXT-YouTubeCast cd ~/MagicMirror/modules/EXT-YouTubeCast npm install # EXT-YouTube cd ~/MagicMirror/modules/ git clone https://github.com/bugsounet/EXT-YouTube cd ~/MagicMirror/modules/EXT-YouTube npm install # EXT-Spotify cd ~/MagicMirror/modules/ git clone https://github.com/bugsounet/EXT-Spotify cd ~/MagicMirror/modules/EXT-Spotify npm install # 生成令牌 # Spotify 设置 # 1、转到 https://developer.spotify.com # 2、导航到仪表板>创建应用(根据你的想法填写信息) # 3、设置创建的应用,(编辑设置) # 重定向地址(Redirect URIs.):http://localhost:8888/callback # 这就是您所需要的。只需保存即可。 # 4、现在将您的客户端 ID 和客户端密钥复制到任何备忘录中 # 5、过去您的和在配置CLIENT_IDCLIENT_SECRET # 创建令牌 cd ~/MagicMirror/modules/EXT-Spotify npm run token # EXT-Librespot cd ~/MagicMirror/modules/ git clone https://github.com/bugsounet/EXT-Librespot cd ~/MagicMirror/modules/EXT-Librespot npm install # Librespot player install cd ~/MagicMirror/modules/EXT-Librespot npm run setup # 如果您更喜欢从 github 源代码构建播放器(安装需要 ~30 分钟!) # cd ~/MagicMirror/modules/EXT-Librespot # npm run setup:source # EXT-SpotifyCanvasLyrics cd ~/MagicMirror/modules/ git clone https://github.com/bugsounet/EXT-SpotifyCanvasLyrics cd ~/MagicMirror/modules/EXT-SpotifyCanvasLyrics npm installlet 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 or empty, is "localhost" port: 8080, basePath: "/", // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy // you must set the sub path here. basePath must end with a / ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.0.0/24"], // 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"], useHttps: false, // Support HTTPS or not, default "false" will use HTTP httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true language: "zh-cn", locale: "zh", logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging timeFormat: 24, units: "metric", modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" }, { module: "calendar", header: "中国假日", position: "top_left", config: { calendars: [ { symbol: "calendar-check", url: "webcal://p10-calendars.icloud.com/holiday/CN_zh.ics" } ] } }, { module: "compliments", position: "lower_third" }, { module: "weather", position: "top_right", config: { weatherProvider: "openweathermap", type: "current", location: "New York", locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "df8404be3340477b65530182dd22840a" } }, { module: "weather", position: "top_right", header: "Weather Forecast", config: { weatherProvider: "openweathermap", type: "forecast", location: "New York", locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city apiKey: "df8404be3340477b65530182dd22840a" } }, { module: "MMM-GoogleAssistant", configDeepMerge: true, config: { assistantConfig: { latitude: 51.508530, longitude: -0.076132, }, } }, { module: 'EXT-Spotify', position: 'top_left', config: { updateInterval: 1000, idleInterval: 10000, useBottomBar: false, CLIENT_ID: "004ae89435fd47c68ae1a2e01eddaf11", CLIENT_SECRET: "929cd4129b68447ca8e37abd78a44f3f", mini: true, forceSCL: false, noCanvas: false } }, { module: 'EXT-Librespot', config: { debug: false, email: "bizdisp@gmail.com", password: "d********4", deviceName: "MagicMirror", minVolume: 50, maxVolume: 100 } }, { module: 'EXT-SpotifyCanvasLyrics' }, { module: "Gateway", config: { debug: false, username: "admin", password: "admin", usePM2: false, PM2Id: 0, CLIENT_ID: null } }, { module: 'EXT-Alert', config: { debug: false, ignore: [] } }, { "module": "EXT-Detector", "position": "top_left", "disabled": false, "configDeepMerge": true, "config": { "debug": false, "useIcon": true, "touchOnly": false, "porcupineAccessKey": null, "porcupineCustomModel": null, "detectors": [ { "detector": "Snowboy", "Model": "jarvis", "Sensitivity": null }, { "detector": "Porcupine", "Model": "ok google", "Sensitivity": null }, { "detector": "Porcupine", "Model": "hey google", "Sensitivity": null } ] } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "人民日报", url: "http://www.people.com.cn/rss/politics.xml" } ], showSourceTitle: true, showPublishDate: true, broadcastNewsFeeds: true, broadcastNewsUpdates: true } }, ] };问候语 MagicMirror/modules/default/compliments/compliments.js compliments: { anytime: [ "我将永远与你同在" ], morning: [ "温小猫早上好!", "今天的你比昨天更好看了!", "昨晚睡得好吗?", "昨晚有梦到我吗?" ], afternoon: [ "你好可爱!", "今天你有没有好好吃饭呀!", "我喜欢你!" ], evening: [ "晚上记得按时睡觉!", "我好想你!", "我每时每刻都想和你在一起!" ] },
2023年07月20日
43 阅读
0 评论
0 点赞
2023-07-20
MagicMirror安装
树莓派4B安装MagicMirror魔镜系统写入系统首次启动后,先更新系统# 更新系统 sudo apt update sudo apt upgrade替换开机Logo# 备份默认的启动Logo sudo mv /usr/share/plymouth/themes/pix/splash.png /usr/share/plymouth/themes/pix/splash.png.bak # 上传自己的启动Logo wget http://smart.owatis.com/splash.png # 替换启动Logo sudo cp splash.png /usr/share/plymouth/themes/pix/splash.png取消彩虹屏sudo nano /boot/config.txt # 在内容的第一行增加 disable_splash=1手动安装前的准备# 下载并安装最新的 Node.js 版本: curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install -y nodejs # 配置NPM的国内镜像源(https://registry.npm.taobao.org) npm config set registry https://registry.npmmirror.com/ # 查看npm的默认下载地址 npm config get registry # 配置electron_mirror npm config set electron_mirror https://npmmirror.com/mirrors/electron/ # 如果提示错误,可手动修改配置文件 # npm config ls 列出npm配置 # "user" config from /home/pi/.npmrc # 编辑/home/pi/.npmrc nano /home/pi/.npmrc # 最后行添加 electron_mirror=https://npmmirror.com/mirrors/electron/ # 国内镜像源 # npm config set registry https://registry.npmmirror.com/ # npm config set disturl https://registry.npmmirror.com/dist/ # npm config set electron_mirror https://npmmirror.com/mirrors/electron/ # npm config set sass_binary_site https://npmmirror.com/mirrors/node-sass/ # npm config set phantomjs_cdnurl https://npmmirror.com/mirrors/phantomjs/ 安装MagicMirror# 克隆仓库主分支 git clone https://github.com/MichMich/MagicMirror # 进入存储库 cd MagicMirror/ # 安装应用程序 npm run install-mm # 复制配置示例文件 cp config/config.js.sample config/config.js # 启动应用程序 npm run start # 仅在服务器上使用 npm run servernpm安装失败后清理# 强制清除缓存 npm cache clean --force # 删除package-lock.json和依赖模块 rm -rf package-lock.json node_modules
2023年07月20日
20 阅读
0 评论
0 点赞