<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:wp="http://wordpress.org/export/1.2/" xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"  >
		<channel>
		<title>KRUNK ZHOU</title>
        <description>编程改变世界 ~ 旷课の博客</description>
        <link>https://revival.krunk.cn</link>
		<lastBuildDate>Wed, 18 Aug 2021 01:32:27 +0000</lastBuildDate>
					<item>
							<title><![CDATA[Wio Terminal 控制多个 HomeKit 设备]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog2174.html]]></link>
							<pubDate>周三, 18 8月 2021 09:27:47 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>2174</dc:identifier>
							<dc:modified>2021-08-18 09:32:27</dc:modified>
							<dc:created unix="1629250067">2021-08-18 09:27:47</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog2174.html]]></guid><category>1</category>
							<description><![CDATA[闲来无事，想接触下Arduino开发，于是刚巧不巧看到了亚马逊 Wio Terminal 在打折就入手了两个，]]></description><content:encoded><![CDATA[<!-- wp:paragraph -->
<p>闲来无事，想接触下Arduino开发，于是刚巧不巧看到了亚马逊 Wio Terminal 在打折就入手了两个，想着可以给自己的家庭添加两个控制器，因为设备繁多所以也不太方便用 HomeKit 按键来实现，也不太喜欢走到哪里都用手机控制，于是乎就做了这么个项目。开发文档 (https://wiki.seeedstudio.com/Wio-Terminal-Getting-Started/)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-style-border-round-and-with-shadow"><img src="https://github.com/KrunkZhou/Wio-Terminal-HomeKit/blob/main/images/wio-ternimal-homekit.jpg?raw=true" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>RTL8720DN 貌似不能直接使用网上有的 HomeSpan 这类直接集成原生 Homekit，也刚好我的米家，TP 这类设备使用了 HomeBridge 来桥接，所以最后决定用 HomeBridge 来桥接这台小屏幕。</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>先来看看效果：</p>
<!-- /wp:paragraph -->

<!-- wp:image {"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-style-border-round-and-with-shadow"><img src="https://github.com/KrunkZhou/Wio-Terminal-HomeKit/blob/main/images/nanoleaf.gif?raw=true" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>自己画了个主屏幕以及菜单，还加入了 NTP 时间，放在桌上又实用又好看，朋友来自己家还能说这个是自己做的。</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"目前的功能："} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>目前的功能：</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:list {"ordered":true} -->
<ol><li>支持多个页面，每页模拟一个 HomeKit Button 最多可以执行三个操作</li><li>时间显示，连接网络时会自动更新</li><li>超时自动熄灭屏幕</li><li>抬手亮屏，不用手动点击锁屏键</li><li>方便的自定义菜单 - 通过Array自定义菜单页面</li><li>HomeBridge 插件 - 定义按钮端口以及名称</li></ol>
<!-- /wp:list -->

<!-- wp:pandastudio/title {"content":"安装注意事项"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>安装注意事项</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>ino 文件在 Wio/KIOT-Project/KIOT-Project.ino，使用Arduino打开<br>库文件在 Wio/libraries 复制到 Arduino 库文件夹中<br>HB 插件为 homebridge-kiot 文件夹</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"网络参数配置"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>网络参数配置</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>很简单吧</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>// WiFi SSID (部分5Ghz AP可能无法连接)
const char* ssid = "KIOT-Terminal";
// WiFi 密码
const char* password = "KIOT-UYDFGW6IdaW";
// HomeBridge地址 不要后斜杠以及ssl
// 如需使用ssl还需要配置公钥
const char* server_ip = "http://10.0.0.86";</code></pre>
<!-- /wp:code -->

<!-- wp:pandastudio/title {"content":"HomeKit 按钮"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>HomeKit 按钮</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:image {"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-style-border-round-and-with-shadow"><img src="https://github.com/KrunkZhou/Wio-Terminal-HomeKit/blob/main/images/5way.png?raw=true" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>三个功能在每页中分别对应 Wio Ternimal 的操作</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>按一下 - 向上拨<br>按两下 - 向下拨<br>长按 - 按下</p>
<!-- /wp:paragraph -->

<!-- wp:image {"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-style-border-round-and-with-shadow"><img src="https://github.com/KrunkZhou/Wio-Terminal-HomeKit/blob/main/images/homekit-button.jpg?raw=true" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:pandastudio/title {"content":"时间显示"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>时间显示</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>通过 NTPClient (<a href="https://github.com/taranais/NTPClient/">https://github.com/taranais/NTPClient/</a>) 实现联网同步，默认通过 pool.ntp.org 来更新<br>感谢这篇简单的教程: https://randomnerdtutorials.com/esp32-ntp-client-date-time-arduino-ide/</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>需要自行定义时区</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>// 时区offset定义
  // GMT +1 = 3600
  // GMT +8 = 28800
  // GMT -4 = -14400
  // GMT 0 = 0
const int time_offset = 28800;</code></pre>
<!-- /wp:code -->

<!-- wp:pandastudio/title {"content":"自动熄屏以及抬手亮屏"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>自动熄屏以及抬手亮屏</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>通过参数定义一个超时时间，会在没有操作到达时间后自动熄灭</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>IMU会检测是否有移动，如果监测到移动就会亮屏 (手动关闭屏幕5秒内会暂时禁用)</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"自定义菜单"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>自定义菜单</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:code -->
<pre class="wp-block-code"><code>const String menu_config&#91;7]&#91;6] = 
{ { "0", "0", "Home" },  //定义首页标题
{ "1", "44002", "Living Room", "ON", "Game", "OFF" }, 
{ "2", "44003", "Sync Box", "Start", "", "End" },
{ "3", "44004", "Server Fan", "ON", "", "OFF" },
{ "4", "44005", "Dinning Room", "ON", "", "OFF" },
{ "5", "44006", "Nanoleaf", "ON", "Pink", "OFF" },
{ "6", "44007", "Garage Door", "Open", "", "Close" }
};</code></pre>
<!-- /wp:code -->

<!-- wp:code -->
<pre class="wp-block-code"><code>menu_config&#91;修改为页面总数]&#91;6]</code></pre>
<!-- /wp:code -->

<!-- wp:code -->
<pre class="wp-block-code"><code>{ "编号", "HB端口号", "菜单标题", "向上拨提示文字", "按下提示文字", "向下拨提示文字" }</code></pre>
<!-- /wp:code -->

<!-- wp:pandastudio/title {"content":"HomeBridge 插件"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>HomeBridge 插件</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>HomeBridge 自身的配置很简单，我是用 Docker 安装在了群晖上，可以访问官网就能找到安装方法</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>由于对插件的不熟悉，目前对我来说之内做出来一个端口对应一个 Button，但是无妨，也用不了多少个，我的插件是基于 HomeBridge-Dummy 进行的修改，所以比较简单 (如果有大佬会写Platform，那就可以避免这个问题了)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>HB 插件安装方法</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>将 homebridge-kiot 文件夹复制到配置文件目录下</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>在 HomeBridge 图形界面右上角打开终端输入</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>npm install /路径/homebridge-kiot</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>输入完成后就会显示在插件tab中</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>单个 Button 的配置文件</p>
<!-- /wp:paragraph -->

<!-- wp:image {"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://github.com/KrunkZhou/Wio-Terminal-HomeKit/blob/main/images/hb-config.png?raw=true" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:code -->
<pre class="wp-block-code"><code>{
    "accessory": "KIOTSwitch", // 插件名 不可修改
    "name": "LivingRoom Switch KIOT", // 按钮名称
    "port": 44002 // 端口号 注意不要与其他端口冲突
}</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>完整配置json文件 (完整的Homebridge配置文件例子，经供参考)</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>{
    "bridge": {
        "name": "HomeBridge",
        "username": "0A:81:3D:E3:84:2B",
        "port": 53780,
        "pin": "031-45-868"
    },
    "platforms": &#91;
        {
            "name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "auto",
            "tempUnits": "c",
            "lang": "zh-CN",
            "platform": "config"
        }
    ],
    "disabledPlugins": &#91;],
    "accessories": &#91;
        {
            "accessory": "KIOTSwitch",
            "name": "LivingRoom Switch KIOT",
            "port": 44002
        },
        {
            "accessory": "KIOTSwitch",
            "name": "SyncBox Switch KIOT",
            "port": 44003
        },
        {
            "accessory": "KIOTSwitch",
            "name": "ServerFan Switch KIOT",
            "port": 44004
        },
        {
            "accessory": "KIOTSwitch",
            "name": "DinningRoom Switch KIOT",
            "port": 44005
        },
        {
            "accessory": "KIOTSwitch",
            "name": "Nanoleaf Switch KIOT",
            "port": 44006
        },
        {
            "accessory": "KIOTSwitch",
            "name": "GarageDoor Switch KIOT",
            "port": 44007
        }
    ]
}</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>配置完成并重启后会在家庭App中显示这几个按键</p>
<!-- /wp:paragraph -->

<!-- wp:image {"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://github.com/KrunkZhou/Wio-Terminal-HomeKit/blob/main/images/homekit-all.jpg?raw=true" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>启动 Wio Terminal 应该就能操控这几个按键了，如果还有问题可以在下面评论</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"下载："} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>下载：</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/download {"href":"https://github.com/KrunkZhou/Wio-Terminal-HomeKit","need_reply":true} -->
<div class="wp-block-pandastudio-download">[reply2down]https://github.com/KrunkZhou/Wio-Terminal-HomeKit[/reply2down]</div>
<!-- /wp:pandastudio/download -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->]]></content:encoded><enclosure url="https://image.krunk.cn/images/2021/08/17/wio-ternimal-homekit.md.jpg"/><media:content url="https://image.krunk.cn/images/2021/08/17/wio-ternimal-homekit.md.jpg" height="150" width="150" type="image/jpeg"/>		
					</item>
					<item>
							<title><![CDATA[VueDoc &#8211; 方便的API或技术文档工具]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog2132.html]]></link>
							<pubDate>周五, 02 7月 2021 22:43:34 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>2132</dc:identifier>
							<dc:modified>2021-07-02 22:43:37</dc:modified>
							<dc:created unix="1625237014">2021-07-02 22:43:34</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog2132.html]]></guid><category>1</category>
							<description><![CDATA[VueDoc是一个完全由 Javascript 驱动的文档程序 为了方便部署并且减少环境安装和影响，VueDo]]></description><content:encoded><![CDATA[<!-- wp:pandastudio/title {"content":"什么是VueDoc","titleClass":"title_style_01","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2>什么是VueDoc</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>VueDoc是一个完全由<strong> Javascript</strong> 驱动的文档程序</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":708,"height":355,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/07/02/-2021-07-02-102749.png" alt="" width="708" height="355"/><figcaption>主页</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"width":707,"height":605,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/07/02/-2021-07-02-102815.png" alt="" width="707" height="605"/><figcaption>文档页</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"width":718,"height":502,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/07/02/-2021-07-02-103333.png" alt="" width="718" height="502"/><figcaption>强大的 MarkDown 编辑器</figcaption></figure>
<!-- /wp:image -->

<!-- wp:pandastudio/title {"content":"它如何运行","titleClass":"title_style_01","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2>它如何运行</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>为了方便部署并且减少环境安装和影响，VueDoc运行在Docker环境中。安装后直接运行。</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Demo: <a href="https://doc.krunk.cn/" target="_blank" rel="noreferrer noopener sponsored">https://doc.krunk.cn/</a></strong></p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"它的原理","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2>它的原理</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>你确定需要看原理？</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"后端驱动","titleClass":"title_style_02","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h2>后端驱动</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>VueDoc后端由<strong> node.js</strong> 进行驱动。由于其功能单一，并不需要复杂的数据库，因此它的数据完全存储在 json 文件中。您的每次访问，都是从服务器的内存中读取 json 数据而已。</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>正是因为如此，所以说它是完全用 Javascript 驱动的产品</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"数据持久化","titleClass":"title_style_02","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h2>数据持久化</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>VueDoc将数据延迟写入到 json 文件中。为数据持久化存储，可在 Docker 中将下面的文件夹映射到本地：</p>
<!-- /wp:paragraph -->

<!-- wp:table -->
<figure class="wp-block-table"><table><thead><tr><th>#</th><th>Docker位置</th><th>备注</th></tr></thead><tbody><tr><td>1</td><td>/usr/src/app/data</td><td>数据 json</td></tr><tr><td>2</td><td>/usr/src/app/images</td><td>文章中上传的图片</td></tr></tbody></table></figure>
<!-- /wp:table -->

<!-- wp:pandastudio/title {"content":"前端驱动","titleClass":"title_style_02","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h2>前端驱动</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>VueDoc的前端使用<strong> Vue.js</strong> 进行构建，是一个静态的单页面应用。</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"有兴趣？","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2>有兴趣？</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/tips {"content":"\u003cp\u003e联系 QQ 448981533 获取免费或进阶版！\u003c/p\u003e"} -->
<div class="wp-block-pandastudio-tips">[tip type="info" ]<p>联系 QQ 448981533 获取免费或进阶版！</p>[/tip]</div>
<!-- /wp:pandastudio/tips -->

<!-- wp:paragraph {"textColor":"cyan-bluish-gray","fontSize":"small"} -->
<p class="has-cyan-bluish-gray-color has-text-color has-small-font-size">懒得联系？留言QQ说不定有时间的话会来拉个群</p>
<!-- /wp:paragraph -->]]></content:encoded><enclosure url="https://image.krunk.cn/images/2021/07/02/-2021-07-02-102749.png"/><media:content url="https://image.krunk.cn/images/2021/07/02/-2021-07-02-102749.png" height="150" width="150" type="image/jpeg"/>		
					</item>
					<item>
							<title><![CDATA[修复三星智能电视背光忽明忽暗问题]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog2073.html]]></link>
							<pubDate>周一, 17 5月 2021 13:36:07 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>2073</dc:identifier>
							<dc:modified>2021-05-17 13:41:33</dc:modified>
							<dc:created unix="1621229767">2021-05-17 13:36:07</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog2073.html]]></guid><category>28</category><category>10</category><category>5</category>
							<description><![CDATA[很多人以为画面变黑，亮度变暗是节能模式的锅，可是关掉后还是会忽明忽暗 (关还是要关的)，特别是在玩比较黑的游戏]]></description><content:encoded><![CDATA[<!-- wp:paragraph -->
<p>很多人以为画面变黑，亮度变暗是节能模式的锅，可是关掉后还是会忽明忽暗 (关还是要关的)，特别是在玩比较黑的游戏的时候，眼睛都要瞎了</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>症状：画面黑的时候背光变暗，画面亮的时候背光变亮，导致看个电影或玩个游戏画面忽明忽暗</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>找到了一个修改 PWM背光调节 的参数，只要设置最小调光到 100% 就能防止忽明忽暗再次发生</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>我的电视机型号为 UN43NU6900，UN40K6250， 这里用前者进行演示，看起来大部分的三星电视机操作都是一样的</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"开始调参","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2>开始调参</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>首先将电视机待机 (黑屏，电源指示灯常亮)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":500,"height":375,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/17/WechatIMG47.jpg" alt="" width="500" height="375"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>使用普通的红外遥控器 (三星蓝牙的智能遥控器貌似进不去)<br>依次点击按键 <strong>Mute - 1 - 8 - 2 - 电源键</strong> (进不去的话可以慢慢点 看到红灯闪烁了再点下一个)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":375,"height":500,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/17/WechatIMG48.jpg" alt="" width="375" height="500"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>会出现开机logo，开机后稍作等待就能进入 Service Menu</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":500,"height":375,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/17/WechatIMG42.jpg" alt="" width="500" height="375"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>点击 SVC菜单 然后 Other Setting菜单 最后选择 CAL Data Restore (会显示USB未连接，点击OK忽略即可，这个可以解锁高级菜单)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":500,"height":375,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/17/WechatIMG43.jpg" alt="" width="500" height="375"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>返回到首页会发现地下多了个 Advanced，将光标移上去，然后点击遥控器上的 <strong>0 四次</strong> (<strong>0000</strong>，这是进入密码)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":500,"height":375,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/17/WechatIMG44.jpg" alt="" width="500" height="375"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>菜单再次变多，点击 Picture_2D菜单，再点击 SubSetting菜单</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":500,"height":375,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/17/WechatIMG45.jpg" alt="" width="500" height="375"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>将 PWM Min 和 PWM Mid 改为 100 (论坛上也有人说把 PWM_MOVIE_INI 改为 100 但貌似不起用电影模式就不会有影响)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":500,"height":375,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/17/WechatIMG46.jpg" alt="" width="500" height="375"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>点击电源键关机，过两秒开机，开机后的屏幕还是暗的，但是等变亮后就不再会忽明忽暗了！</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":500,"height":293,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/17/WechatIMG49.jpg" alt="" width="500" height="293"/></figure>
<!-- /wp:image -->]]></content:encoded><enclosure url="https://image.krunk.cn/images/2021/05/17/WechatIMG46.jpg"/><media:content url="https://image.krunk.cn/images/2021/05/17/WechatIMG46.jpg" height="150" width="150" type="image/jpeg"/>		
					</item>
					<item>
							<title><![CDATA[搬家啦！我的新全屋UBNT设备-Unifi全家桶]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog1857.html]]></link>
							<pubDate>周六, 15 5月 2021 22:49:57 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>1857</dc:identifier>
							<dc:modified>2021-05-15 23:01:26</dc:modified>
							<dc:created unix="1621090197">2021-05-15 22:49:57</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog1857.html]]></guid><category>28</category><category>10</category><category>33</category><category>5</category><category>45</category>
							<description><![CDATA[自从开始折腾网络后，就入坑了全套unifi的基础设备 (USG,CK,USW)，可当 Unifi Dream ]]></description><content:encoded><![CDATA[<!-- wp:paragraph -->
<p>自从开始折腾网络后，就入坑了全套unifi的基础设备 (USG,CK,USW)，可当 Unifi Dream Machine 一出，我就深深陷入了unifi全家桶里了<br>(对新来的访客解释下，我不是专业的IT，只是个还在学校里划水的一个苦学生?)</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"Unifi Design Center","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2>Unifi Design Center</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>搬入新家之前先粗略规划一下布局，设备不是很多，但我们平时会使用手机的地方以及IOT设备覆盖到就足够了 (地图是搬入新家之前用 iPad 扫描的简略建模)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":1000,"height":546,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/14/2021-05-14-22.38.23.png" alt="" width="1000" height="546"/><figcaption>5GHz 网络预测覆盖</figcaption></figure>
<!-- /wp:image -->

<!-- wp:image {"width":1000,"height":547,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/14/2021-05-14-22.38.10.png" alt="" width="1000" height="547"/><figcaption>Protect 摄像头预计覆盖</figcaption></figure>
<!-- /wp:image -->

<!-- wp:pandastudio/title {"content":"\u003cstrong\u003eUnifi Network\u003c/strong\u003e","titleClass":"title_style_01","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2><strong>Unifi Network</strong></h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/title {"content":"软件 Network 控制器","titleClass":"title_style_02","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h3>软件 Network 控制器</h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>Unifi Network 是全家桶中最重要的网络应用了，(y1s1改版后虽然对我来说功能难找但真的好看)，“Simplify IT” 这句话不是瞎写的，快速部署，维护方便都是 UBNT 产品吸引我的地方</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":1000,"height":547,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/14/2021-05-14-23.30.21.png" alt="" width="1000" height="547"/><figcaption>Network Dashboard</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>它监控所有设备的网络使用情况，方便我找出占网设备或占网服务</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":1000,"height":548,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/2021-05-15-10.06.54.png" alt="" width="1000" height="548"/><figcaption>Statistic</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Internet Threat Management 可以保护我的服务器免受攻击</p>
<!-- /wp:paragraph -->

<!-- wp:image {"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/2021-05-15-10.11.51.png" alt=""/><figcaption>Internet Threat Management</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>手机上的 AR 也是超级好用</p>
<!-- /wp:paragraph -->

<!-- wp:video -->
<figure class="wp-block-video"><video autoplay loop muted src="https://prd-www-cdn.ubnt.com/media/static/media/01-c.e5ebfa2b.mp4" playsinline></video></figure>
<!-- /wp:video -->

<!-- wp:pandastudio/title {"content":"硬件","titleClass":"title_style_02","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h3>硬件</h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>Unifi 设备拓扑图<br>- UDMP 和交换机放在位于客厅的小机架中<br>- Switch Flex用来连接茶几上的电视机，游戏机以及打印机<br>- AP Flex 放在上图右侧的卧室里 (卧室里还有一台 Netgear G108T 交换机接电脑)<br>- AP IW 放在上图左上角客厅</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":1000,"height":384,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/2021-05-15-01.47.17.png" alt="" width="1000" height="384"/><figcaption>Unifi 拓扑图</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>下图上方为 Unifi Switch 16 POE 交换机 - 带有8个 POE+ 网口<br>中间为 Unifi Dream Machine Pro<br>下方放置 NAS 和小 Windows Server 服务器，还有一些小控制盒在里面深处 (Obihai, Hue, 门锁网关, 小米网关)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":1000,"height":750,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/IMG_1973.jpg" alt="" width="1000" height="750"/><figcaption>服务器机架</figcaption></figure>
<!-- /wp:image -->

<!-- wp:pandastudio/tips {"content":"\u003cp\u003e感谢 Tom\u0026amp;Whr 送的 UDM Pro 生日礼物!\u003c/p\u003e","typeClass":"tip info inlineBlock"} -->
<div class="wp-block-pandastudio-tips">[tip type="info" display="inlineBlock"]<p>感谢 Tom&amp;Whr 送的 UDM Pro 生日礼物!</p>[/tip]</div>
<!-- /wp:pandastudio/tips -->

<!-- wp:paragraph -->
<p>可乐桶 UAP Flex 是我最喜欢的AP之一，小巧可爱，高速稳定，我选择把它放在我的卧室架子上，大部分用网时间都会在这里<br>UAP IW 虽然速度不快 放在客厅也足够我们使用了</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/gallery {"images":["https://image.krunk.cn/images/2021/05/15/IMG_1960.jpg","https://image.krunk.cn/images/2021/05/15/IMG_1972.jpg"]} /-->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:paragraph -->
<p>下图左侧为 AP Flex 的测速，右侧为 AP IW，均站在AP旁测试，我们家带宽是 1Gbps 下载，30Mbps 上传，测速设备为 iPhone 11 Pro Max</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":1000,"height":730,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/IMG_1971.jpg" alt="" width="1000" height="730"/><figcaption>WiFiman 测速</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>接下来使用 WiFiman 在各个地点的测速，上传速度每个地方都能跑满外网，目前我只需要保证在右下角网速快就行，客厅之后打算换成 WIFI6 的AP (只要我抢到货，每次都是秒空)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":758,"height":483,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/2021-05-15-09.16.16.jpg" alt="" width="758" height="483"/><figcaption>网络信号热力图以及测速结果</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Cloud Key 是我很喜欢的一个硬件，好看又性能强大，可惜用了UDMP了之后就用不上了好可惜 (太喜欢这个小屏幕了)</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/single {"post_id":767} /-->

<!-- wp:pandastudio/title {"content":"\u003cstrong\u003eUnifi Protect\u003c/strong\u003e","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2><strong>Unifi Protect</strong></h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/title {"content":"软件 Protect 控制器","titleClass":"title_style_02","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h3>软件 Protect 控制器</h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>Protect 是我用过最好用的监控管理软件 (从 Unifi Video 过度过来的，简直是质的飞跃)，设置起来也从来没有这么简单过，POE设备只要插上网线即可，无线设备也只需要 APP 中点击连接就行</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>所有影像也都保存在本地硬盘，所以也不用太担心数据泄露的问题，而且最主要是免月费！还能无需端口映射的免费远程访问！</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":1000,"height":547,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/14/2021-05-14-23.40.34.png" alt="" width="1000" height="547"/><figcaption>Dashboard</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>是不是有种保安大爷即视感 (打个码别被认出来我住哪里了)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/14/2021-05-14-23.43.50.png" alt=""/><figcaption>直播页 (同时看六个摄像头)</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>使用 Homebridge 桥接 Protect 在 Homekit 中也能查看摄像头以及 Smart Detection</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":311,"height":434,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/IMG_1958.png" alt="" width="311" height="434"/><figcaption>HomeKit 弹窗</figcaption></figure>
<!-- /wp:image -->

<!-- wp:pandastudio/title {"content":"硬件","titleClass":"title_style_02","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h3>硬件</h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>Unifi Protect 的摄像头大部分都使用POE来供电(POE交换机口买少了 = = 后悔ing)，于是我就把我以前室内用的 G3 Flex 全给换成了 G3 instant 的 Wi-Fi 摄像头，这样在不同的地方就不用走线了毕竟有着强劲的 UAP 撑腰 （你说，我用三个 G3 Flex 和别人换了三个 G3 Instant 我亏了吗?）</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>G3 Instant - 小巧的 1080P WIFI 广角摄像头</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/gallery {"images":["https://image.krunk.cn/images/2021/05/15/IMG_1969.jpg","https://image.krunk.cn/images/2021/05/15/IMG_1975.jpg","https://image.krunk.cn/images/2021/05/15/IMG_1974.jpg","https://image.krunk.cn/images/2021/05/15/IMG_1981.jpg"]} /-->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:paragraph -->
<p>大门口安了 G4 Doorbell，G4系列的 Smart Detection 智能检测是真的好用，在有人按门铃之前就能通知我有人在门口了(再也不会错过要签名的快递了，而且也不会像其他品牌一样影子或小动物也会提醒)，还有个小夜灯，晚上回家也不会看不清地板了</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>G4 Doorbell - 带有智能检测的门铃摄像头</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/gallery {"images":["https://image.krunk.cn/images/2021/05/15/IMG_1966.jpg","https://image.krunk.cn/images/2021/05/15/IMG_1976.jpg"]} /-->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:paragraph -->
<p>后院安装了 G3 Flex 用来看小动物(经常有小浣熊在此出没)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>G3 Flex - 可以放室外的POE小摄像头</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":375,"height":500,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/IMG_1977.jpg" alt="" width="375" height="500"/></figure>
<!-- /wp:image -->

<!-- wp:image {"width":259,"height":185,"sizeSlug":"large","className":"wp-block-image-center wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/14/2021-05-14-23.57.58.png" alt="" width="259" height="185"/><figcaption>小浣熊出没</figcaption></figure>
<!-- /wp:image -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:paragraph -->
<p>改装的 Unifi Protect 桌面小屏幕 (放假了不上网课了，小屏幕这段时间也别浪费了)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":500,"height":375,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/IMG_1967.jpg" alt="" width="500" height="375"/><figcaption>Lenovo ThinkSmart Display</figcaption></figure>
<!-- /wp:image -->

<!-- wp:pandastudio/title {"content":"\u003cstrong\u003eUnifi VoIP\u003c/strong\u003e (家庭用户买不起 Unifi Talk 啊喂)","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2><strong>Unifi VoIP</strong> (家庭用户买不起 Unifi Talk 啊喂)</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>桌面电话控制器 (只管理一台电话...)</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"硬件","titleClass":"title_style_02","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h3>硬件</h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>平时放在桌上打电话还挺方便的，最主要是在家找不到手机的时候(你懂的)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":375,"height":500,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/IMG_1968.jpg" alt="" width="375" height="500"/><figcaption>Unifi VoIP</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Unifi VoIP 控制器通过指派 SIP 账户给电话连接 FreePBX，PBX与 Obihai (一个可以连接到 Google Voice 的小盒子) Trunk 在一起，就能做到免费打电话了(通过哥们的帮助！)</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"软件 VoIP 控制器","titleClass":"title_style_02","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h3>软件 VoIP 控制器</h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:image {"width":1000,"height":519,"sizeSlug":"large","className":"wp-block-image-center is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image size-large is-resized wp-block-image-center is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2021/05/15/IMG_1965.jpg" alt="" width="1000" height="519"/><figcaption>VoIP 控制器 (现在因为 SSL 问题访问不上了，能用就行= =)</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>这个界面还是我很久以前自己美化过的 因为当时 Unifi Network 的界面大改了</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/single {"post_id":766} /-->

<!-- wp:paragraph -->
<p>（希望 Ubiquiti 看到的话能出个便宜一点的 Unifi Talk 家用方案或者支持下 Trunk ...）</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"\u003cstrong\u003eUnifi APP\u003c/strong\u003e (移动端)","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h2><strong>Unifi APP</strong> (移动端)</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/title {"content":"Unifi Network \u0026amp; Unifi Portal","titleClass":"title_style_02","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h3>Unifi Network &amp; Unifi Portal</h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/gallery {"images":["https://image.krunk.cn/images/2021/05/15/IMG_1985.png","https://image.krunk.cn/images/2021/05/15/IMG_1986.png","https://image.krunk.cn/images/2021/05/15/IMG_1987.png","https://image.krunk.cn/images/2021/05/15/IMG_1988.png","https://image.krunk.cn/images/2021/05/15/IMG_1989.png","https://image.krunk.cn/images/2021/05/15/IMG_1990.png"]} /-->

<!-- wp:pandastudio/title {"content":"Unifi Protect","titleClass":"title_style_02","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h3>Unifi Protect</h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/gallery {"images":["https://image.krunk.cn/images/2021/05/15/IMG_1982.png","https://image.krunk.cn/images/2021/05/15/IMG_1983.png","https://image.krunk.cn/images/2021/05/15/IMG_1984.png"]} /-->

<!-- wp:pandastudio/title {"content":"Unifi iDentity (UID)","titleClass":"title_style_02","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h3>Unifi iDentity (UID)</h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/gallery {"images":["https://image.krunk.cn/images/2021/05/15/IMG_1991.png","https://image.krunk.cn/images/2021/05/15/IMG_1992.png"]} /-->

<!-- wp:pandastudio/title {"content":"最后来一句 Ubiquiti yyds!","titleClass":"title_style_02"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><p>最后来一句 Ubiquiti yyds!</p></div></div>
<!-- /wp:pandastudio/title -->]]></content:encoded><enclosure url="https://image.krunk.cn/images/2021/05/14/2021-05-14-22.38.23.png"/><media:content url="https://image.krunk.cn/images/2021/05/14/2021-05-14-22.38.23.png" height="150" width="150" type="image/jpeg"/>		
					</item>
					<item>
							<title><![CDATA[如何将你的WP评论推送至 QQ &#8211; Comment2QQ插件]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog1624.html]]></link>
							<pubDate>周日, 12 4月 2020 06:42:32 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>1624</dc:identifier>
							<dc:modified>2020-04-12 10:29:10</dc:modified>
							<dc:created unix="1586644952">2020-04-12 06:42:32</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog1624.html]]></guid><category>28</category><category>10</category><category>8</category><category>9</category>
							<description><![CDATA[WordPress 评论推送到 QQ 这个想法看上去比较新，网上没有搜到现成的插件可供使用，于是（没错又是于是]]></description><content:encoded><![CDATA[<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">WordPress 评论推送到 QQ 这个想法看上去比较新，网上没有搜到现成的插件可供使用，于是（没错又是于是）又自己写了个插件出来</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","width":450,"height":179,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter size-large is-resized"><img src="https://image.krunk.cn/images/2020/04/11/Screenshot_20200411-195306_QQ-min.jpg" alt="" width="450" height="179"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">Comment2QQ 插件能把WP上所有评论实时发送到QQ群</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"安装"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>安装</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left">1. 上传到插件目录下<br>2. 找一个 QQ 群，将官方Hook机器人QQ “ 2854196399 ” 拉入群中，点击机器人头像<br>3. 打开消息推送 然后点击推送消息<br>4. 点击生成，然后复制你的 WebHook 地址</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","width":180,"height":359,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter size-large is-resized"><img src="https://image.krunk.cn/images/2020/04/11/Screenshot_20200411-195457_QQ-min.jpg" alt="" width="180" height="359"/></figure></div>
<!-- /wp:image -->

<!-- wp:image {"align":"center","width":286,"height":286,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter size-large is-resized"><img src="https://image.krunk.cn/images/2020/04/11/Screenshot_20200411-195510_QQ-min.jpg" alt="" width="286" height="286"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">5. 输入 QQ群 官方 Webhook 链接到插件管理</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","width":436,"height":377,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter size-large is-resized"><img src="https://image.krunk.cn/images/2020/04/11/comment2qq.png" alt="" width="436" height="377"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">6. 尝试评论吧！评论内容会发送到链接指定QQ</p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:pandastudio/title {"content":"下载"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>下载</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/download {"href":"http://d.krunk.cn/Blog_Download/comment2qq.zip","need_reply":true} -->
<div class="wp-block-pandastudio-download">[reply2down]http://d.krunk.cn/Blog_Download/comment2qq.zip[/reply2down]</div>
<!-- /wp:pandastudio/download -->

<!-- wp:pandastudio/title {"content":"开源"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>开源</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:pandastudio/download {"href":"https://github.com/KrunkZhou/Comment2QQ","need_reply":true} -->
<div class="wp-block-pandastudio-download">[reply2down]https://github.com/KrunkZhou/Comment2QQ[/reply2down]</div>
<!-- /wp:pandastudio/download -->

<!-- wp:paragraph -->
<p>开源协议 <a href="https://github.com/KrunkZhou/Comment2QQ/blob/master/LICENSE" class="aioseop-link">GNU General Public License v3.0</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>想法来自 <a href="https://2890.ltd/blog/how-to-push-your-comments-and-articles-to-qq-1.html" class="aioseop-link">OkYes!博客</a><br>插件测试 <a href="https://www.whrblog.online/" class="aioseop-link">Whr</a></p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:paragraph -->
<p>KRUNK.CN 博客评论推送群：<a href="http://shang.qq.com/wpa/qunwpa?idkey=8a63779d99dc04e8d9abca56f3b4c4d513a0ad54e277145a7d583de965dd96a9" class="aioseop-link">820993106</a></p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=8a63779d99dc04e8d9abca56f3b4c4d513a0ad54e277145a7d583de965dd96a9" rel="noopener noreferrer"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="从来不旷课的旷课" title="从来不旷课的旷课"></a>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->]]></content:encoded><enclosure url="https://image.krunk.cn/images/2020/04/11/Screenshot_20200411-195306_QQ-min.jpg"/><media:content url="https://image.krunk.cn/images/2020/04/11/Screenshot_20200411-195306_QQ-min.jpg" height="150" width="150" type="image/jpeg"/>		
					</item>
					<item>
							<title><![CDATA[自制Niagara Region地区疫情实时监控面板]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog1558.html]]></link>
							<pubDate>周四, 09 4月 2020 13:17:31 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>1558</dc:identifier>
							<dc:modified>2020-04-12 06:14:03</dc:modified>
							<dc:created unix="1586409451">2020-04-09 13:17:31</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog1558.html]]></guid><category>10</category><category>8</category><category>45</category>
							<description><![CDATA[前段时间 Niagara Region 的数据几乎不公开，只有个数字，于是就萌生了自己记录自己做出图表的想法，]]></description><content:encoded><![CDATA[<!-- wp:paragraph -->
<p>前段时间 Niagara Region 的数据几乎不公开，只有个数字，于是就萌生了自己记录自己做出图表的想法，上线当天晚上访问量破千，加油数也不少，就是这数据看着有点扎心...</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","width":931,"height":626,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter size-large is-resized"><img src="https://image.krunk.cn/images/2020/04/09/c1-min.png" alt="" width="931" height="626"/></figure></div>
<!-- /wp:image -->

<!-- wp:pandastudio/title {"content":"我的想法","titleClass":"title_style_01"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>我的想法</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>因为每天的确诊数会公布，于是就能通过这两个网址每天爬取数据</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>$html=@file_get_contents("https://niagararegion.ca/health/covid-19/default.aspx");
$html2=@file_get_contents("https://www.niagarahealth.on.ca/site/covid19casereporting");</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>用 DOMDocument 轻松获取三个数字</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>// Confirmed Cases in Niagara
$strCaseNumbers = $xpath->query('//strong&#91;@id="strCaseNumbers"]')->item(0)->nodeValue;
// resolved (have recovered)
$spnResolvedCases = $xpath->query('//strong&#91;@id="spnResolvedCases"]')->item(0)->nodeValue;
// Death
$dNum=trim($xpath2->query('//table/tbody/tr&#91;6]/td&#91;2]')->item(0)->nodeValue);</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>使用我自己的KDB存入数据库</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>$data = array(
	'date' => date("Y/m/d"),
	'strCaseNumbers' => $strCaseNumbers,
	'spnResolvedCases' => $spnResolvedCases,
	'update_time' => $spnUpdateTime,
	'death' => $dNum
);
$db->insert('covid-19-niagara',$data);</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>数据的抓取就是这么简单</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>前端使用了 Chartjs 来绘制折线图，看到许多网址做了加油的按钮，于是也想做一个，每点击一次数字就会加 1</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>&lt;button class="mdc-fab like" id="like" onclick="like();">加油 +1&lt;/button>
&lt;script>
function like(){
	req=new XMLHttpRequest();
	req.onreadystatechange=function(){
		if (this.readyState==4 &amp; this.status==200) {
			$data=this.response.split("\n");
			console.log("Like: "+$data&#91;1]);
			document.getElementById("like").innerHTML = "感谢您的加油 | "+$data&#91;1]+"次";
		}
	};
	req.open("GET","like.php?add=1");
	req.send();
}
&lt;/script></code></pre>
<!-- /wp:code -->

<!-- wp:pandastudio/title {"content":"开源以及API调用","titleClass":"title_style_01"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><p>开源以及API调用</p></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>项目会开源，也将免费提供数据 API 可供调用<br>API 地址：<a href="https://niagara.krunk.cn/api.php" class="aioseop-link">https://niagara.krunk.cn/api.php</a><br>返回完整 json 数据，可直接使用或通过KDB调用 (使用请标注来源)</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">访问实时数据面板：<a href="https://niagara.krunk.cn/" class="aioseop-link">https://niagara.krunk.cn/</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">开源地址</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/download {"href":"https://github.com/KrunkZhou/COVID19-NiagaraRegion-Dashboard","need_reply":true} -->
<div class="wp-block-pandastudio-download">[reply2down]https://github.com/KrunkZhou/COVID19-NiagaraRegion-Dashboard[/reply2down]</div>
<!-- /wp:pandastudio/download -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">（开源代码收集数据不易，给个评论呗）</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>数据来源：Niagara Region, Niagara Health<br>感谢 Insiderdavidlai 帮助完善数据以及学生会的大力宣传</p>
<!-- /wp:paragraph -->]]></content:encoded><enclosure url="https://image.krunk.cn/images/2020/04/09/c1-min.md.png"/><media:content url="https://image.krunk.cn/images/2020/04/09/c1-min.md.png" height="150" width="150" type="image/jpeg"/>		
					</item>
					<item>
							<title><![CDATA[大学课程表自动导入 &#8211; 微信小程序]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog1136.html]]></link>
							<pubDate>周二, 18 2月 2020 03:39:20 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>1136</dc:identifier>
							<dc:modified>2020-04-04 15:43:16</dc:modified>
							<dc:created unix="1581968360">2020-02-18 03:39:20</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog1136.html]]></guid><category>10</category><category>7</category><category>8</category><category>45</category>
							<description><![CDATA[在大学上学每天看的最多的一定是课程表，可是学校的课程表每次查看起来都太繁琐了，存相册里也容易沉底，设成壁纸也不]]></description><content:encoded><![CDATA[<!-- wp:paragraph -->
<p>在大学上学每天看的最多的一定是课程表，可是学校的课程表每次查看起来都太繁琐了，存相册里也容易沉底，设成壁纸也不好看。</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","width":288,"height":338,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter size-large is-resized"><img src="https://image.krunk.cn/images/2020/02/17/2020-02-17-14.24.09.png" alt="" width="288" height="338"/><figcaption>学校网页的课程表</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>于是就想着制作一个微信小程序来实现自动抓取数据然后导入到程序中，于是就有了BU课程表小程序，这也是我第一次尝试微信小程序的独立开发。</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","width":180,"height":361,"sizeSlug":"large","className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter size-large is-resized"><img src="https://image.krunk.cn/images/2020/02/17/WechatIMG35.png" alt="" width="180" height="361"/><figcaption>BU课程表 界面</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:image {"align":"center","width":500,"height":327,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img src="https://image.krunk.cn/images/2020/02/17/2020-02-17-14.26.56.png" alt="" width="500" height="327"/><figcaption>小程序前端开发</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:image {"align":"center","width":500,"height":370,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img src="https://image.krunk.cn/images/2020/02/17/2020-02-17-14.29.40.png" alt="" width="500" height="370"/><figcaption>小程序后端开发</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading {"level":4} -->
<h4>BU课程表 - 基于微信小程序写的布鲁克大学课表小程序</h4>
<!-- /wp:heading -->

<!-- wp:list -->
<ul><li>一键自动导入课表</li><li>添加到桌面方便查看</li><li>分享自己的课表给同学</li></ul>
<!-- /wp:list -->

<!-- wp:image {"align":"center","width":428,"height":156,"sizeSlug":"large"} -->
<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img src="https://github.com/KrunkZhou/BUSCS-WeChat-MiniProgram/raw/master/image/qr-code.png" alt="" width="428" height="156"/><figcaption>微信小程序</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2>开源协议</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>此项目代码采用&nbsp;<a href="https://github.com/KrunkZhou/BUSCS-WeChat-MiniProgram/blob/master/LICENSE">GNU Affero General Public License v3.0</a></p>
<!-- /wp:paragraph -->

<!-- wp:separator -->
<hr class="wp-block-separator"/>
<!-- /wp:separator -->

<!-- wp:heading -->
<h2>获取代码</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>代码的使用请遵循开源协议</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/download {"href":"https://github.com/KrunkZhou/BUSCS-WeChat-MiniProgram","need_reply":true} -->
<div class="wp-block-pandastudio-download">[reply2down]https://github.com/KrunkZhou/BUSCS-WeChat-MiniProgram[/reply2down]</div>
<!-- /wp:pandastudio/download -->]]></content:encoded><enclosure url="https://image.krunk.cn/images/2020/02/17/2020-02-17-14.26.56.png"/><media:content url="https://image.krunk.cn/images/2020/02/17/2020-02-17-14.26.56.png" height="150" width="150" type="image/jpeg"/>		
					</item>
					<item>
							<title><![CDATA[使用sshfs把学校Linux磁盘映射到自己Windows电脑网络磁盘]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog1104.html]]></link>
							<pubDate>周二, 26 11月 2019 18:02:27 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>1104</dc:identifier>
							<dc:modified>2020-04-04 15:48:48</dc:modified>
							<dc:created unix="1574762547">2019-11-26 18:02:27</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog1104.html]]></guid><category>8</category><category>45</category>
							<description><![CDATA[下载 WinFsp下载 SSHFS-Win 安装后通过这个链接使用映射网络驱动器来挂载： WinFsp 下载 ]]></description><content:encoded><![CDATA[<!-- wp:paragraph -->
<p>下载 <a href="https://github.com/billziss-gh/winfsp/releases/latest">WinFsp</a><br>下载 <a href="https://github.com/billziss-gh/sshfs-win/releases">SSHFS-Win</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>安装后通过这个链接使用映射网络驱动器来挂载：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>\\sshfs\REMUSER@HOST&#91;\PATH]</code></pre>
<!-- /wp:code -->

<!-- wp:image {"width":600,"height":450,"className":"is-style-border-round-and-with-shadow"} -->
<figure class="wp-block-image is-resized is-style-border-round-and-with-shadow"><img src="https://image.krunk.cn/images/2019/11/26/687474703a2f2f7777772e73656366732e6e65742f77696e6673702f66696c65732f6361702e676966.gif" alt="" width="600" height="450"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">WinFsp 下载</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/download {"href":"https://github.com/billziss-gh/winfsp/releases/latest","need_reply":true} -->
<div class="wp-block-pandastudio-download">[reply2down]https://github.com/billziss-gh/winfsp/releases/latest[/reply2down]</div>
<!-- /wp:pandastudio/download -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">SSHFS 下载</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/download {"href":"https://github.com/billziss-gh/sshfs-win/releases ","need_reply":true} -->
<div class="wp-block-pandastudio-download">[reply2down]https://github.com/billziss-gh/sshfs-win/releases [/reply2down]</div>
<!-- /wp:pandastudio/download -->

<!-- wp:paragraph {"textColor":"cyan-bluish-gray","fontSize":"small"} -->
<p class="has-text-color has-small-font-size has-cyan-bluish-gray-color">来自： <a href="https://github.com/billziss-gh/sshfs-win">https://github.com/billziss-gh/sshfs-win</a> </p>
<!-- /wp:paragraph -->]]></content:encoded><enclosure url="https://image.krunk.cn/images/2019/11/26/687474703a2f2f7777772e73656366732e6e65742f77696e6673702f66696c65732f6361702e676966.gif"/><media:content url="https://image.krunk.cn/images/2019/11/26/687474703a2f2f7777772e73656366732e6e65742f77696e6673702f66696c65732f6361702e676966.gif" height="150" width="150" type="image/jpeg"/>		
					</item>
					<item>
							<title><![CDATA[WP 评论时卡住解决方法]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog1075.html]]></link>
							<pubDate>周一, 28 10月 2019 08:34:22 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>1075</dc:identifier>
							<dc:modified>2020-04-04 15:58:37</dc:modified>
							<dc:created unix="1572222862">2019-10-28 08:34:22</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog1075.html]]></guid><category>28</category>
							<description><![CDATA[打开站点目录 comment.php： 搜索这个function之后的一句话： 去除或注释这个的运行后就能正常]]></description><content:encoded><![CDATA[<!-- wp:paragraph -->
<p>打开站点目录  comment.php：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>site_directory/wp-includes/comment.php</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>搜索这个function之后的一句话：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>wp_new_comment( $commentdata, $avoid_die = false )</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>去除或注释这个的运行后就能正常评论了，可能是因为插件或其他程序的修改导致评论验证的错误</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>//do_action( ‘comment_post’, $comment_ID, $commentdata&#91;‘comment_approved’], $commentdata );</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>这只是临时的解决方案，建议重新安装WP来解决这个问题</p>
<!-- /wp:paragraph -->]]></content:encoded><enclosure url="https://images.unsplash.com/photo-1583366941557-7852a325f1f3?ixlib=rb-1.2.1&#038;q=80&#038;fm=jpg&#038;crop=entropy&#038;cs=tinysrgb&#038;w=1080&#038;fit=max&#038;ixid=eyJhcHBfaWQiOjF9"/><media:content url="https://images.unsplash.com/photo-1583366941557-7852a325f1f3?ixlib=rb-1.2.1&#038;q=80&#038;fm=jpg&#038;crop=entropy&#038;cs=tinysrgb&#038;w=1080&#038;fit=max&#038;ixid=eyJhcHBfaWQiOjF9" height="150" width="150" type="image/jpeg"/>		
					</item>
					<item>
							<title><![CDATA[深入了解我的智能家庭 (HomeAssistant篇-附配置)]]></title>
							<link><![CDATA[https://revival.krunk.cn/kblog1038.html]]></link>
							<pubDate>周四, 17 10月 2019 07:42:16 +0800</pubDate>
							<dc:creator>Krunk Zhou</dc:creator>
							<dc:identifier>1038</dc:identifier>
							<dc:modified>2020-04-04 15:48:52</dc:modified>
							<dc:created unix="1571269336">2019-10-17 07:42:16</dc:created>
							<guid isPermaLink="true"><![CDATA[https://revival.krunk.cn/kblog1038.html]]></guid><category>10</category><category>5</category><category>7</category><category>8</category><category>45</category>
							<description><![CDATA[Home Assistant 是一款基于 Python 的智能家居开源系统，支持众多品牌的智能家居设备，可以轻]]></description><content:encoded><![CDATA[<!-- wp:pandastudio/title {"content":" 简介： ","titleClass":"title_style_02","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h2> 简介： </h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>Home Assistant 是一款基于 Python 的智能家居开源系统，支持众多品牌的智能家居设备，可以轻松实现设备的语音控制、自动化等。</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>我的智能家庭包含了众多牌子的智能产品 ，为了将所有的产品进行整合，我选择了HomeAssistant来控制所有家电。<br>此项目于17年末开始，18年初完成 (宿舍只有少量智能设备) ，19年完善(搬近学校旁的house后完整建设)</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/tips {"content":"\u003cp\u003e 作为一个现代化懒人，能张嘴控制绝不动手，什么开关灯，设定空调之类，的喊一声多好。\u003cbr\u003e大冬天的，谁愿意从温暖的被窝里面出来关灯，谁愿意从黑漆漆的地方摸进去开灯。 \u003c/p\u003e"} -->
<div class="wp-block-pandastudio-tips">[tip type="info" ]<p> 作为一个现代化懒人，能张嘴控制绝不动手，什么开关灯，设定空调之类，的喊一声多好。<br>大冬天的，谁愿意从温暖的被窝里面出来关灯，谁愿意从黑漆漆的地方摸进去开灯。 </p>[/tip]</div>
<!-- /wp:pandastudio/tips -->

<!-- wp:paragraph -->
<p>此篇文章代码较多，欢迎使用右侧导航前往需要查看的部分<br><br></p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":" 设计： ","titleClass":"title_style_02","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h2> 设计： </h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>我的智能家庭设计目标是：<br>- 桌上，门口，床头各一个开关来控制所以灯具以及安防的开关<br>- 在我离开家之后自动关闭所有灯具，回到家后自动开启灯光(仅限日落后到12:00睡觉前)<br>- 在我不在家的时候开启安防并通知手机当有人进入我的房间时<br>- 监控我的房间并记录所有时间戳并生成随时可查看的报告页面<br>- 可远程访问控制与查看房间状态<br>- 房间外借时可方便共享权限<br>- 拥有开放 API 来完成其他有意思的项目<br>- 接入 Homekit 来使用 IOS 的家庭应用控制<br>- 启用 GoogleAssistant, Siri, Alexa 来实现语言控制</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>我的智能家庭所使用的产品：<br>- TP-Link<br>- Yeelight<br>- Google Home (Hub*1, home*1, mini*3)<br>- Philips Hue (Bulb*3, Go*1, Switch*1)<br>- Nest (谷歌已经取消了Nest Api所以现在无法使用了)<br>- Augest Lock<br>- Unifi Network, Netgear Router, Asus Router<br>- Unifi 全套<br>- 小米网关以及门窗传感器，人体传感器，烟雾报警器，来电传感器 <br><br></p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":" 效果： ","titleClass":"title_style_02","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h2> 效果： </h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>控制界面（PS: 之前写过超好看的lovelace UI，可是一次更新后就消失了，到现在我还没开始重写，因为太累了）</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","width":1000,"height":495,"className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter is-resized"><img src="https://image.krunk.cn/images/2019/10/16/ha1.png" alt="" width="1000" height="495"/><figcaption>主界面</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:image {"align":"center","width":266,"height":337,"className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter is-resized"><img src="https://image.krunk.cn/images/2019/10/16/ha2.png" alt="" width="266" height="337"/><figcaption>登录界面(支持信任网段方便共享)</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:image {"align":"center","width":240,"height":240,"className":"is-style-border-round-and-with-shadow"} -->
<div class="wp-block-image is-style-border-round-and-with-shadow"><figure class="aligncenter is-resized"><img src="https://image.krunk.cn/images/2019/10/16/ha3.th.png" alt="" width="240" height="240"/><figcaption>日记</figcaption></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>灯具与开关（全都能通过网页，语音，手机互动并控制）</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/gallery {"images":["https://image.krunk.cn/images/2019/10/16/20191016_183944.jpg","https://image.krunk.cn/images/2019/10/16/20191016_184010.jpg","https://image.krunk.cn/images/2019/10/16/20191016_184034.jpg","https://image.krunk.cn/images/2019/10/16/20191016_184056.jpg","https://image.krunk.cn/images/2019/10/16/20191016_184141.jpg","https://image.krunk.cn/images/2019/10/16/20191016_184210.jpg"," https://image.krunk.cn/images/2019/10/16/20191016_183748.jpg"," https://image.krunk.cn/images/2019/10/16/20191016_183757.jpg"," https://image.krunk.cn/images/2019/10/16/20191016_183827.jpg"," https://image.krunk.cn/images/2019/10/16/20191016_183928.jpg"]} /-->

<!-- wp:paragraph -->
<p><br><br></p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":" 实现： ","titleClass":"title_style_02","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h2> 实现： </h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>HomeAssistant的安装这里就不多赘述了，留下的几个链接都写得非常详细易懂，我的环境也十分简单，基于群晖的docker来实现的，所有配置文件都会在 //群晖/docker/config 下。</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p> [need_reply] <a rel="noreferrer noopener" aria-label="（在新窗口打开）" href="https://home-assistant.cc/installation/general/" target="_blank">https://home-assistant.cc/installation/general/</a><br><a rel="noreferrer noopener" aria-label="（在新窗口打开）" href="https://post.smzdm.com/p/761117/" target="_blank">https://post.smzdm.com/p/761117/</a>  [/need_reply] <br><br></p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":" 连接设备 ","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h3> 连接设备 </h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>下面是我的 configuration.yaml 配置详情 （这是我的配置不可照搬，但可以作为你配置的模板）</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>HA的基本配置：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>homeassistant:
  # 站点名称
  name: KRUNK.CN SMARTHOME
  # 你的位置坐标
  latitude: !secret locationa
  longitude: !secret locationb
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Toronto
  # Customization file
  customize: !include customize.yaml
  #信任的网段以及api密码 - 如不使用API不建议开启api密码
  auth_providers:
   - type: legacy_api_password
     api_password: !secret http_password
   - type: trusted_networks
     trusted_networks:
        - 10.0.0.0/24
     allow_bypass_login: true
   - type: homeassistant</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>一些需要使用的内置服务：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code># Enables configuration UI
config:
system_health:
auth:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
    base_url: krunk.cn #如需外网访问需要设定这个地址
    #api_password: !secret http_password
    ssl_certificate: /config/smarthome.krunk.cn.crt #外网需要ssl证书
    ssl_key: /config/smarthome.krunk.cn.key #证书密钥
    cors_allowed_origins:
    - https://ca.krunk.cn
    - https://ws.krunk.cn

api:

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
#开启自动搜索新智能设备 我禁用是因为我想纯手工配置
#discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
#conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>天气服务：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>weather:
  - platform: darksky
    api_key: cac4a0dc10fe69a15a3d6367e51e342c</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>检测我的手机还需付款多少钱：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code># Sensors
sensor:
    #Fido
  - platform: fido
    name: Fido Balance
    username: !secret fidoaccount
    password: !secret fidopw
    monitored_variables:
     - balance</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>检测服务器Uptime:</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>binary_sensor:
  - platform: uptimerobot
    api_key: !secret bloguptimerobot #Blog
  #- platform: uptimerobot
  #  api_key: !secret wsuptimerobot #WS</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>文字转语言服务（曾经想用来实现“欢迎到家”）：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code># Text to speech
tts:
  - platform: google_translate
    service_name: google_say</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>TP-Link 墙上开关：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>tplink:
  discovery: false
  switch:
    - host: !secret IP</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>HomeKit配置：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>homekit:
  auto_start: true  
  port: 51827  
  filter:  
    include_domains:  
      - switch
      - media_player
    include_entities:
      - light.yeelight_strip_34ce008b1407
      - light.gateway_light_7811dcfd6574
      - light.yeelight_strip
      - sensor.illumination_7811dcfd6574
      - binary_sensor.motion_sensor_158d00024818ad
      - binary_sensor.smoke_sensor_158d0001e6426c
      - binary_sensor.door_window_sensor_158d000237cf91
  entity_config:
    media_player.krunk_bedroom_home:
      feature_list:
        - feature: play_pause</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>连接我的路由器实现追踪手机是否在家：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>asuswrt:
  host: !secret IP
  username: !secret asusun
  password: !secret asuspw

device_tracker:
  - platform: asuswrt
    interval_seconds: 12
    consider_home: 60
    new_device_defaults:
      track_new_devices: false
      hide_if_away: False
  - platform: unifi
    host: !secret IP
    username: krunk
    password: !secret unifipassword
    verify_ssl: false
    interval_seconds: 12
    consider_home: 60
    new_device_defaults:
      track_new_devices: false
      hide_if_away: False
  - platform: netgear
    host: !secret IP
    password: !secret netgearpassword
    port: 80
    interval_seconds: 12
    consider_home: 60
    new_device_defaults:
      track_new_devices: false
      hide_if_away: False</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>Plex媒体控制：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>media_player:
  - platform: plex
    entity_namespace: 'plex'
    include_non_clients: true
    scan_interval: 60
    show_all_controls: false
    use_custom_entity_ids: true
    use_episode_art: true
    remove_unavailable_clients: true
    client_remove_interval: 120</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>小米网关：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>xiaomi_aqara:
  discovery_retry: 5
  gateways:
    - key: !secret xiaomigatewayapi
      host: !secret IP</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>飞利浦Hue:</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>hue:
  bridges:
    - host: !secret IP
      allow_unreachable: true</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>Yeelight 灯带：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>yeelight:
  devices:
    !secret IP:
      name: Yeelight Strip</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>IFTTT Webhook：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>ifttt:
  key: !secret iftttkey</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>Google Home：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>cast:
  media_player:
  - host: !secret IP
  - host: !secret IP
  - host: !secret IP
  - host: !secret IP
  - host: !secret IP</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>监控：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>camera:
  - platform: ffmpeg
    name: Bedroom Camera
    input: !secret RTSP
  - platform: uvc
    nvr: !secret IP
    port: 7443
    key: !secret rtspkey
    password: !secret rtsppw
    ssl: true</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p><br></p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":" 主题配置 ","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h3> 主题配置 </h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>套用好看的主题：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code># Enables the frontend
frontend: 
  themes: !include theme.yaml
  extra_html_url:
    - /local/icons/icons.html</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>新建一个文件 theme.yaml ：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>darkred:
    # Main colors that can be changed
  dark-primary-color: "#c66900"
  disabled-text-color: "#545454"
  divider-color: "rgba(255, 255, 255, 0.12)"
  light-primary-color: "#e06c6c"
  paper-card-background-color: "#1d1d1d"
  paper-grey-200: "#191919"
  paper-item-icon-color: "#d3d3d3"
  paper-listbox-background-color: "#202020"
  primary-background-color: "#303030"
  primary-color: "#d32f2f"
  primary-text-color: "#cfcfcf"
  secondary-background-color: "#131313"
  sidebar-text_-_background: "#62717b"
    # Colors based on variables, see above
  paper-card-header-color: "var(--paper-item-icon-color)"
  paper-item-icon-active-color: "var(--primary-color)"
  paper-item-icon_-_color: "var(--primary-text-color)"
  paper-listbox-color: "var(--primary-text-color)"
  paper-grey-50: "var(--primary-text-color)"
  paper-slider-active-color: "var(--primary-color)"
  paper-slider-knob-color: "var(--primary-color)"
  paper-slider-knob-start-color: "var(--primary-color)"
  paper-slider-pin-color: "var(--primary-color)"
  paper-slider-secondary-color: "var(--light-primary-color)"
  paper-toggle-button-checked-ink-color: "var(--dark-primary-color)"
  paper-toggle-button-checked-button-color: "var(--primary-color)"
  paper-toggle-button-checked-bar-color: "var(--light-primary-color)"
  paper-toggle-button-unchecked-bar-color: "var(--primary-text-color)"
  secondary-text-color: "var(--primary-color)"
  table-row-background-color: "var(--paper-card-background-color)"
  table-row-alternative-background-color: "var(--sidebar-text_-_background)"
darkcyan:
    # Main colors that can be changed
  primary-color: "#00bcd4"
  disabled-text-color: "#545454"
  divider-color: "rgba(255, 255, 255, 0.12)"
  paper-card-background-color: "#4e4e4e"
  paper-grey-200: "#191919"
  paper-item-icon-color: "#d3d3d3"
  paper-listbox-background-color: "#202020"
  paper-listbox-color: "#FFFFFF"
  primary-background-color: "#303030"
  primary-text-color: "#cfcfcf"
  secondary-background-color: "#2b2b2b"
  secondary-text-color: "#04a7bc"
    # Colors based on variables, see above
  label-badge-background-color: "var(--secondary-background-color)"
  label-badge-text-color: "var(--text-primary-color)"
  paper-card-header-color: "#var(--paper-item-icon-color)"
  paper-grey-50: "var(--primary-text-color)"
  paper-item-icon-active-color: "var(--primary-color)"
  paper-item-icon_-_color: "var(--primary-text-color)"
  paper-slider-active-color: "var(--primary-color)"
  paper-slider-knob-color: "var(--primary-color)"
  paper-slider-knob-start-color: "var(--primary-color)"
  paper-slider-pin-color: "var(--primary-color)"
  paper-slider-secondary-color: "var(--light-primary-color)"
  paper-toggle-button-checked-ink-color: "var(--dark-primary-color)"
  paper-toggle-button-checked-button-color: "var(--primary-color)"
  paper-toggle-button-checked-bar-color: "var(--light-primary-color)"
  paper-toggle-button-unchecked-bar-color: "var(--primary-text-color)"</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>到此为止就完成了所有设备的连接以及界面也应该全部展现<br><br></p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":" 自动化配置 ","titleInnerTag":"h3"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_01"><h3> 自动化配置 </h3></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>开机设置主题：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>- alias: 'Set theme at startup'
  initial_state: 'on'
  trigger: 
  - platform: homeassistant
    event: start
  action:
    service: frontend.set_theme
    data:
      name: darkred</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>开机通知：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>- alias: 'Notified Krunk at startup'
  initial_state: 'on'
  trigger: 
  - platform: homeassistant
    event: start
  action:
    service: ifttt.trigger
    data: {"event":"start_up"}</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>不在家时的安全警报：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>- alias: 'Security System start when Krunk leaves home'
  initial_state: 'on'
  trigger: 
    platform: state
    entity_id: binary_sensor.motion_sensor_158d00024818ad
    to: 'on'
  condition:
  - condition: state
    entity_id: device_tracker.krunkgalaxys9
    state: 'not_home'
  action:
    service: ifttt.trigger
    data: {"event":"Alarm_HA"}</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>离家关灯，到家开灯：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>- alias: Turn on the lights when Krunk gets home
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: device_tracker.krunkgalaxys9
    from: 'not_home'
    to: 'home'
  condition:
  - after: sunset
    condition: sun
  action:
    - service: light.turn_on
      entity_id: group.all_lights
    - service: switch.turn_on
      entity_id: switch.main_light
      
- alias: Turn off the lights when Krunk leaves home
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: device_tracker.krunkgalaxys9
    from: 'home'
    to: 'not_home'
  action:
    - service: light.turn_off
      entity_id: group.all_lights
    - service: switch.turn_off
      entity_id: switch.main_light</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>通过小米按钮控制开关灯</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>- alias: Turn on all the lights by Mi button
  initial_state: 'on'
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.switch_158d0002412a5d
      click_type: single
  condition:
    - condition: state
      entity_id: switch.main_light
      state: 'off'
  action:
    - service: light.turn_on
      entity_id: group.all_lights
    - service: switch.turn_on
      entity_id: switch.main_light

- alias: Turn off all the lights by Mi button
  initial_state: 'on'
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.switch_158d0002412a5d
      click_type: single
  condition:
    - condition: state
      entity_id: switch.main_light
      state: 'on'
  action:
    - service: light.turn_off
      entity_id: group.all_lights
    - service: switch.turn_off
      entity_id: switch.main_light</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>自动关闭小米网关灯（这样就不用一个个排除关闭这个灯光了）：</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>- alias: Turn off the useless light
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: light.gateway_light_7811dcfd6574
    to: 'on'
  action:
    - service: light.turn_off
      entity_id: light.gateway_light_7811dcfd6574</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p><br></p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"API的使用","titleClass":"title_style_02","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h2>API的使用</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>很久以前就使用Python控制灯光玩过，并写了一个拍手开关灯的项目，还有更多的项目等待你的挖掘</p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/single {"post_id":150} /-->

<!-- wp:paragraph -->
<p>详情可以看我的github项目：<br>[need_reply] <a rel="noreferrer noopener" aria-label="（在新窗口打开）" href="https://github.com/KrunkZhou/PI-Clap" target="_blank">https://github.com/KrunkZhou/PI-Clap</a>  [/need_reply] <br>视频演示：<br> <a rel="noreferrer noopener" aria-label="（在新窗口打开）" href="https://www.instagram.com/p/Bfd9XiGl3wQ/" target="_blank">https://www.instagram.com/p/Bfd9XiGl3wQ/</a> <br><br><br><br><br></p>
<!-- /wp:paragraph -->

<!-- wp:pandastudio/title {"content":"桌面触控控制面板的制作","titleClass":"title_style_02","titleInnerTag":"h2"} -->
<div class="wp-block-pandastudio-title"><div class="title_style_02"><h2>桌面触控控制面板的制作</h2></div></div>
<!-- /wp:pandastudio/title -->

<!-- wp:paragraph -->
<p>还在制作中...</p>
<!-- /wp:paragraph -->]]></content:encoded><enclosure url="https://image.krunk.cn/images/2019/10/16/ha1.png"/><media:content url="https://image.krunk.cn/images/2019/10/16/ha1.png" height="150" width="150" type="image/jpeg"/>		
					</item></channel></rss><!-- end of xml string -->