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

标题: 路由器流量统计 [打印本页]

作者: befantasy    时间: 2022-1-28 13:25
标题: 路由器流量统计
想实现如下图这样,每个小时路由器wan口的上传总流量和下载总流量。
[attach]34965[/attach]

路由器是刷了梅林官方固件的asus。使用UPnP/IGD或者ASUSWRT集成可以获取sensor.asuswrt_download和sensor.asuswrt_upload两个sensor。

但ASUS路由器上报的这两个sensor数值上限是4.3G,一旦达到4.3G,就会归零重新累计。

[attach]34966[/attach]


loveUI的statistics太简单了,只有sum、mean、min、max几种统计方式,无法直接实现按小时统计。

研究了home assistant自带的statistics integration,里面有一个”change“的State Characteristic,可以比较source sensor采样的变化值,这样计算出没两次采样之间的差值,然后再按小时求和,就可以实现,但需要额外处理的是snesor达到4.3G之后的归零,没找到合适的办法。。。

有在HACS里找了找,感觉apexcharts-card比较强大,看起来应该能实现,里面有个transform和data_generator的选项,但是需要JS的基础。。。研究半天也没研究明白。

请教一下大家该怎么用最简单的方法实现。



作者: dscao    时间: 2022-1-28 16:00
简单测试了一下,apexcharts-card 确实比较强大,有空可以研究研究。
作者: befantasy    时间: 2022-1-28 16:24
ryanh7 发表于 2022-1-28 13:47
Utility Meter

感谢,看了下integration的说明,没看出来怎么解决sensor的值累积到4.3G以后归零的问题。
作者: 咸味土豆    时间: 2022-1-28 21:17
dscao 发表于 2022-1-28 16:00
简单测试了一下,apexcharts-card 确实比较强大,有空可以研究研究。

apexcharts-card 论坛分享和例子都计较少,期待大佬研究分享,哈哈哈哈
作者: water3033    时间: 2022-1-28 21:41
插眼学习
作者: befantasy    时间: 2022-1-28 23:25
本帖最后由 befantasy 于 2022-1-28 23:27 编辑
ryanh7 发表于 2022-1-28 19:10
默认会自动处理归零

测试了一下,好像还真可以。
utility_meter:
  hourly_upload:
    source: sensor.asuswrt_upload
    name: Hourly upload
    cycle: hourly

  hourly_download:
    source: sensor.asuswrt_download
      name: Hourly downlod
      cycle: hourly



观察了一下,原sensor到上限清零,这个新建的sensor也会正常累加,每到整点归零。这样在Lovelace UI里添加一个statistics,然后stat_types选max就可以了吧???
现在还没够一个小时,显示不出来,我一会儿看看。
反正至少用apexcharts-card是没问题了。

折腾了两天没搞定,多谢了。


作者: befantasy    时间: 2022-1-28 23:53
感谢各位帮助,好像用Utility Meter加apexcharts-card已经可以了。

[attach]34974[/attach]





作者: MattSmell    时间: 2022-2-3 15:50
befantasy 发表于 2022-1-28 23:53
感谢各位帮助,好像用Utility Meter加apexcharts-card已经可以了。

能分享一下apexcharts-card的配置吗
作者: befantasy    时间: 2022-2-4 11:40
MattSmell 发表于 2022-2-3 15:50
能分享一下apexcharts-card的配置吗

type: custom:apexcharts-card
update_interval: 2m
stacked: false
graph_span: 13h
span:
  end: hour
hours_12: false
header:
  show: true
  title: 网络流量
  show_states: false
  colorize_states: true
series:
  - entity: sensor.hourly_upload
    name: 上传
    type: column
    color: '#3397da'
    opacity: 0.6
    group_by:
      func: max
      duration: 1h
    show:
      legend_value: false
  - entity: sensor.hourly_download
    name: 下载
    type: column
    color: '#7b4a8d'
    opacity: 0.6
    group_by:
      func: max
      duration: 1h
    show:
      legend_value: false
apex_config:
  chart:
    height: 200px

作者: 15283928038    时间: 2022-3-5 10:15
请教一下实时速度的代码,这个单位怎么换算成M/s

