小米温湿度计2+蓝牙网关
作者:营在北京
在之前的玩客云安装homeassistant做超级中枢网关的文章中,有几个被网友质疑的地方,其中之一就是玩客云没有蓝牙不借助其他米家蓝牙网关怎么连接蓝牙设备。我想说这真的太简单了,没有蓝牙咱可以插上USB蓝牙,没有zigbee咱插上usb dongle zigbee 不就可以了吗?40元的玩客云加上这些配件也就一百多点,就可以打造成集蓝牙、zigbee于一体的超级中枢网关,小米349元的蓝牙中枢网关就没有性价比可言了。
玩客云借助USB蓝牙和passive BLE monitor插件,可以把米家及米家系的青萍、绿米、yeelight的常见的蓝牙温湿度计、人体传感器、按键开关、智能门锁等众多蓝牙设备本地化接入homeassistant,并且不影响原来米家APP的连接。
这是小米米家APP中记录的青萍人体传感器记录
这是我通过USB蓝牙接入玩客云homeassistant中的记录,大家可以发现和米家记录的数据分秒不差。
这就证明米家和homeassistant是并行运行,两者互不影响。即使米家服务器宕机了,homeassistant里的这些传感器还是可以正常工作,homeassistant里基于这些传感器的自动化仍然会正常运行的。这才是彻底的本地化运行,这样才稳定可靠、响应速度快。
下面我们通过简单几步打造一个属于我们自己完全本地化的超级中枢蓝牙网关。
一、购买及插入USB蓝牙适配器
1、我是好多年前在京东买的奥睿科的蓝牙4.0适配器,当时售价十多块钱,其他只要版本高于蓝牙4.0的应该都可以。
2、把USB蓝牙插到玩客云USB中
二、安装蓝牙相关软件
通过armbian-config安装蓝牙相关程序
①putty登录玩客云,在命令行中输入armbian-config回车,打开armbian-config
②通过键盘方向键移动光标到"Network”,然后移到“OK”回车
③同样移动光标到“BT install”,然后移动到'OK"回车,进行蓝牙相关软件的安装
④安装完成后,移动到“back”回车返回,然后移动到“Exit”回车退出armbian-config
三、给非root账号python程序操作蓝牙硬件权限
①输入下面命令进行授权
setcap 'cap_net_raw,cap_net_admin+eip' `readlink -f `which python3``
②输入下面命令确认是否授权成功,正常如下图所示
getcap `readlink -f `which python3``
四、HACS安装插件
①打开HACS中的“集成”页面
②点击右下角的“浏览并下载存储库”
③在搜索框内输入“BLE”进行搜索,并点击“passive BLE monitor”进入该插件页
④、点击右下角的“通过HACS下载此存储库”
⑤在弹出页面中点击右下角的“下载”进行下载
下载完成后如下图所示
下载完成后按下图重启HA,让插件生效
五、获取米家蓝牙设备密钥key
现在绝大部分的米家蓝牙传感器都是加密的,所以我们首先就要获取蓝牙设备的密钥key,现在获取米家蓝牙密钥其实十分简单了。
①、下载小米云端token获取软件,打开下图网址,window操作系统点击图中下载链接即可下载该软件
②、获取米家蓝牙设备key
双击打开刚才下载的软件,按软件提示输入你的小米账号ID和密码即可
我们就可以看到我们的蓝牙密钥了,如下图所示,然后我们复制粘贴到记事本待用。
六、集成配置passive BLE插件
①、按下图打开HA的集成
②在集成搜索框中输入“BLE”进行搜索,然后点击“Passive ble monitor”进行插件配置
③保持默认,点击提交即可
④稍等片刻插件会自动发现蓝牙设备
⑤点选项进行设备添加
选择要添加的设备(此处我以青萍人体与环境光传感器为例)然后点“提交”
输入蓝牙密钥后提交即完成设备的添加
自动添加设备后前端界面显示如下
我们可以汉化一下传感器名字
七、结论
40多元的玩客云刷机安装homeassistant之后(具体玩客云安装homeassistant的教程看我前面的文章),插上十几元的USB蓝牙适配器,通过passive BLE monitor插件,就变身为融米家蓝牙中枢网关与本地米家服务器于一体的超级中枢,这样即使米家服务器宕机或你家宽带故障无外网,也不会影响您基于这些传感器的homeassistant内的自动化控制了。而玩客云强大的跨品牌接入及自动化联动等是米家中枢网关乃至米家服务器无法比拟的,多一种选择,多一份安全可靠。欢迎关注评论、转发,让我们一起玩转智能家居。
本文来自我家超智能智能家居小组(米家,HA,Homekit以及一切有关智能家居的内容),欢迎大家加入,一同学习分享有关智能家居的干货:
请使用什么值得买APP点击链接加入:https://group.smzdm.com/p/11/
","force_purephv":"0","gnid":"91204ecb2bdb2abb8","img_data":[{"flag":2,"img":[{"desc":"","height":"697","title":"","url":"https://p0.ssl.img.360kuai.com/t01fc8abf6271e36639.jpg","width":"600"},{"desc":"","height":"450","title":"","url":"https://p0.ssl.img.360kuai.com/t0182b8ae0dea934116.jpg","width":"600"},{"desc":"","height":"547","title":"","url":"https://p0.ssl.img.360kuai.com/t01e0dd1c64be97a36d.jpg","width":"600"},{"desc":"","height":"400","title":"","url":"https://p0.ssl.img.360kuai.com/t01b5f5df37c2b2542c.jpg","width":"600"},{"desc":"","height":"600","title":"","url":"https://p0.ssl.img.360kuai.com/t0170bbb55d56aea7ba.jpg","width":"600"},{"desc":"","height":"251","title":"","url":"https://p0.ssl.img.360kuai.com/t016c4c3d48be71e24f.jpg","width":"600"},{"desc":"","height":"315","title":"","url":"https://p0.ssl.img.360kuai.com/t01bb60dd63d28f104d.jpg","width":"600"},{"desc":"","height":"313","title":"","url":"https://p0.ssl.img.360kuai.com/t0193c3c32f090fe433.jpg","width":"600"},{"desc":"","height":"331","title":"","url":"https://p0.ssl.img.360kuai.com/t013a51e39134cc8cdc.jpg","width":"600"},{"desc":"","height":"331","title":"","url":"https://p0.ssl.img.360kuai.com/t01770b469d7ba4b98d.jpg","width":"600"},{"desc":"","height":"311","title":"","url":"https://p0.ssl.img.360kuai.com/t01290868ea6d2376d5.jpg","width":"600"},{"desc":"","height":"361","title":"","url":"https://p0.ssl.img.360kuai.com/t0140a7284b61c45035.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t010f4e038b9f1a7461.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t012138b1b11e97b0ba.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t017cb8b5797fedefa6.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t01c92a93cd486ed33a.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t014c730d1901fd9ee5.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t01fc727c578b5aafc7.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t01d12fe579fed768ce.jpg","width":"600"},{"desc":"","height":"418","title":"","url":"https://p0.ssl.img.360kuai.com/t01ed95d77aa4ee2fca.jpg","width":"600"},{"desc":"","height":"666","title":"","url":"https://p0.ssl.img.360kuai.com/t011ff7d23aa1a69622.jpg","width":"600"},{"desc":"","height":"803","title":"","url":"https://p0.ssl.img.360kuai.com/t01ff2ecc358a12d44a.jpg","width":"582"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t0140068ffc6e7ea034.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t014629d0671e1f32a5.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t01cca22b187a75a646.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t01dd0e00b694f87626.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t01e1543877435ca435.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t01d47341437be57f49.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t013cfd674e3877cdd6.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t016ccaee807869a5a4.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t01f9ca1928eb2e8580.jpg","width":"600"},{"desc":"","height":"282","title":"","url":"https://p0.ssl.img.360kuai.com/t0147f600e85b2623be.jpg","width":"600"},{"desc":"","height":"450","title":"","url":"https://p0.ssl.img.360kuai.com/t0182b8ae0dea934116.jpg","width":"600"}]}],"original":0,"pat":"xmc,art_src_1,fts0,sts0","powerby":"hbase","pub_time":1657283953000,"pure":"","rawurl":"http://zm.news.so.com/5699e097a6f419e06d4262cdab27724b","redirect":0,"rptid":"22dd37a34591c593","s":"t","src":"什么值得买","tag":[{"clk":"kdigital_1:小米","k":"小米","u":""}],"title":"无需349元的小米中枢网关,40元的玩客云打造小米米家蓝牙超级中枢网关
颜哲昏1527手机ip地址怎么切换
辛斧泄13656879992 ______ 手机ip地址切换的具体操作如下:工具:华为荣耀v20、emui 10.0.1、打开手机,选择设置.2、进入“设置”列表选择“WLAN”.3、划动可见的SSID到最底下找到“添加其他网络”.4、这里我们需要输入需要连接的WiFi名称(SSID),安全性几乎都是WPA2/psk,并勾选“显示高级选项”.5、这里我们需要输入wifi密码,更换“IP”获取方式为静态,手动输入IP地址,网关,DNS,子网前缀默认24位,最后连接.6、当WIFI连接成功之后我们就可以查看更换之后的IP地址了.
颜哲昏1527二氧化锆是一种固体电解质,在高温下,氧离子在其内部能够扩散和渗透....
辛斧泄13656879992 ______ 新华区的有一家瑞宠动物医院,你可以百度一下具体位置,听不错的一家动物医院
颜哲昏1527一摩尔的单原子理想气体,温度从300K加热到350K,其过程为压强不变,求此过程中吸收了多少热量 -
辛斧泄13656879992 ______ 绝热过程中P*V∧γ=K为常数.对于双原子分子γ等于5/7.做功W=∫(K/(V∧γ))*dV=(K/(1-γ))*2∧(1-γ)*K...
颜哲昏1527最高温度计为什么斜着放 以及最高最低温度计的原理 -
辛斧泄13656879992 ______ 因为百叶箱的进风(空气)孔是倾斜进风(空气),而温度计是要和所测物质垂直的.既然进入百叶箱里的空气是倾斜的,所以百叶箱内的温度计也应是垂直于倾斜进入百叶箱内的风(空气).
颜哲昏1527使用温度计测量气温时,应该注意哪些事项? -
辛斧泄13656879992 ______ 要悬挂在空气中,不能接触地面或其他物体;不要曝晒在阳光中;温度计保持干燥,不要沾水或其他液体;等温度计示数温度后再读数;有很多的吧,只把我知道的写出来了,希望对你...
颜哲昏1527各位老板,石家庄夏季宠物驱虫哪家专业呢?
辛斧泄13656879992 ______ 石家庄众心动物医院的诊疗技术挺不错的,服务还好,环境也比较卫生,靠谱可以去
颜哲昏1527请问大家开机出现这两个错误是什么问题?请问该怎样解决??谢谢
辛斧泄13656879992 ______ 我只知道第一个对话框显示的绝对是病毒!!! 清除办法: DTService.dll是木马病毒 打开注册表发现HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\...
颜哲昏1527吉首到锦州列车时刻表有吗?
辛斧泄13656879992 ______ 吉首到锦州每天有1趟车,车次信息如下:车次:K2286.从吉首开车时间为11:46,预计到达锦州的时间为23:10,预计总用时35:24.硬卧的价格是¥426.0元,硬座的价格是¥251.0元,软卧的价格是¥673.0元,无座的价格是¥251.0元.
颜哲昏1527为什么收到的邮件打开附件只有空白电子表格?如何解决?
辛斧泄13656879992 ______ 有如下可能: 1.OFFICE文件版本不同造成的,微软的系统只能向下兼容---升级版本. 2.该附件有病毒,内容已经被破坏---对方杀毒后重发. 3.你的系统部分文件损坏---需要修复或重装.