请选择 进入手机版 | 继续访问电脑版

『瀚思彼岸』» 智能家居第一站

 找回密码
 立即注册
查看: 2227|回复: 84

[插件发布] 小米万能遥控 格力空调插件

  [复制链接]

89

主题

709

帖子

2797

积分

超级版主

Rank: 8Rank: 8

积分
2797
彼岸币
0

教程狂人突出贡献

发表于 2017-8-16 21:03:49 | 显示全部楼层 |阅读模式
本帖最后由 lidicn 于 2017-11-18 20:28 编辑

小米万能遥控器【创米万能遥控】代码来源:https://github.com/SchumyHao/cus ... itch/chuangmi_ir.py
适用于格力空调,遥控器型号YB0F2
空调控制部分代码参考了菲神的代码【仰望着天空,抄袭了一遍代码】
依赖需求:
1、需要python-miio
2、要学红外码的要装妖神的,chuangmi_ir.py3、有另一个以python-mirobo为核心的版本的chuangmi_ir.py https://github.com/syssi/chuangmi_ir【用法跟妖神的一模一样】

未标题-1.jpg

[Bash shell] 纯文本查看 复制代码
climate:
  - platform: gree
    name: GREE
    host: 192.168.2.205
    token: 你的token
    target_temp: 27
    target_sensor: sensor.caiyun_realtime_temperature

target_sensor:这里填你的室内温度传感器的entity_id

使用方法:
下载解压,复制到相应文件夹

楼主的格力空调遥控器型号是YB0F2,如果你的也是。可以直接用。否则,需要自行学红外码复制进去。因楼主的空调没有制热功能,因此没有学制热的红外码。红外码在gree.py 第314行 到328行
[Bash shell] 纯文本查看 复制代码
def _sendpacket(self,retry=2):
        """Send packet to device."""
        cool = ("Z6WLAAkCAACnAgAASwYAAGARAAAqIwAA100AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0IQEBIQEBAQEBAQEBAQEBAQEBAQEBISEBAQEBASEBIQEBIQFRAQEBAQEBAQEBAQEBASEBAQEBAQEBAQEBAQEBASEBIQEB",
"Z6WLABcCAACZAgAAXAYAAGIRAAAoIwAA3k0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0IQEBIQEBAQEhAQEBAQEBAQEBAQEB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CAACcAgAAWgYAAGERAAAnIwAA2k0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0IQEBIQEBAQEhASEhAQEBAQEBAQEBISEBAQEBASEBIQEBIQFRAQEBAQEBAQEBAQEBASEBAQEBAQEBAQEBAQEBAQEhAQEB",
"Z6WLABUCAACbAgAAWwYAAGERAAAnIwAA200AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0IQEBIQEBAQEBISEhAQEBAQEBAQEBISEBAQEBASEBIQEBIQFRAQEBAQEBAQEBAQEBASEBAQEBAQEBAQEBAQEBASEhAQEB"
)

分别是16度制冷风速自动  到 30度制冷风速自动。

游客,如果您要查看本帖隐藏内容请回复

37楼有美的的遥控码,需要的去复制替换下。

2017年11月18日更新:
将miio替换为更广泛使用的 mirobo


climate.zip (21.15 KB, 下载次数: 6)

评分

参与人数 2金钱 +16 收起 理由
27hh + 10 感谢及时更新mirobo!
Jones + 6 6到不行

查看全部评分

回复

使用道具 举报

17

主题

299

帖子

1078

积分

金牌会员

Freddy.

Rank: 6Rank: 6

积分
1078
彼岸币
0

最佳新人

发表于 2017-8-16 21:06:23 | 显示全部楼层
老规矩 抢沙发!!!
回复

使用道具 举报

89

主题

709

帖子

2797

积分

超级版主

Rank: 8Rank: 8

积分
2797
彼岸币
0

教程狂人突出贡献

 楼主| 发表于 2017-8-16 21:07:05 | 显示全部楼层

好专业啊,你抢我沙发好几回了
回复

使用道具 举报

3

主题

133

帖子

655

积分

高级会员

Rank: 4

积分
655
彼岸币
0
发表于 2017-8-16 21:07:09 | 显示全部楼层
谢谢分享!!!
回复

使用道具 举报

50

主题

1013

帖子

3100

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
3100
彼岸币
0
发表于 2017-8-16 21:09:32 | 显示全部楼层
我要像天一样高,一样高傲奥~
回复

使用道具 举报

2

主题

78

帖子

335

积分

中级会员

Rank: 3Rank: 3

积分
335
彼岸币
0
发表于 2017-8-16 21:10:03 | 显示全部楼层
学习学习,谢谢分享
回复

使用道具 举报

89

主题

709

帖子

2797

积分

超级版主

Rank: 8Rank: 8

积分
2797
彼岸币
0

教程狂人突出贡献

 楼主| 发表于 2017-8-16 21:10:10 | 显示全部楼层
Jones 发表于 2017-8-16 21:09
我要像天一样高,一样高傲奥~

我还在等你的红外sonoff
回复

使用道具 举报

7

主题

38

帖子

197

积分

论坛分享达人

积分
197
彼岸币
0
发表于 2017-8-16 21:39:10 | 显示全部楼层
感谢楼主分享
回复

使用道具 举报

21

主题

554

帖子

1718

积分

金牌会员

Rank: 6Rank: 6

积分
1718
彼岸币
0

活跃会员

发表于 2017-8-17 01:01:10 | 显示全部楼层
好东西,谢谢分享
回复

使用道具 举报

6

主题

83

帖子

516

积分

论坛分享达人

积分
516
彼岸币
0
发表于 2017-8-17 08:31:58 | 显示全部楼层
支持啊~~~自己半吊子不知道怎么从菲神的博联移到小米~~~~~~~真好
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2017-11-22 07:21 , Processed in 0.310324 second(s), 29 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表