作者: befantasy    时间: 2022-3-8 12:24
15283928038 发表于 2022-3-5 10:15
请教一下实时速度的代码,这个单位怎么换算成M/s

实时速率看你用哪个custom card实现了。基本都有数值换算的选项。
我用的mini-graph-card
有个value_factor的选项,小数点左移三位的话就是-3,右移三位是3
value_factor: -3
作者: 15283928038    时间: 2022-3-14 10:04
非常感谢已经添加上了。
作者: qqkj    时间: 2022-3-15 04:09
befantasy 发表于 2022-1-28 23:53
感谢各位帮助,好像用Utility Meter加apexcharts-card已经可以了。

能分享下 mini-graph-card 的配置吗? 实时速率 和  温湿度的 都很好看,我配了半天,效果不是很满意。
作者: wen_jxpx    时间: 2022-3-15 09:13
befantasy 发表于 2022-1-28 23:53
感谢各位帮助,好像用Utility Meter加apexcharts-card已经可以了。

能提供下您这张图的源码配置吗?感觉非常好看~谢谢。
作者: befantasy    时间: 2022-3-16 21:38
qqkj 发表于 2022-3-15 04:09
能分享下 mini-graph-card 的配置吗? 实时速率 和  温湿度的 都很好看,我配了半天,效果不是很满意。 ...

type: vertical-stack
cards:
  - show_current: true
    show_forecast: true
    type: weather-forecast
    entity: weather.home
    secondary_info_attribute: wind_speed
  - type: thermostat
    entity: climate.v3_cloud_674156
  - type: horizontal-stack
    cards:
      - type: custom:mini-graph-card
        entities:
          - sensor.v1_cloud_0a00df_temperature
        name: 温度
        points_per_hour: 2
        hour24: true
        line_color: var(--accent-color)
        decimals: 0
        height: 200
        line_width: 6
        font_size: 100
        min_bound_range: 5
        align_state: center
        animate: false
        smoothing: true
        show:
          extrema: true
          labels: true
      - type: custom:mini-graph-card
        entities:
          - sensor.v1_cloud_0a00df_humidity
        name: 湿度
        points_per_hour: 2
        hour24: true
        line_color: '#3397da'
        decimals: 0
        height: 200
        line_width: 6
        font_size: 100
        min_bound_range: 10
        align_state: center
        animate: false
        smoothing: true
        show:
          extrema: true
          labels: true



---------------------------------------------------------


type: custom:mini-graph-card
name: 实时速率
entities:
  - entity: sensor.asuswrt_kib_s_sent
    state_adaptive_color: true
    show_state: true
    show_fill: true
    name: 上传
    color: '#3397da'
  - entity: sensor.asuswrt_kib_s_received
    state_adaptive_color: true
    show_state: true
    show_fill: true
    name: 下载
    color: '#7b4a8d'
points_per_hour: 60
hours_to_show: 1
font_size: 90
height: 120
decimals: 1
line_width: 3
animate: false
smoothing: true
align_state: center
value_factor: -3
unit: MB/s
show:
  legend: false
  labels: true
  icon: false
  points: false
  fill: true




作者: befantasy    时间: 2022-3-16 21:39
wen_jxpx 发表于 2022-3-15 09:13
能提供下您这张图的源码配置吗?感觉非常好看~谢谢。

哪个card?
作者: qqkj    时间: 2022-3-17 04:08
befantasy 发表于 2022-3-16 21:38
type: vertical-stack
cards:
  - show_current: true

好的谢谢!!
我试了你的这个流量统计功能,可以统计,但是数字不对, 我从路由器获取的实时流量数据是30秒采样一次。。所以统计的流量会非常少。没办法用,不知你是怎么解决的。
作者: wen_jxpx    时间: 2022-3-17 08:39
befantasy 发表于 2022-3-16 21:39
哪个card?

整个页面的配置文件。 所有的card  哈哈。
作者: befantasy    时间: 2022-3-17 09:28
本帖最后由 befantasy 于 2022-3-17 09:32 编辑
qqkj 发表于 2022-3-17 04:08
好的谢谢!!
我试了你的这个流量统计功能,可以统计,但是数字不对, 我从路由器获取的实时流量数据是30 ...

