『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 11483|回复: 15

[技术探讨] 极米简单按键api的控制插件

[复制链接]

12

主题

328

帖子

1792

积分

论坛技术达人

积分
1792
金钱
1459
HASS币
40
发表于 2019-10-6 00:42:39 | 显示全部楼层 |阅读模式
本帖最后由 linlingzi 于 2019-10-6 01:13 编辑

感谢下面这位朋友提供的api
https://bbs.hassbian.com/thread-4998-1-1.html
目前只做了简单按键的api,感觉够用了,以后不够用再试试复杂的
把下面附件解压到你的custom_components目录下
xgimi_remote.zip (2.25 KB, 下载次数: 154)
untitled5.png
在configuration.yaml文件中加入:

remote:
  - platform: xgimi_remote
    name: liveroom
    host: 192.168.99.157(改为你自己的IP)

lovelace 控制面板,这里感谢这位朋友提供的代码,如涉及版权,请@我及时删除,谢谢
https://bbs.hassbian.com/forum.php?mod=viewthread&tid=7105&highlight=%E6%9E%81%E7%B1%B3
untitled7.png

cards:
  - cards:
      - color: 'rgb(255, 100, 100)'
        entity: remote.liveroom_xgimitv_power
        icon: 'mdi:power'
        show_name: false
        style:
          - height: 50px
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: remote.liveroom_xgimitv_up
        icon: 'mdi:menu-up'
        show_name: false
        style:
          - height: 50px
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        show_name: false
        entity: remote.liveroom_xgimitv_home
        icon: 'mdi:home'
        style:
          - height: 50px
        type: 'custom:button-card'
    type: horizontal-stack
  - cards:
      - color: 'rgb(255, 100, 100)'
        show_name: false
        entity: remote.liveroom_xgimitv_setup
        icon: 'mdi:settings'
        style:
          - height: 50px
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: remote.liveroom_xgimitv_left
        icon: 'mdi:menu-left'
        show_name: false
        style:
          - height: 50px
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        color_type: card
        entity: remote.liveroom_xgimitv_play
        icon: 'mdi:play-pause'
        name: OK
        show_icon: false
        style:
          - height: 50px
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: remote.liveroom_xgimitv_right
        icon: 'mdi:menu-right'
        show_name: false
        style:
          - height: 50px
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        show_name: false
        entity: remote.liveroom_xgimitv_menu
        icon: 'mdi:menu'
        style:
          - height: 50px
        type: 'custom:button-card'
    type: horizontal-stack
  - cards:
      - color: 'rgb(255, 100, 100)'
        entity: remote.liveroom_xgimitv_back
        show_name: false
        icon: 'mdi:keyboard-backspace'
        style:
          - height: 50px
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: remote.liveroom_xgimitv_down
        icon: 'mdi:menu-down'
        show_name: false
        style:
          - height: 50px
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        show_name: false
        entity: remote.liveroom_xgimitv_volumemute
        icon: 'mdi:volume-mute'
        style:
          - height: 50px
        type: 'custom:button-card'
    type: horizontal-stack
  - cards:
      - color_type: blank-card
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        color_type: card
        show_name: false
        icon: 'mdi:volume-plus'
        style:
          - height: 30px
        entity: remote.liveroom_xgimitv_volumeup
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        show_name: false
        color_type: card
        entity: remote.liveroom_xgimitv_volumedown
        icon: 'mdi:volume-minus'
        style:
          - height: 30px
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
    type: horizontal-stack
type: vertical-stack


评分

参与人数 1金钱 +20 HASS币 +20 收起 理由
+ 20 + 20 大神666!

查看全部评分

回复

使用道具 举报

55

主题

620

帖子

3800

积分

论坛元老

Rank: 8Rank: 8

积分
3800
金钱
3175
HASS币
20
发表于 2019-10-15 21:11:45 | 显示全部楼层
请问下复杂的指令怎么做呢
回复

使用道具 举报

55

主题

620

帖子

3800

积分

论坛元老

Rank: 8Rank: 8

积分
3800
金钱
3175
HASS币
20
发表于 2019-10-15 21:15:56 | 显示全部楼层
https://bbs.hassbian.com/forum.p ... 8276&highlight=极米
这位大神更新了 可以设定打开app
回复

使用道具 举报

12

主题

328

帖子

1792

积分

论坛技术达人

积分
1792
金钱
1459
HASS币
40
 楼主| 发表于 2019-10-16 17:20:52 | 显示全部楼层
gmshiwoge 发表于 2019-10-15 21:15
https://bbs.hassbian.com/forum.php?mod=viewthread&tid=8276&highlight=极米
这位大神更新了 可以设定打 ...

嗯,感觉没有太大的用途
回复

使用道具 举报

55

主题

620

帖子

3800

积分

论坛元老

Rank: 8Rank: 8

积分
3800
金钱
3175
HASS币
20
发表于 2019-10-16 17:39:59 | 显示全部楼层
linlingzi 发表于 2019-10-16 17:20
嗯,感觉没有太大的用途

哈哈 好奇心想增加几个常用的app快速打开他
回复

使用道具 举报

1

主题

220

帖子

865

积分

高级会员

Rank: 4

积分
865
金钱
645
HASS币
0
发表于 2020-2-2 18:48:55 | 显示全部楼层
感谢大佬,以收藏
回复

使用道具 举报

46

主题

641

帖子

4394

积分

元老级技术达人

积分
4394
金钱
3723
HASS币
120
发表于 2020-9-8 10:16:53 | 显示全部楼层
已收藏,以备不时之需,感谢分享
回复

使用道具 举报

0

主题

22

帖子

60

积分

注册会员

Rank: 2

积分
60
金钱
38
HASS币
0
发表于 2020-9-10 11:53:13 | 显示全部楼层
学习一下。准备搞一搞。
回复

使用道具 举报

0

主题

1

帖子

18

积分

新手上路

Rank: 1

积分
18
金钱
17
HASS币
0
发表于 2021-7-26 13:21:48 | 显示全部楼层
按照你的教程我把文件放入了里面,然后配置文件也添加了。可是重启不了提示not found。
调用服务 homeassistant/restart 失败。 The system cannot restart because the configuration is not valid: Platform error remote.xgimi_remote - Integration 'xgimi_remote' not found.
回复

使用道具 举报

6

主题

38

帖子

464

积分

中级会员

Rank: 3Rank: 3

积分
464
金钱
426
HASS币
0
发表于 2021-11-1 18:06:59 | 显示全部楼层
ating12138 发表于 2021-7-26 13:21
按照你的教程我把文件放入了里面,然后配置文件也添加了。可是重启不了提示not found。
调用服务 homeassis ...

我也是一样的情况  请问一下您是怎么解决的呢
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-26 10:46 , Processed in 1.060313 second(s), 35 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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