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

 找回密码
 立即注册
查看: 2489|回复: 8

[技术探讨] 有哪些大神能出个新ha-floorplan的安装和使用手册吗

[复制链接]

12

主题

193

帖子

1120

积分

论坛积极会员

积分
1120
金钱
927
HASS币
0
发表于 2021-11-14 19:55:54 | 显示全部楼层 |阅读模式
本帖最后由 lijun9701 于 2021-11-24 21:08 编辑

我按照官网教程,一直无法安装成功。
每次安装都提示刷新,刷新后却没有任何显示。系统文件夹中也没有增加相应的文件夹和文件。
日志错误代码如下:
21-11-24 19:16:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.SUPERVISOR
21-11-24 19:16:04 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-11-24 19:16:04 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-11-24 19:16:04 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-11-24 19:16:04 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
21-11-24 19:16:04 INFO (MainThread) [supervisor.resolution.fixups.store_execute_remove] Remove invalid Store: core
21-11-24 19:16:04 ERROR (MainThread) [supervisor.store.repository] Can't remove built-in repositories!
21-11-24 19:16:04 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
21-11-24 19:25:36 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
21-11-24 19:27:37 ERROR (MainThread) [supervisor.store.git] Can't update https://github.com/home-assistant/addons repo: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch -v --update-shallow --depth=1 origin
  stderr: 'fatal: unable to access 'https://github.com/home-assistant/addons/': HTTP/2 stream 1 was not closed cleanly before end of the underlying stream'.
