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

 找回密码
 立即注册
查看: 112966|回复: 122

[插件集成] 小米养生壶接入HASS

  [复制链接]

16

主题

217

帖子

2204

积分

论坛技术达人

积分
2204
金钱
1952
HASS币
140
发表于 2020-2-1 17:55:02 | 显示全部楼层 |阅读模式
本帖最后由 fineemb 于 2020-2-5 13:01 编辑

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

小米养生壶

不要被英文迷惑, 我在服务配置说明里用了中文:lol
第一次系统的看了一下开发文档, 这个组件其实官方不建议这样写的, 但是我是实在没找到适合这样的炊具的Entity
支持HACS安装, 直接在市场里搜养生壶

This is a custom component for home assistant to integrate the Xiaomi Smart Multipurpose Kettle.

hacs_badge

Please follow the instructions on Retrieving the Access Token to get the API token to use in the configuration.yaml file.

Credits: Thanks to Rytilahti for all the work.

Features

viomi.health_pot.v1

  • Sensors
    • run_status (16:No kettle placed  32:Drycooking protection 48:Both)
    • work_status (1:Reservation 2:Cooking 3:Paused 4:Keeping 5:Stop)
    • work_status_cn
    • warm_data
    • last_time
    • last_temp
    • curr_tempe
    • mode (Mode ID)
    • mode_en (Mode Name for English)
    • mode_cn (中文模式名称)
    • heat_power
    • warm_time
    • cook_time
    • left_time
    • cook_status
    • cooked_time
    • voice
    • stand_top_num
    • mode_sort
  • Chart
    • TODO: Temperature History (Like the temperature chart of the weather forecast)
  • Services
    • set_voice
    • set_work
    • delete_modes
    • set_mode_sort
    • set_mode

Setup

# configuration.yaml

health_pot: 
  host: 192.168.1.13
  token: a9bd32552dc9bd4e156954c20ddbcb38
  name: 养生壶
  model: viomi.health_pot.v1
  scan_interval: 10

Configuration variables:

  • host (Required): The IP of your cooker.
  • token (Required): The API token of your cooker.
  • name (Optional): The name of your cooker.
  • model (Optional): Currently only support viomi.health_pot.v1
  • scan_interval (Optional): Data update interval

Platform services

Service health_pot.set_voice

Set whether the buzzer is enabled.

Service data attribute Optional Description
entity_id yes Only act on a specific Kettle.
voice no Specify the buzzer status (on/off).

Service health_pot.set_work

Set the working status of the device and his work mode.

Service data attribute Optional Description
entity_id yes Only act on a specific Kettle.
status yes (1:Reservation 2:Cooking 3:Paused 4:Keeping 5:Stop)
id yes Mode id, can have 24 modes .1-8 (custom) and 11-26 (inline)
keep_temp yes Keep temperature, 1-99
keep_time yes Keep time, hours (1-12)
timestamp yes Timestamp of the reservation

Service health_pot.delete_modes

Remove a custom mode.

Service data attribute Optional Description
entity_id yes Only act on a specific Kettle.
modes yes Mode id, 1-8 (custom).

Service health_pot.set_mode_sort

Set mode sorting.

Service data attribute Optional Description
entity_id yes Only act on a specific Kettle.
sort yes Mode ID sort, 1-8 (custom). (11-12-13-23-15-16-17-18-20-26-21-14-19-25-24-22-1-2)

Service health_pot.set_mode

Configure custom mode properties. Firepower and duration can be specified.

Service data attribute Optional Description
entity_id yes Only act on a specific Kettle.
status yes (1:Reservation 2:Cooking 3:Paused 4:Keeping 5:Stop)
id yes Mode id, can have 24 modes .1-8 (custom) and 11-26 (inline)
heat yes Heat power, 1-99
time yes Duration, minutes (1-240)



评分

参与人数 4金钱 +64 HASS币 +20 收起 理由
吹风机 + 16 厉害了word楼主!
eric + 20 感谢楼主分享!
+ 20 + 20 厉害了word楼主!
jyz_0501 + 8 论坛有你更精彩!

查看全部评分

回复

使用道具 举报

69

主题

692

帖子

4187

积分

论坛元老

Rank: 8Rank: 8

积分
4187
金钱
3490
HASS币
80
发表于 2020-2-1 18:27:51 | 显示全部楼层
这么牛呀
回复

使用道具 举报

6

主题

556

帖子

3476

积分

论坛元老

Rank: 8Rank: 8

积分
3476
金钱
2920
HASS币
0
发表于 2020-2-1 20:58:52 | 显示全部楼层
学习学习再学习,谢谢谢谢再谢谢!
回复

使用道具 举报

175

主题

2956

帖子

7555

积分

超级版主

我就是六神

Rank: 8Rank: 8

积分
7555
金钱
4574
HASS币
398

活跃会员教程狂人灌水之王

QQ
发表于 2020-2-1 21:25:34 | 显示全部楼层
感谢分享~~虽然我没有这个东东
回复

使用道具 举报

7

主题

125

帖子

620

积分

高级会员

Rank: 4

积分
620
金钱
490
HASS币
20
发表于 2020-2-1 21:28:48 | 显示全部楼层
这么厉害,大神,拜服,我想抓包一个空气净化器都无从下手,哎
回复

使用道具 举报

13

主题

401

帖子

2743

积分

金牌会员

Rank: 6Rank: 6

积分
2743
金钱
2342
HASS币
0
发表于 2020-2-1 22:29:49 | 显示全部楼层
怎么得到的米家设备的可以参数和命令啊
回复

使用道具 举报

0

主题

90

帖子

761

积分

高级会员

Rank: 4

积分
761
金钱
671
HASS币
0
发表于 2020-2-2 11:30:14 | 显示全部楼层
这个厉害 看看细节内容
回复

使用道具 举报

6

主题

737

帖子

5584

积分

论坛元老

Rank: 8Rank: 8

积分
5584
金钱
4842
HASS币
20
发表于 2020-2-2 12:24:08 | 显示全部楼层
程序楼主已经提供了,就差壶了。。。
回复

使用道具 举报

10

主题

48

帖子

250

积分

论坛分享达人

积分
250
金钱
202
HASS币
0
发表于 2020-2-2 12:45:29 | 显示全部楼层
NB,我得试试,感谢老板
回复

使用道具 举报

0

主题

39

帖子

1200

积分

金牌会员

Rank: 6Rank: 6

积分
1200
金钱
1161
HASS币
0
发表于 2020-2-2 13:36:50 | 显示全部楼层
学习学习
http://myai.live
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-26 07:52 , Processed in 0.798790 second(s), 35 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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