你说的是实时流量还是分时流量统计? 我上面发的那个是实时流量。分时流量统计是这个:

type: custom:apexcharts-card
update_interval: 2m
stacked: false
graph_span: 13h
span:
  end: hour
hours_12: false
header:
  show: true
  title: 网络流量
  show_states: false
  colorize_states: true
series:
  - entity: sensor.hourly_upload
    transform: return x / 1073741824;
    unit: G
    name: 上传
    type: column
    color: '#3397da'
    opacity: 0.6
    group_by:
      func: max
      duration: 1h
    show:
      legend_value: false
  - entity: sensor.hourly_download
    transform: return x / 1073741824;
    unit: G
    name: 下载
    type: column
    color: '#7b4a8d'
    opacity: 0.6
    group_by:
      func: max
      duration: 1h
    show:
      legend_value: false
apex_config:
  chart:
    height: 200px



作者: befantasy    时间: 2022-3-17 09:29
wen_jxpx 发表于 2022-3-17 08:39
整个页面的配置文件。 所有的card  哈哈。

title: Home
views:
  - path: default_view
    title: Home
    badges:
      - entity: binary_sensor.updater
      - entity: person.zhang_lin
      - entity: person.tian
      - entity: person.zhang
      - entity: sensor.aq2_event_4c9534_motion_illumination
      - entity: sun.sun
      - entity: sensor.u_s_air_quality_index
    cards:
      - type: vertical-stack
        cards:
          - type: glance
            entities:
              - entity: sensor.v8_event_119461_door_door_status
                name: 门状态
              - entity: sensor.v8_event_119461_lock_lock_action
                name: 锁状态
              - entity: sensor.v8_event_119461_lock_lock_method
                name: 开锁方式
              - entity: sensor.unlock_id
                name: 操作者
            show_name: true
            state_color: false
            show_icon: true
          - type: entities
            entities:
              - entity: sensor.v8_event_119461_door_door_time
                name: 门状态时间
              - entity: sensor.v8_event_119461_lock_lock_time
                name: 锁状态时间
      - type: vertical-stack
        cards:
          - type: media-control
            entity: media_player.appletv
          - type: media-control
            entity: media_player.ke_ting_yin_xiang
          - type: custom:button-card
            name: 客厅
            styles:
              card:
                - height: 30px
                - padding: 10px 10px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: switch.v1_cloud_3a6c2c
                name: 入户灯
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:light-recessed
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: switch.v1_cloud_a24dcb
                name: 吊灯
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:globe-light
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: switch.v1_cloud_a24dcb_switch_2
                name: 吸顶灯
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:wall-sconce-flat-outline
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: switch.tv
                name: 电视
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:television-box
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: media_player.ke_ting_yin_xiang
                name: 音响
                tap_action:
                  action: call-service
                  service: media_player.media_play_pause
                  service_data:
                    entity_id: media_player.ke_ting_yin_xiang
                state:
                  - value: paused
                    color: var(--paper-item-icon-color)
                    color_type: icon
                    icon: mdi:music
                  - value: playing
                    color: rgb(255, 214, 10)
                    color_type: icon
                    icon: mdi:music
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: fan.airx
                name: 净化器
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:air-filter
                show_state: false
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
                  grid:
                    - position: relative
                  custom_fields:
                    notification:
                      - background-color: |
                          [[[
                            if (states['sensor.airx_pm25'].state < 10)
                              return "green";
                            return "red";
                          ]]]
                      - border-radius: 50%
                      - position: absolute
                      - left: 60%
                      - top: '-5%'
                      - height: 18px
                      - width: 18px
                      - font-size: 14px
                      - line-height: 20px
                custom_fields:
                  notification: |
                    [[[ return states['sensor.airx_pm25'].state ]]]
          - type: custom:button-card
            name: 书房
            styles:
              card:
                - height: 30px
                - padding: 10px 10px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: light.lamp22_cloud_515305
                name: 台灯
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:wall-sconce-round-outline
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: switch.v1_cloud_6d4553
                name: 吸顶灯
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:wall-sconce-flat-outline
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: switch.desktop
                name: 桌面电脑
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:desktop-classic
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
          - type: custom:button-card
            name: 卧室
            styles:
              card:
                - height: 30px
                - padding: 10px 10px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: switch.v1_cloud_3a7a8c
                name: 主卧吸顶灯
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:wall-sconce-flat-outline
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: switch.v1_cloud_40bc6c
                name: 次卧吸顶灯
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:wall-sconce-flat-outline
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: fan.airx2
                name: 净化器
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:air-filter
                show_state: false
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
                  grid:
                    - position: relative
                  custom_fields:
                    notification:
                      - background-color: |
                          [[[
                            if (states['sensor.airx2_pm25'].state < 10)
                              return "green";
                            return "red";
                          ]]]
                      - border-radius: 50%
                      - position: absolute
                      - left: 62%
                      - top: '-5%'
                      - height: 18px
                      - width: 18px
                      - font-size: 14px
                      - line-height: 20px
                custom_fields:
                  notification: |
                    [[[ return states['sensor.airx2_pm25'].state ]]]
          - type: custom:button-card
            name: 厨卫
            styles:
              card:
                - height: 30px
                - padding: 10px 10px
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                entity: switch.v1_cloud_3a6d55
                name: 厨房
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:wall-sconce-flat-outline
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: switch.v1_cloud_40970b
                name: 洗手台
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:light-recessed
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: switch.v1_cloud_a2d2b5_switch_2
                name: 卫生间
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:wall-sconce-flat-outline
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
              - type: custom:button-card
                entity: switch.v1_cloud_a2d2b5
                name: 换气扇
                color_type: icon
                color: rgb(255, 214, 10)
                icon: mdi:fan
                styles:
                  card:
                    - height: 65px
                    - font-size: 15px
      - type: vertical-stack
        cards:
          - type: weather-forecast
            entity: weather.home
            secondary_info_attribute: wind_speed
          - type: thermostat
            entity: climate.v3_cloud_674156
          - type: horizontal-stack
            cards:
              - type: custom:mini-graph-card
                entities:
                  - sensor.v1_cloud_0a00df_temperature
                name: 温度
                points_per_hour: 2
                hour24: true
                line_color: var(--accent-color)
                decimals: 0
                height: 200
                line_width: 6
                font_size: 100
                min_bound_range: 5
                align_state: center
                animate: false
                smoothing: true
                show:
                  extrema: true
                  labels: true
              - type: custom:mini-graph-card
                entities:
                  - sensor.v1_cloud_0a00df_humidity
                name: 湿度
                points_per_hour: 2
                hour24: true
                line_color: '#3397da'
                decimals: 0
                height: 200
                line_width: 6
                font_size: 100
                min_bound_range: 10
                align_state: center
                animate: false
                smoothing: true
                show:
                  extrema: true
                  labels: true
      - type: custom:xiaomi-vacuum-map-card
        title: 扫地机器人
        language: zh
        entity: vacuum.s5_cloud_473051
        vacuum_platform: default
        map_source:
          camera: camera.xiaomi_cloud_map_extractor
        calibration_source:
          camera: true
        map_locked: true
      - type: vertical-stack
        cards:
          - type: custom:apexcharts-card
            update_interval: 2m
            stacked: false
            graph_span: 13h
            span:
              end: hour
            hours_12: false
            header:
              show: true
              title: 网络流量
              show_states: false
              colorize_states: true
            series:
              - entity: sensor.hourly_upload
                transform: return x / 1073741824;
                unit: G
                name: 上传
                type: column
                color: '#3397da'
                opacity: 0.6
                group_by:
                  func: max
                  duration: 1h
                show:
                  legend_value: false
              - entity: sensor.hourly_download
                transform: return x / 1073741824;
                unit: G
                name: 下载
                type: column
                color: '#7b4a8d'
                opacity: 0.6
                group_by:
                  func: max
                  duration: 1h
                show:
                  legend_value: false
            apex_config:
              chart:
                height: 200px
          - type: custom:mini-graph-card
            name: 实时速率
            entities:
              - entity: sensor.asuswrt_kib_s_sent
                state_adaptive_color: true
                show_state: true
                show_fill: true
                name: 上传
                color: '#3397da'
              - entity: sensor.asuswrt_kib_s_received
                state_adaptive_color: true
                show_state: true
                show_fill: true
                name: 下载
                color: '#7b4a8d'
            points_per_hour: 60
            hours_to_show: 1
            font_size: 90
            height: 120
            decimals: 1
            line_width: 3
            animate: false
            smoothing: true
            align_state: center
            value_factor: -3
            unit: MB/s
            show:
              legend: false
              labels: true
              icon: false
              points: false
              fill: true
  - title: temp
    path: temp
    badges: []
    cards:
      - type: vertical-stack
        cards:
          - type: entities
            entities:
              - entity: switch.v1_cloud_3a6c2c
              - entity: switch.v1_cloud_a24dcb
              - entity: switch.v1_cloud_a24dcb_switch_2
              - entity: switch.tv
              - entity: switch.aroma
            title: 客厅
            state_color: true
            show_header_toggle: false
          - type: entities
            entities:
              - entity: switch.v1_cloud_6d4553
              - entity: light.lamp22_cloud_515305
              - entity: switch.desktop
            title: 书房
            state_color: true
            show_header_toggle: false
          - type: entities
            entities:
              - entity: switch.v1_cloud_3a7a8c
              - entity: switch.v1_cloud_40bc6c
            title: 卧室
            state_color: true
            show_header_toggle: false
          - type: entities
            entities:
              - entity: switch.v1_cloud_3a6d55
              - entity: switch.v1_cloud_40970b
              - entity: switch.v1_cloud_a2d2b5_switch_2
              - entity: switch.v1_cloud_a2d2b5
            title: 厨卫
            state_color: true
            show_header_toggle: false
      - type: entities
        entities:
          - entity: sensor.v8_event_119461_door_door_status
            name: 门状态
          - entity: sensor.v8_event_119461_lock_lock_action
            name: 锁状态
          - entity: sensor.v8_event_119461_lock_lock_method
            name: 开锁方式
          - entity: sensor.unlock_id
            name: 操作者
          - entity: sensor.v8_event_119461_door_door_time
            name: 门状态时间
          - entity: sensor.v8_event_119461_lock_lock_time
            name: 锁状态时间
        title: 门禁
        show_header_toggle: false
        state_color: false
      - entities:
          - entity: fan.airx
          - entity: sensor.airx_pm25
          - entity: sensor.airx_outside_pm25
          - entity: fan.airx2
          - entity: sensor.airx2_pm25
          - entity: sensor.airx2_outside_pm25
        show_header_toggle: true
        title: 空气净化器
        type: entities
        state_color: true
      - type: vertical-stack
        cards:
          - type: custom:apexcharts-card
            graph_span: 1h
            hours_12: false
            header:
              show: true
              title: 网络
              show_states: false
              standard_format: false
              colorize_states: true
            series:
              - entity: sensor.asuswrt_kib_s_sent
                type: area
                fill_raw: last
                opacity: 0.2
                name: 上传速率
                unit: MB/s
                stroke_width: 2.5
                transform: return x / 1024;
                group_by:
                  func: avg
                  duration: 1m
              - entity: sensor.asuswrt_kib_s_received
                type: area
                fill_raw: last
                opacity: 0.2
                name: 下载速率
                unit: MB/s
                stroke_width: 2.5
                transform: return x / 1024;
                group_by:
                  func: avg
                  duration: 1m
      - type: custom:apexcharts-card
        graph_span: 24h
        hours_12: false
        header:
          show: true
          title: 温湿度
          show_states: true
          standard_format: false
          colorize_states: true
        yaxis:
          - id: temp
            decimals: 0
            min: 18
            max: 30
            apex_config:
              tickAmount: 6
          - id: hum
            opposite: true
            decimals: 0
            min: 20
            max: 80
            apex_config:
              tickAmount: 6
        series:
          - entity: sensor.v1_cloud_0a00df_temperature
            yaxis_id: temp
            type: area
            float_precision: 0
            opacity: 0.2
            name: 温度
            stroke_width: 2.5
            group_by:
              func: avg
              duration: 30m
            show:
              extremas: true
          - entity: sensor.v1_cloud_0a00df_humidity
            yaxis_id: hum
            type: area
            float_precision: 0
            opacity: 0.2
            name: 湿度
            stroke_width: 2.5
            group_by:
              func: avg
              duration: 30m
            show:
              extremas: true
      - type: custom:simple-thermostat
        entity: climate.v3_cloud_674156
        layout:
          mode:
            headings: false
            names: true
          step: row
        decimals: '0'
        header:
          name: 空调

