Aqara虚拟开关的不完美替代方案

Aqara有一个叫做“虚拟开关”的东西,就是在企业开发后台为你的账户添加一个虚拟的开关按键。

类似这样


这个开关可以通过AqaraHome接入homekit,然后反向接入HA,从而实现用HA去控制部分不支持接入ha,但可以接入homekit的绿米设备;或直接通过HA去触发AqaraHome上的自动化流程。

总的来说,长期以来这一直是一个较为可行的曲线救国方案,绿米确实有许多的设备无法很好的适配HA,我个人目前在使用的就有H100的智能锁,以及S1E的几个无线开关,这些都无法直接接入HA,一直以来我都是通过虚拟开关来进行相关联动
但是对大多数玩家来说,虚拟开关还是有一定的门槛,至少首先你要有一个企业开发账号(或认识有这个账号的人)

于是这个傻瓜方案便应运而生了。

我们再来梳理一下虚拟开关控制HA的逻辑链。

可以看到,这个曲线救国的方案中,虚拟开关是作为一个桥梁来链接几个原本无法打通的平台

那么我们现在换个思路,反正只要是一个可以同时接入Aqarahome跟HomeAssistant的设备,理论上就都可以实现这一套流程。

于是我发现了这个

没错,就是M1S,这个东西的亮度调节有100趴,同时他原生支持接入Homekit,在反向接入Homeassistant后,他的每一趴亮度都会在HA中有一个对应的数值,就是255的百分比

像这样

2.55即为1%的亮度,也就是说,我们只需要在Nodered中写好对应的自动化流程(HA自带的自动化也可以)

并在Aqarahome中设置好每一个百分比需要触发的事件,那么光M1S这一个设备,我们就等于获得了100个虚拟开关

打个比方,我的H100密码锁目前是无法通过任何手段来接入homeassistant的,那么我现在需要完成一个从外部开门,自动打开玄关灯的操作,我就可以这样设置。

然后在NR中设置好对应的流程,这里我把NR流的逻辑也简单说明一下


20230804-9Aqara.zip
这样一个检测亮度——触发事件——关闭亮灯的闭环逻辑就完成了,你只需要在流中添加自己需要触发的事件即可。

我本身是不需要M1S的夜灯的,他一直放在某个柜子里作为一个纯网关来使用。

当然如果你本身就有用M1S作为夜灯的习惯,你可以把夜灯固定一个亮度,比如70%,这样你的“虚拟开关”就从100个变成了99个,你懂我意思。

如果你作为一位绿米玩家,连M1S都没有的话。也可以找找绿米的其他设备,比如便宜灯泡啥的,总之万变不离其宗,就酱。

所有评论(7)

  1. cynthiaywill说道:

    This message is used to verify that this feed (feedId:71888241829086208) belongs to me (userId:71881863057748992). Join me in enjoying the next generation information browser https://follow.is.

  2. wonderful publish, very informative. I ponder
    why the opposite specialists of tnis sector do not realize this.
    Youu mus continue your writing. I am sure, you’ve a huge
    readers’ base already! https://U7bm8.Mssg.me/

  3. Definitely believe that which you said. Your favorite justification appeared to be on the
    internet the simplest thing to bee aware of. I saay to you, I definitely get annoyed while people consider worries that they just do not
    know about. You managed to hit the naill upon the top as well as defined out the whole tning without
    having side effect , people could take a signal.
    Will probably be back tto get more. Thanks https://W4I9o.mssg.me/

  4. Howdy, i read your blog occasionally and i own a similar one and
    i wass just wondering if you get a lot of spam responses?

    If so how do you protect against it, any plugin oor anything you can recommend?
    I geet so much lately it’s driving me mad so any support is very much appreciated. https://Glassi-India.Mystrikingly.com/

  5. I loved as much as yyou will receive carred out right here.
    The sketch is tasteful, your authored material stylish.
    nonetheless, you command get bought an edginess over that you wish be delivering the following.
    unwell unquestionably come further formerly again since exactly
    the same nealy a lot often insid case you shield thhis
    increase. https://glassi-freespins.Blogspot.com/2025/08/how-to-claim-glassi-casino-free-spins.html

  6. Appreciating the hard work you put into yolur blog and detailed information you provide.

    It’s good tto come across a blog every once in a while that isn’t the same
    out of date rehashed material. Excellent read!
    I’ve bookmarked your site and I’m adding your RSS feeds to my Google account. https://jobspaceindia.com/companies/tonebet-casino/

  7. Hi just wanted tto give you a brief heads up and let you know a few of the images aren’t loading correctly.

    I’m not sure why but I think itts a linking issue.
    I’ve tried it in two different web browsers and both show
    thee saje results. https://ariaqa.com/employer/tonebet-casino/

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注