21-11-24 19:27:37 INFO (MainThread) [supervisor.resolution.module] Create new issue IssueType.CORRUPT_REPOSITORY - ContextType.STORE / core
21-11-24 19:27:37 INFO (MainThread) [supervisor.resolution.module] Create new suggestion SuggestionType.EXECUTE_RESET - ContextType.STORE / core
21-11-24 19:27:37 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-9219714' coro=<Repository.update() done, defined at /usr/src/supervisor/supervisor/store/repository.py:106> exception=StoreGitError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/git.py", line 155, in pull
    await self.sys_run_in_executor(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/git/remote.py", line 867, in fetch
    res = self._get_fetch_info_from_stderr(proc, progress,
  File "/usr/local/lib/python3.9/site-packages/git/remote.py", line 732, in _get_fetch_info_from_stderr
    proc.wait(stderr=stderr_text)
  File "/usr/local/lib/python3.9/site-packages/git/cmd.py", line 501, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch -v --update-shallow --depth=1 origin
  stderr: 'fatal: unable to access 'https://github.com/home-assistant/addons/': HTTP/2 stream 1 was not closed cleanly before end of the underlying stream'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/repository.py", line 110, in update
    await self.git.pull()
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 108, in wrapper
    raise err
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 106, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/store/git.py", line 195, in pull
    raise StoreGitError() from err
supervisor.exceptions.StoreGitError
21-11-24 19:27:37 INFO (MainThread) [supervisor.store] Loading add-ons from store: 23 all - 0 new - 0 remove
21-11-24 19:27:37 INFO (MainThread) [supervisor.store] Loading add-ons from store: 23 all - 0 new - 0 remove
21-11-24 19:57:29 INFO (MainThread) [supervisor.host.info] Updating local host information
21-11-24 19:57:30 INFO (MainThread) [supervisor.host.services] Updating service information
21-11-24 19:57:30 INFO (MainThread) [supervisor.host.network] Updating local network information
21-11-24 19:57:31 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
21-11-24 19:57:31 INFO (MainThread) [supervisor.host.manager] Host information reload completed
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.CORE
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.PLUGIN
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.SUPERVISOR
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
21-11-24 20:16:04 INFO (MainThread) [supervisor.resolution.fixups.store_execute_reset] Reset corrupt Store: core
21-11-24 20:16:05 INFO (MainThread) [supervisor.store.git] Cloning add-on https://github.com/home-assistant/addons repository
21-11-24 20:18:05 ERROR (MainThread) [supervisor.store.git] Can't clone https://github.com/home-assistant/addons repository: Cmd('git') failed due to: exit code(128)
  cmdline: git clone -v --recursive --depth=1 --shallow-submodules https://github.com/home-assistant/addons /data/addons/core
  stderr: 'Cloning into '/data/addons/core'...
fatal: unable to access 'https://github.com/home-assistant/addons/': HTTP/2 stream 1 was not closed cleanly before end of the underlying stream
'.
21-11-24 20:18:05 INFO (MainThread) [supervisor.resolution.module] Create new issue IssueType.FATAL_ERROR - ContextType.STORE / core
21-11-24 20:18:05 INFO (MainThread) [supervisor.resolution.fixups.store_execute_remove] Remove invalid Store: core
21-11-24 20:18:05 ERROR (MainThread) [supervisor.store.repository] Can't remove built-in repositories!
21-11-24 20:18:05 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
21-11-24 20:18:05 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
21-11-24 20:54:37 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
21-11-24 20:54:41 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
21-11-24 21:01:28 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
21-11-24 21:01:28 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-11-24 21:01:28 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running


回复

使用道具 举报

1

主题

35

帖子

326

积分

中级会员

Rank: 3Rank: 3

积分
326
金钱
291
HASS币
0
发表于 2021-11-16 13:31:30 | 显示全部楼层
这玩意自己写一个不就好了,用CSS混光切好的图加polygon clip path画点击部分,api直接调用hass的websocket
回复

使用道具 举报

0

主题

25

帖子

557

积分

高级会员

Rank: 4

积分
557
金钱
532
HASS币
0
发表于 2021-11-16 13:38:34 | 显示全部楼层
期待有小白教程,自己搞了好久都没成功
回复

使用道具 举报

12

主题

193

帖子

1120

积分

论坛积极会员

积分
1120
金钱
927
HASS币
0
 楼主| 发表于 2021-11-16 20:20:47 | 显示全部楼层
ChristianSwift 发表于 2021-11-16 13:31
这玩意自己写一个不就好了,用CSS混光切好的图加polygon clip path画点击部分,api直接调用hass的websocket ...

我现在连floorplan都没有安装成功,不知道错误出现在哪里。
回复

使用道具 举报

12

主题

193

帖子

1120

积分

论坛积极会员

积分
1120
金钱
927
HASS币
0
 楼主| 发表于 2021-11-24 21:06:16 | 显示全部楼层
本帖最后由 lijun9701 于 2021-11-24 21:08 编辑

还没有解决呢。
回复

使用道具 举报

0

主题

45

帖子

485

积分

中级会员

Rank: 3Rank: 3

积分
485
金钱
440
HASS币
0
发表于 2022-1-17 22:27:14 | 显示全部楼层
type: custom:floorplan-card
config:
  image: /local/floorplan/myhome/我的家.svg
  stylesheet: /local/floorplan/myhome/myhome1.css
  defaults:
    hover_action: hover-info
    tap_action: more-info
    hold_action: more-info
    action: toggle
  rules:
    - entities:
        - switch.sonoff_10012cba15_2
        - switch.sonoff_10012cba15_1
        - light.sonoff_1000fc832c
        - switch.sonoff_100124d353_1
        - switch.sonoff_100124d353_2
        - switch.can_ting_deng
        - switch.sonoff_10013d3ebe_1
        - switch.sonoff_100124d525_2
        - switch.sonoff_100124d525_1
        - light.ec4d3eda59e2_light
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/li2_${entity.state}.svg
      tap_action: toggle
    - entities:
        - sensor.wei_sheng_jian_wen_shi_du_temperature
        - sensor.0x158d0002009ac0_temperature
        - sensor.a4c13813e29c_temperature
        - sensor.wen_du
        - sensor.shui_wen
      state_action:
        - action: call-service
          service: floorplan.text_set
          service_data: >-
            ${(entity.state !== undefined) ? Math.round(entity.state * 10) / 10
            + "℃" : "unknown"}
        - service: floorplan.class_set
          service_data:
            class: static-temp
    - entities:
        - sensor.wei_sheng_jian_wen_shi_du_humidity
        - sensor.0x158d0002009ac0_humidity
        - sensor.a4c13813e29c_humidity
        - sensor.shi_du
      state_action:
        - action: call-service
          service: floorplan.text_set
          service_data: ${entity.state }%
        - service: floorplan.class_set
          service_data:
            class: static-temp
    - entities:
        - light.xiao_mi_tai_deng
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/taideng_${entity.state}.svg
      tap_action: toggle
    - entities:
        - script.1638165553527
        - script.1638165602593
        - script.1638094387338
        - switch.ricoh_tou_ying_yi
      state_action:
        - action: call-service
          service: floorplan.image_set
      tap_action: toggle
    - entities:
        - device_tracker.zj
        - device_tracker.zyl
        - device_tracker.lqj
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/home_${entity.state}.svg
    - name: Rooms
      entities:
        - entity: switch.sonoff_10012cba15_2
          element: area.keting
        - entity: switch.sonoff_10012cba15_1
          element: area.keting1
        - entity: light.ec4d3eda59e2_light
          element: area.canting
        - entity: switch.sonoff_100124d353_1
          element: area.wode
        - entity: switch.sonoff_100124d353_2
          element: area.wode1
        - entity: switch.sonoff_100124d525_2
          element: area.zyl
        - entity: switch.sonoff_100124d525_1
          element: area.zyl1
        - entity: switch.sonoff_10013d3ebe_1
          element: area.beicewoshi
      tap_action: toggle
      state_action:
        service: floorplan.class_set
        service_data: '${(entity.state === "on") ? "light-on" : "light-off"}'
    - name: Rooms1
      entities:
        - entity: light.sonoff_1000fc832c
          element: area.ketingbideng
        - entity: switch.ec4d3ec2565d_outlet
          element: area.switch.ec4d3ec2565d_outlet
        - entity: climate.xiao_mi_kong_diao_ban_lu
          element: area.kongtiao
        - entity: device_tracker.ricoh
          element: area.touyin
      tap_action: toggle
      state_action:
        service: floorplan.class_set
        service_data: '${(entity.state === "off") ? "light-on" : "light-off" }'
    - entities:
        - device_tracker.ricoh
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/投影仪_${entity.state}.svg
    - entity: switch.sonoff_10012cba15_1
      tap_action: false
      state_action:
        action: call-service
        service: floorplan.class_set
        service_data:
          class: '${(entity.state === "on") ? "spinning" : ""}'
    - entities:
        - switch.kai_guan
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/kg_${entity.state}.svg
      tap_action: toggle
    - name: Rooms2
      entities:
        - entity: device_tracker.ricoh
          element: area.touyin
        - entity: device_tracker.ricoh
          element: area.switch.ricoh_tou_ying_yi
      tap_action: toggle
      state_action:
        service: floorplan.class_set
        service_data: '${(entity.state === "not_home") ? "light-on" : "light-off" }'
    - entity: switch.sonoff_10012cba15_1
      tap_action: false
      state_action:
        action: call-service
        service: floorplan.class_set
        service_data:
          class: '${(entity.state === "on") ? "spinning" : ""}'
回复

使用道具 举报

0

主题

45

帖子

485

积分

中级会员

Rank: 3Rank: 3

积分
485
金钱
440
HASS币
0
发表于 2022-1-17 22:28:42 | 显示全部楼层
没有图形化,我试着用上面的代码能用一部分功能,但动画还没成功。
回复

使用道具 举报

7

主题

144

帖子

1018

积分

金牌会员

Rank: 6Rank: 6

积分
1018
金钱
874
HASS币
0
发表于 2022-10-28 17:04:14 | 显示全部楼层
最近也在玩ha-floorplan,但不像config-template-card,如果一个房间里有多个灯,就不能把几盏灯灯效果进行叠加,不知有人想到好办法了吗?
回复

使用道具 举报

0

主题

45

帖子

485

积分

中级会员

Rank: 3Rank: 3

积分
485
金钱
440
HASS币
0
发表于 2023-7-17 23:32:29 | 显示全部楼层
现在能实现部分动画了,比如转动、隐藏、呼吸效果等。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-20 03:57 , Processed in 0.052428 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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