作者: wen_jxpx    时间: 2022-3-17 15:05
befantasy 发表于 2022-3-17 09:29
title: Home
views:
  - path: default_view

收到,谢谢。
作者: qqkj    时间: 2022-3-18 18:14
befantasy 发表于 2022-3-17 09:28
你说的是实时流量还是分时流量统计? 我上面发的那个是实时流量。分时流量统计是这个:

type: custom:ape ...

我说的就是这个 分时流量统计数据不准确。  会有数据采样时间间隔的问题。。不知道你怎么解决的
作者: befantasy    时间: 2022-3-18 22:04
qqkj 发表于 2022-3-18 18:14
我说的就是这个 分时流量统计数据不准确。  会有数据采样时间间隔的问题。。不知道你怎么解决的 ...

分时统计用的sensor就是路由器上报的处理过的累积数据,跟上报间隔没关系。需要处理的是路由器的这个上报数据会周期性清零,我这个帖子原本问的就是这个问题。
作者: irunrun    时间: 2022-5-23 17:32
一直在找这个流量统计的,感谢分享
作者: mobility    时间: 2023-3-13 16:26
befantasy 发表于 2022-1-28 23:53
感谢各位帮助,好像用Utility Meter加apexcharts-card已经可以了。

请问 这是 什么 型号的扫地机器人呀?可以直接集成近 HA吗?
作者: befantasy    时间: 2023-3-30 18:37
mobility 发表于 2023-3-13 16:26
请问 这是 什么 型号的扫地机器人呀?可以直接集成近 HA吗?

