home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.62k stars 30.78k forks source link

ZHA is broken in 0.118.0b0 #43120

Closed danielbrunt57 closed 4 years ago

danielbrunt57 commented 4 years ago

The problem

ZHA is no longer working correctly. I fiddled with it for a while and I'm not seeing any of my light entities, only motion and power. I.e. I removed and re-paired my Osram Lightify A19 Tunable White bulb and I only see the power measurement entity and not the light.

Environment

Installation Type | Home Assistant Supervised Version | 0.118.0b0 Development | false Virtual Environment | false Python Version | 3.8.6 Docker | true CPU Architecture | x86_64 Timezone | America/Vancouver Operating System Name | Linux Operating System Version | 4.19.0-12-amd64 Supervisor | 2020.11.0 Home Assistant OS | Debian GNU/Linux 10 (buster) Docker | 19.03.13 Chassis | desktop

Problem-relevant configuration.yaml

Not relevant IMO but here you go...

####################################################################
# Configure a default setup of Home Assistant (frontend, api, etc) #
####################################################################
default_config:

homeassistant:
  customize: !include customize.yaml
  packages: !include_dir_named packages/

# Integrations
logger:
  default: info
  logs:
    custom_components.entity_controller: debug
    homeassistant.components.nest: debug
    homeassistant.components.nest.sensor_sdm: debug
    google.cloud.pubsub_v1: debug
    google.cloud.pubsub_v1.subscriber._protocol.leaser: debug

#logger:
#  default: critical
#  logs:
#    custom_components.entity_controller.fireplace_light_coontrol: debug

#logger:
#  default: info
#  logs:
#    homeassistant.core: debug
#    homeassistant.components.zha: info
#    bellows.zigbee.application: info
#    bellows.ezsp: info
#    zigpy: info
#    zigpy_cc: info
#    zigpy_deconz.zigbee.application: info
#    zigpy_deconz.api: info
#    zigpy_xbee.zigbee.application: info
#    zigpy_xbee.api: info
#    zigpy_zigate: info
#    zhaquirks: info

alert:
  garage_door:
    name: Garage is open
    done_message: Garage is closed
    entity_id: binary_sensor.ecolink_garage_door_tilt_sensor_sensor
    state: 'on'
    repeat: 30
    can_acknowledge: true
    skip_first: false
    notifiers:
      - pushover
  front_door:
    name: Motion at Front Door
    done_message: Front Door motion cleared
    entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_a2154d04_ias_zone
    state: 'on'
    repeat: 30
    can_acknowledge: true
    skip_first: false
    notifiers:
      - pushover
api:

bhyve:
  username: !secret bhyve_username
  password: !secret bhyve_password

camera:
  - platform: environment_canada
  - platform: mjpeg
    name: Foscam
    still_image_url: http://192.168.1.90/snapshot.jpg?user=hassio&pwd=cal3ndar
    mjpeg_url: http://192.168.1.90/videostream.cgi?rate=0
    verify_ssl: false

#circadian_lighting:
#    min_colortemp: 2700
#    max_colortemp: 6000

climate:

#device_tracker:
#  - platform: bluetooth_tracker

frontend:
  themes: !include_dir_merge_named themes

#homeseer:
#  host:  192.168.1.103
#  http_port: 8080
#  ascii_port: 11000
#  username: hassio
#  password: hassio
#  location_names: False
#  allow_events: False

# PLM configuration variables
insteon:
  port: /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0

media_player:
  # Use the Python ADB implementation
  - platform: androidtv
    name: Bedroom TV
    host: 192.168.1.87

mqtt:
  discovery: true
  discovery_prefix: homeassistant

notify: !include notify.yaml

recorder:
  purge_keep_days: 5
  exclude:
    domains:
      - automation
      - updater
    entity_globs:
      - sensor.weather_*
    entities:
      - sun.sun # Don't record sun data
      - sensor.last_boot # Comes from 'systemmonitor' sensor platform
      - sensor.date
    event_types:
      - call_service # Don't record service calls

rest_command:
  reload_nest:
    url: http://192.168.1.104:8123/api/config/config_entries/entry/c405dc2ac4877d2764048bb541fed931/reload
    method: POST
    headers:
      authorization: !secret ha_api_token

setter:

sonoff:
  username: !secret sonoff_username
  password: !secret sonoff_password

stream:

tts:
  - platform: google_translate

wake_on_lan:

weather:
  - platform: environment_canada
    name: Richmond
    station: BC/s0000862
    forecast: hourly

webostv:
  host: 192.168.1.170
  name: Living Room TV
  turn_on_action:
    service: wake_on_lan.send_magic_packet
    data:
      mac: 38:8c:50:b4:1f:30
      broadcast_address: 192.168.1.255

alexa: !include alexa.yaml
automation: !include automations.yaml
binary_sensor: !include binary_sensors.yaml
cover: !include covers.yaml
group: !include groups.yaml
nest: !include nest.yaml
scene: !include scenes.yaml
script: !include scripts.yaml
sensor: !include sensors.yaml
switch: !include switches.yaml
entity_controller: !include entity_controller.yaml

