ZHA Zigbee Tested Devices...Please add your device results

I am also using the osram gateway and HUSBZB. I too see intermittent issues with lights using the HUSBZB but the gateway seems to be fairly reliable minus losing wifi from time to time.

I had LOTS of issues with my HUSBZB when I was running HASSIO on my pi 3b + but I moved it over to a SFF I5 HP desktop when I got the rare chance of picking it up for free. After moving over to that, MOST of my issues went away. I still see odd times when a single device does not respond to a command that was sent, but I think its either the HUSBZB itself (Firmware maybe?) or interference from Wifi and or my Osram Zigbee gateway.

The biggest downfall on the gateway is that all devices on it seem to have issues with their state when a device is controlled from HA instead of the gateway itself.

Basically any of the below “on” states where it shows off for a brief time is a false state. The lights were actually on but reported off and happens over and over until I control it from the lightify switch or app itself.
image

It’s not a huge deal but it does throw wrenches through any automation (node-red) that checks the state of the lights due to the potential for an incorrect state.

When I had a lot of issues with my HUSBZB setup on the RPI3B+, deleting the home-assistant.db file did cause it to run must more stable-y until it built back up in size, when it would start failing again.

My upgrade from the RPI was to an Intel i5-8400, 8GB RAM, 16GB Intel Optane, 1TB HDD, so a pretty significant upgrade (I’m planning on loading Blue Iris onto this computer as some point). But it runs very well so far.

I think the problem with a large db size, is that when home assistant goes to purge older data, it can be deleting a large amount of rows which can tie up with disk.

The solution for me was to exclude certain domains/devices from your recorder.

I posted this somewhere else, but here are the two queries I run to figure out what is taking up all the space with the recorder. I was very surprised to see what was on top.

entities:
select count(state_id) as count, entity_id from states group by entity_id order by count asc;

domains:
select count(state_id) as count, domain from states group by domain order by count asc;

2 Likes

How do you run those queries?

I think I may have stumbled on something. I deleted my db last night around 7 pm as it was over 3GB and so far had no issues. At that time yesterday I had 2 lights showing unavailable so I just reset them and re added them to HA. I now have a full compliment of lights. I deleted the db and restarted HA. Let’s see what happens over the next few days.

for me it is:
sqlite3 /mnt/homeassistant/hass/home_assistant_v2.db

Then paste the query there.

sqlite> select count(state_id) as count, domain from states group by domain order by count asc;
1|input_select
1|zone
8|persistent_notification
63|script
132|alarm_control_panel
149|cover
243|lock
280|switch
486|light
499|climate
683|person
1074|device_tracker
1149|automation
14959|binary_sensor
23579|sensor

This is my recorder entry in configuration.yaml

recorder:
  purge_keep_days: 14
  purge_interval: 1
  exclude:
    domains:
      - group
      - zha
      - zwave
      - weather
      - input_boolean
      - camera
    entities:
      - sun.sun
      - sensor.kitchen_lamp_power
      - sensor.front_wall_lights_power
      - automation.ifttt_webhook
      - automation.kitchen_camera_motion_off
      - automation.nursery_camera_motion_off
      - automation.living_room_camera_motion_off
      - automation.garage_camera_motion_off
      - automation.front_camera_motion_off
      - binary_sensor.home_security_motion

Do I just open a terminal window and paste the above ?

Out of curiosity, if any ZHA reliability issues can truly be traced back to database size, have any of you tried switching from SQLite to MySQL as the db backend? It’s the first thing I do on new HA installations, as I’ve found the performance to be significantly better. (I have about 70 Z-wave devices.) Official instructions are in the recorder component docs.

1 Like

This looks interesting but I have no clue how to do this, I am still very much learning HA

It is probably a little to early to say definitively if the size if the db had anything to do with my Zigbee issues but for the last 28 hours since I deleted the db I haven’t had a single issue.

You watch I will probably wake up and all 28 lights will be unavailable lol

I lost another light this morning at 8:27 am

image

I checked the home-assistant.log but nothing shows at that time

2019-05-17 08:27:20 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.gym_light is taking over 10 seconds
2019-05-17 08:27:20 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hallway_2 is taking over 10 seconds
2019-05-17 08:27:51 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hallway_1 is taking over 10 seconds

Around 8:47 am I see this in the log

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/bellows/zigbee/application.py”, line 344, in request
res = await asyncio.wait_for(req.send, timeout=APS_ACK_TIMEOUT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()

What hardware are you running on?
What radio are you using?

Getting async timeout in that line, usually means the radio is not responding for whatever reason. However without debug logs hard to make any guesses. BTW, have you tried collecting the logs and post those to HA issue you’ve opened?

You would just open the terminal, but you need to paste the command but modify it for the location of your home_assistant_v2.db. It’s not going to be in the same location as mine.

Significantly better it terms of zha working more reliably? Or is the logging and history panel faster?

I haven’t given it a go yet, but may try it tonight.

I have HA running on an HP Elite 8200 (i5 2500, 4GB RAM & 128 SSD) Linux Mint with a HUSBZB stick

I thought about updating the issue I opened but there seemed to be more activity here about the same issue and I didn’t want to have multiple posts

Only logging and history panel, and general responsiveness of the UI and back-end (though this is a completely unscientific analysis). I don’t have ZHA set up on my main system; I only have a smattering of environmental sensors, which I have talking through Zigbee2mqtt.

As I test I installed a clean version of Linux Mint and the latest version of HA (0.93.2) on an old Dell D630 laptop

I have done nothing else other than re add all of my 28 lights using the HUSBZB stick. I did this nearly 24 hours ago and so far I haven’t had a single light become unavailable. I was also getting a ton of sensor errors relating to the tuneable & RGB lights. Maybe something was corrupt with my other HA instance. The other thing I have noticed is that I can now restart HA and not have any issues with all the ZHA components. On my other HA instance I would have to restart my PC to make sure the Zigbee component worked. Hopefully things will settle, if all is good for the next few days I will do a fresh install on my actual HA machine.

I thought I would share my results

I’m trying to get some Aqara devices working with ZHA, but somewhat stuck. I’m using ELELabs USB stick on a NUC running Hass.io on a NUC. Questions…

  1. I assume ZHA Quirks is included in the current version of Hass.io? Or do I need to install it somehow?
  2. I got the one of the button’s paired, but not really sure how to use it. It is showing as an entity “[binary_sensor.lumi_lumi_sensor_switch_aq2_xxxxxxxx_x]” but I can’t seem to use it and it isn’t registering pushes.
  3. I tried to pair a wireless dual light switch, but that doesn’t seem to be in the supported list for ZHA Quirks. Does anyone have them working?

Quirks are installed. Aqara buttons not possible to use as binary sensors, because of the way they send updates. Search this thread on how to use ZHA events.

1 Like

Anyone tried xiaomi wired switch without the neutral wire in us? It mentiones 220v and I couldn’t find a 110v. Do they work at 110v at all?

Hi, do you mind me asking how do you pull all the supported attributes from the device using bellows?