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

 找回密码
 立即注册
查看: 2896|回复: 5

[技术探讨] cnk700i大佬插件havcs探讨

[复制链接]

1

主题

11

帖子

65

积分

注册会员

Rank: 2

积分
65
金钱
54
HASS币
0
发表于 2021-8-21 19:07:29 | 显示全部楼层 |阅读模式
本帖最后由 a937287837 于 2021-8-21 19:10 编辑

首先还是比较感谢大佬的开发,让小度、天猫精灵这些可以顺利接入HASS目前刚刚升级了Home Assistant 2021.8.6,使用的是小度平台,授权都正常,但是发现不了设备(只有一个小米WIFI插座),日志里面提示401,是不是大佬的插件和新版本不兼容,上个日志和配置大家帮忙看看

日志
2021-08-21 18:47:22 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration havcs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-08-21 18:47:22 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-08-21 18:47:28 INFO (MainThread) [custom_components.havcs] [init] havcs enable "http mode"
2021-08-21 18:47:28 DEBUG (MainThread) [custom_components.havcs] [init] havcs only run in http mode, skip mqtt initialization
2021-08-21 18:47:28 DEBUG (MainThread) [custom_components.havcs] [init] ha_url = https://localhost:8123, base_url = https://localhost:8123
2021-08-21 18:47:28 INFO (MainThread) [custom_components.havcs] [init] havcs initialization finished.
2021-08-21 18:47:32 INFO (MainThread) [custom_components.havcs] loading settings from file
2021-08-21 18:47:32 DEBUG (MainThread) [custom_components.havcs] [post-task] load new platform entry set()
2021-08-21 18:47:32 DEBUG (MainThread) [custom_components.havcs] [post-task] remove old platform entry set()
2021-08-21 18:47:32 INFO (MainThread) [custom_components.havcs] [post-task] import havcs.dueros
2021-08-21 18:47:32 INFO (MainThread) [custom_components.havcs] loading device info from file
2021-08-21 18:47:32 DEBUG (MainThread) [custom_components.havcs.http] [http] check accessibility from local, base_url = https://localhost:8123
2021-08-21 18:47:32 INFO (MainThread) [custom_components.havcs] [service] ------------dueros 平台加载设备信息------------
[{'device_id': 'havcs.switch01', 'entity_id': ['switch.cha_zuo'], 'type': 'switch', 'name': 'xiaomi', 'zone': 'Bedroom', 'properties': [{'entity_id': 'switch.cha_zuo', 'attribute': 'power_state'}], 'actions': ['turn_on', 'turn_off']}]
2021-08-21 18:47:32 INFO (MainThread) [custom_components.havcs] [service] ------------dueros 平台加载设备信息------------

2021-08-21 18:47:32 DEBUG (MainThread) [custom_components.havcs.http] [http][check] aouth service is running: url = https://localhost:8123/havcs/auth/authorize, status = 401
2021-08-21 18:47:35 ERROR (MainThread) [custom_components.hacs] tellerbop/havistapool - Repository is archived.
再来个配置
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
  ssl_certificate: /home/pi/ssl_keys/xx.xxx.xxx.pem
  ssl_key: /home/pi/ssl_keys/xx.xxx.xxx.key
  login_attempts_threshold: 10
  ip_ban_enabled: true
  use_x_forwarded_for: true
  trusted_proxies:
    - 117.185.18.0/24
    - 127.0.0.1
    - ::1

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
homeassistant:
  name: xx.xxx.xxx
  latitude: xxxxx
  longitude: xxxx
  elevation: 315
  unit_system: metric
  currency: CNY
  time_zone: "Asia/Shanghai"
  external_url: "https://xx.xxx.xxx:5001"
havcs:
  platform: 
    - dueros 
  http:
    clients:
      duerosxxx:  xxxxxx
      aligenie_ignore: ignore 
    expire_in_hours: 24  
  device_config: ui
logger:
  default: error 
  logs:           
    custom_components.havcs: debug


回复

使用道具 举报

76

主题

1369

帖子

1万

积分

元老级技术达人

积分
19569
金钱
18160
HASS币
290
发表于 2021-8-21 21:33:11 | 显示全部楼层
这个我也遇到过,去年时升级到解决嵌套问题后的版本,我用小度接入的就出现不能发现设备的问题。后来发现注释掉一条规则过滤的语句就正常了。
前段时间升级了最新版本havcs,还是一样的,当时在作者QQ群中也说了,但好像其他人并没有这个情况,而且论坛中这么久了,快一年了,也从无人提出过同样问题。一直怀疑是我的设置有问题。
回复

使用道具 举报

1

主题

11

帖子

65

积分

注册会员

Rank: 2

积分
65
金钱
54
HASS币
0
 楼主| 发表于 2021-8-22 08:21:53 | 显示全部楼层
dscao 发表于 2021-8-21 21:33
这个我也遇到过,去年时升级到解决嵌套问题后的版本,我用小度接入的就出现不能发现设备的问题。后来发现注 ...

你的现在正常还是
回复

使用道具 举报

76

主题

1369

帖子

1万

积分

元老级技术达人

积分
19569
金钱
18160
HASS币
290
发表于 2021-8-22 08:46:00 | 显示全部楼层
a937287837 发表于 2021-8-22 08:21
你的现在正常还是

每次更新了都要注释掉两句就正常。最新版修改后的,你可以试一下。

havcs.zip

1.85 MB, 下载次数: 195

回复

使用道具 举报

1

主题

11

帖子

65

积分

注册会员

Rank: 2

积分
65
金钱
54
HASS币
0
 楼主| 发表于 2021-8-22 09:34:35 | 显示全部楼层
dscao 发表于 2021-8-22 08:46
每次更新了都要注释掉两句就正常。最新版修改后的,你可以试一下。

用了你的配置果然可以了,每次都要注释哪两句呀
回复

使用道具 举报

4

主题

48

帖子

1888

积分

金牌会员

Rank: 6Rank: 6

积分
1888
金钱
1835
HASS币
20
发表于 2021-8-23 16:26:34 | 显示全部楼层
本帖最后由 ttt105 于 2021-8-23 16:27 编辑
dscao 发表于 2021-8-22 08:46
每次更新了都要注释掉两句就正常。最新版修改后的,你可以试一下。

按你的方法,困扰了我快一个月的问题总算解决了,
感谢感谢!!

也是和楼主一样的疑问,是注释了哪两行实现的?

回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-6-1 07:35 , Processed in 0.057380 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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