Traceback/Error logs

Command failed: ssh -F /config/ssh_config -i /config/ssh_config/id_rsa pi@192.168.1.101 'cat /sys/class/thermal/thermal_zone0/temp' 2>/config/ssh_command.log
5:58:08 PM – command_line (ERROR) - message first occurred at 5:43:08 PM and shows up 12 times
Failed to send request AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0xEEE0), DstEndpoint=3, DstPanId=0x0000, SrcEndpoint=1, ClusterId=768, TSN=56, Options=<TransmitOptions.RouteDiscovery|APSAck: 48>, Radius=30, Data=b'\x00\x38\x00\x07\x00'): Status.MAC_NO_ACK
5:50:30 PM – /usr/local/lib/python3.8/site-packages/zigpy_znp/zigbee/application.py (WARNING) - message first occurred at 5:44:41 PM and shows up 36 times
Unable to find referenced entities light.osram_lightify_a19_tunable_white_ef4a0900_level_light_color_on_off
5:47:10 PM – helpers/service.py (WARNING)
Configuration error! State Entity ('NoneType' object has no attribute 'state') does not exist. Please check for spelling and typos.
5:47:10 PM – Entity Contoller (ERROR)
Received an unhandled command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=8)
5:44:43 PM – /usr/local/lib/python3.8/site-packages/zigpy_znp/api.py (WARNING) - message first occurred at 5:44:43 PM and shows up 2 times
Exception in functools.partial(<function async_add_entities at 0x7f414b609670>, <bound method EntityPlatform._async_schedule_add_entities of <EntityPlatform domain=light platform_name=zha config_entry=<homeassistant.config_entries.ConfigEntry object at 0x7f415828e2c0>>>, [(<class 'homeassistant.components.zha.light.Light'>, ('b0:ce:18:14:03:01:6c:90-1', <homeassistant.components.zha.core.device.ZHADevice object at 0x7f4156870f70>, [<homeassistant.components.zha.core.channels.general.OnOffChannel object at 0x7f414a932370>, <homeassistant.components.zha.core.channels.general.LevelControlChannel object at 0x7f414a9323a0>, <homeassistant.components.zha.core.channels.lighting.ColorChannel object at 0x7f414a9323d0>])), (<class 'homeassistant.components.zha.light.Light'>, ('b0:ce:18:14:03:01:10:43-1', <homeassistant.components.zha.core.device.ZHADevice object at 0x7f414a932640>, [<homeassistant.components.zha.core.channels.general.OnOffChannel object at 0x7f414a932ca0>, <homeassistant.components.zha.core.channels.general.LevelControlChannel object at 0x7f414a932cd0>, <homeassistant.components.zha.core.channels.lighting.ColorChannel object at 0x7f414a932d00>])), (<class 'homeassistant.components.zha.light.Light'>, ('84:18:26:00:00:09:4a:ef-3', <homeassistant.components.zha.core.device.ZHADevice object at 0x7f414a944160>, [<homeassistant.components.zha.core.channels.general.OnOffChannel object at 0x7f414a9447c0>, <homeassistant.components.zha.core.channels.general.LevelControlChannel object at 0x7f414a9447f0>, <homeassistant.components.zha.core.channels.lighting.ColorChannel object at 0x7f414a944820>]))]) when dispatching 'zha_add_new_entities': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/zha/core/discovery.py", line 46, in async_add_entities to_add = [ent_cls(*args) for ent_cls, args in entities] File "/usr/src/homeassistant/homeassistant/components/zha/core/discovery.py", line 46, in <listcomp> to_add = [ent_cls(*args) for ent_cls, args in entities] File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 348, in __init__ if color_capabilities & CAPABILITIES_COLOR_TEMP: TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'
5:44:43 PM – util/logging.py (ERROR)
[0xCD98:1:0x0008]: 'async_initialize' stage failed: Expected SRSP response AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>), got AF.DataRequestExt.Rsp(Status=<Status.BUFFER_FULL: 17>)
5:44:43 PM – Zigbee Home Automation (WARNING) - message first occurred at 5:44:42 PM and shows up 2 times
You are using a custom integration for scheduler 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.
5:43:09 PM – loader.py (WARNING)
Configuration error! Override Entity ('NoneType' object has no attribute 'state') does not exist. Please check for spelling and typos.
5:43:08 PM – Entity Contoller (ERROR) - message first occurred at 5:43:08 PM and shows up 2 times

Additional information

probot-home-assistant[bot] commented 4 years ago

Hey there @dmulcahey, @adminiuga, mind taking a look at this issue as its been labeled with an integration (zha) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

Adminiuga commented 4 years ago

Can you go to Configuration -> Integration -> ZHA -> Devices, pick color light one by one and for each do the following:

  1. Manage clusters
  2. Pick color cluster - cluster id 0x0300
  3. read/get attribute value for color_capabilities attribute Do you get None for any of the lights for the color_capabilities attribute?
danielbrunt57 commented 4 years ago

I re-installed 118.0b0 after making a new snapshot of 117.6 and there's no issue now. The light entities are visible and working. Sorry for the worry!