是Roborock S5,用https://github.com/al-one/hass-xiaomi-miot 接入,配合https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-cardhttps://github.com/PiotrMachowsk ... Cloud-Map-Extractor
作者: fay000fay    时间: 2023-7-17 16:02
befantasy 发表于 2022-1-28 23:53
感谢各位帮助,好像用Utility Meter加apexcharts-card已经可以了。

你好,你左上角的门锁是米家的吗?我通过miot-auto接入后,操作者只有一串key-id,看不出是谁解锁的,而且经常在变,即同一个人,可能过几天,这个id就会变掉。就算固定id不变,那么这个id如何定义为某个成员进行显示啊
作者: befantasy    时间: 2023-7-24 23:59
fay000fay 发表于 2023-7-17 16:02
你好,你左上角的门锁是米家的吗?我通过miot-auto接入后,操作者只有一串key-id,看不出是谁解锁的,而 ...

我前面也是这个问题,所以锁是单独用另外一个xiaomi raw接入的,但是最近这个integration总是登录失败,也很久不维护,被HACS剔除了。

现在新版的miot auto的key_id好像不会变了,你更新再观察观察。
作者: fay000fay    时间: 2023-7-25 08:28
befantasy 发表于 2023-7-24 23:59
我前面也是这个问题,所以锁是单独用另外一个xiaomi raw接入的,但是最近这个integration总是登录失败, ...

好的。谢谢啦
作者: fay000fay    时间: 2023-7-25 11:19
befantasy 发表于 2023-7-24 23:59
我前面也是这个问题,所以锁是单独用另外一个xiaomi raw接入的,但是最近这个integration总是登录失败, ...

可能是我这个锁的问题。新的问题是,明明有人用指纹开锁了,但状态里还是显示上一次室内开锁状态:人工;而非显示:生物指纹。唯一能即时更新的实体有:1、门锁时间戳;2、门锁状态。 但门的状态它无法及时更新,即开或者关;门锁状态会及时更新会门外开锁,或者室内开锁。

总结:玩智能家居,能不选小米尽量不要选。哈哈





欢迎光临 『瀚思彼岸』» 智能家居技术论坛 (https://bbs.hassbian.com/) Powered by Discuz! X3.5