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

 找回密码
 立即注册
查看: 5153|回复: 3

[已解决] homekit里只有网关灯,不显示传感器

[复制链接]

4

主题

160

帖子

667

积分

高级会员

Rank: 4

积分
667
金钱
506
HASS币
0
发表于 2017-9-10 21:15:14 | 显示全部楼层 |阅读模式
本帖最后由 Al_Fred 于 2017-9-11 07:17 编辑

安装hassbian,然后将二代网关接入HA,但是homekit中只显示网关灯,不显示人体传感器、温湿度传感器。。但HASS里有。

已经解决,忘记在HB-HA插件config.json中"supported_types"添加 "binary_sensor", "sensor",真是大失误,哈哈哈。。感谢myron412
configuration.yaml配置文件
homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 36.68524
  longitude: 117.1772
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 93
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: [url=http://en.wikipedia.org/wiki/List_of_tz_database_time_zones]http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[/url]
  time_zone: Asia/Shanghai
  # Customization file
  customize: !include customize.yaml

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

http:
  # Uncomment this to add a password (recommended!)
  # api_password: PASSWORD
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  # base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# [url=https://home-assistant.io/blog/2016/10/25/explaining-the-updater/]https://home-assistant.io/blog/2016/10/25/explaining-the-updater/[/url]
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Track the sun
sun:

# Weather prediction
sensor:
  - platform: yr

# Text to speech
tts:
  - platform: google

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

xiaomi:
  gateways:
      - mac: F0B429CC08E9
        key: 93945111658C425B

light:
  - platform: yeelight
    devices:
      192.168.50.100: 
        name: Living Room 2
        transition: 1000
        save_on_change: True 

customize.yaml配置文件
binary_sensor.motion_sensor_158d000171bd41:
  friendly_name: 客厅人体感应器
  homebridge_hidden: false

light.gateway_light_f0b429cc08e9:
  friendly_name: 客厅小夜灯
  homebridge_hidden: false

light.living_room_2:
  friendly_name: 卧室吸顶灯
  homebridge_hidden: false

sensor.humidity_158d00016feb03:
  friendly_name: 客厅湿度
  homebridge_hidden: false

sensor.temperature_158d00016feb03:
  friendly_name: 客厅温度
  homebridge_hidden: false

config.json配置文件

    "bridge": {
        "name": "Homebridge",
        "username": "B8:27:EB:FD:0C:42",
        "port": 51826,
        "pin": "123-45-678"
    },

    "platforms": [
  {
    "platform": "HomeAssistant",
    "name": "HomeAssistant",
    "host": "http://192.168.50.65:8123",
    "password": "147159123",
    "supported_types": ["fan", "garage_door", "input_boolean", "light", "lock", "media_player", "rollershutter", "scene",$
    "default_visibility":"visible"
 }
    ]
}


log

2017-09-10 12:16:51 ERROR (Thread-11) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
2017-09-10 12:17:13 WARNING (Thread-2) [netdisco.ssdp] Error fetching description at 192.168.50.164
2017-09-10 12:18:20 ERROR (Thread-7) [homeassistant.components.light.yeelight] Flash supported currently only in RGB mode.
2017-09-10 12:43:46 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/selector_events.py", line 582, in _read_ready
    data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out


1.jpg
回复

使用道具 举报

7

主题

206

帖子

1037

积分

金牌会员

Rank: 6Rank: 6

积分
1037
金钱
830
HASS币
20
发表于 2017-9-10 21:57:47 | 显示全部楼层
看不懂,一起学习。你看看在配置文件里每个传感器下的homebridge_hidden: false是不是false?
回复

使用道具 举报

7

主题

206

帖子

1037

积分

金牌会员

Rank: 6Rank: 6

积分
1037
金钱
830
HASS币
20
发表于 2017-9-11 02:16:47 | 显示全部楼层
研究了下,应该是缺少插件或则config.json里缺少功能配置导致,具体怎么解决看大神的吧
回复

使用道具 举报

4

主题

160

帖子

667

积分

高级会员

Rank: 4

积分
667
金钱
506
HASS币
0
 楼主| 发表于 2017-9-11 07:16:20 | 显示全部楼层
myron412 发表于 2017-9-11 02:16
研究了下,应该是缺少插件或则config.json里缺少功能配置导致,具体怎么解决看大神的吧 ...

非常感谢您那么晚还一直帮我研究。。我也找到了,复制代码时,忘了在home bridge的config.json中"supported_types"添加 "binary_sensor", "sensor",那肯定就没有啦,谢谢!
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-22 21:13 , Processed in 0.123826 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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