@Musicman247 i’ve done that… i don’t get zha_events I get what I posted originally. “Event state_changed…”
Ah, I see. Looks like you’re cutting off the second half of the call, though. What comes after the “entity_id” portion? That’s probably where the actual command value is. Can you post the whole debug message?
2019-01-31 12:06:37 DEBUG (MainThread) [bellows.uart] Data frame: b’1556b1ed542e14a059954b25ab5592bd629c22e512316f936ecc3689dd7f3f799f7e’
2019-01-31 12:06:37 DEBUG (MainThread) [bellows.uart] Sending: b’82503a7e’
2019-01-31 12:06:37 DEBUG (MainThread) [bellows.ezsp] Application frame 69 (incomingMessageHandler) received
2019-01-31 12:06:37 DEBUG (MainThread) [zigpy.zcl] [0x4e05:1:0x0012] ZCL request 0x000a: [[<Attribute attrid=85 value=<zigpy.zcl.foundation.TypeValue object at 0x7f8b30b62e48>>]]
2019-01-31 12:06:37 DEBUG (MainThread) [zigpy.zcl] [0x4e05:1:0x0012] Attribute report received: 85=1
2019-01-31 12:06:37 DEBUG (MainThread) [homeassistant.components.zha.sensor] Attribute updated: 85 1
2019-01-31 12:06:49 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=zha.zha_lumi_lumi_sensor_switch_aq3_01b978b6, old_state=<state zha.zha_lumi_lumi_sensor_switch_aq3_01b978b6=online; nwk=0x4e05, ieee=00:15:8d:00:01:b9:78:b6, lqi=255, rssi=-45, friendly_name=buttonx1 @ 2019-01-31T11:42:48.002321-05:00>, new_state=<state zha.zha_lumi_lumi_sensor_switch_aq3_01b978b6=online; nwk=0x4e05, ieee=00:15:8d:00:01:b9:78:b6, lqi=254, rssi=-46, friendly_name=buttonx1 @ 2019-01-31T11:42:48.002321-05:00>>
2019-01-31 12:06:49 WARNING (MainThread) [homeassistant.helpers.condition] Value cannot be processed as a number: <state zha.zha_lumi_lumi_sensor_switch_aq3_01b978b6=online; nwk=0x4e05, ieee=00:15:8d:00:01:b9:78:b6, lqi=254, rssi=-46, friendly_name=buttonx1 @ 2019-01-31T11:42:48.002321-05:00> (Offending entity: )
2019-01-31 12:06:49 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140235794515224] Sending {‘id’: 2, ‘type’: ‘event’, ‘event’: {‘event_type’: ‘state_changed’, ‘data’: {‘entity_id’: ‘zha.zha_lumi_lumi_sensor_switch_aq3_01b978b6’, ‘old_state’: <state zha.zha_lumi_lumi_sensor_switch_aq3_01b978b6=online; nwk=0x4e05, ieee=00:15:8d:00:01:b9:78:b6, lqi=255, rssi=-45, friendly_name=buttonx1 @ 2019-01-31T11:42:48.002321-05:00>, ‘new_state’: <state zha.zha_lumi_lumi_sensor_switch_aq3_01b978b6=online; nwk=0x4e05, ieee=00:15:8d:00:01:b9:78:b6, lqi=254, rssi=-46, friendly_name=buttonx1 @ 2019-01-31T11:42:48.002321-05:00>}, ‘origin’: ‘LOCAL’, ‘time_fired’: datetime.datetime(2019, 1, 31, 17, 6, 49, 2999, tzinfo=), ‘context’: {‘id’: ‘4b6b259de50047d78175c5eb279ee88a’, ‘user_id’: None}}}
Notice the 10 second delay as well
Is this you just pressing the button once or is it twice like a double-click?
Anyone have the Tradfri motion sensor working? I get entities but the binary sensor never activates with motion…
I managed to get a hive dimmable bulb and an ikea bulb paired easilly they work well. I paired a xiaomi aquar temp and humidity the sensor the little round one, it reports temp and humidity fine. Not so sucessfuly an ikea 5 button dimmer it reports battery level and as a binary switch but it does not give any events so does not do anything usefull. An aqara humon body sensor i got paired it shows as a binary switch but never changes from off so again pretty uselsee. And finally i tried to paired a aqara single wireless switch wxkg03lm and no joy with that one. Running ha 0.86.4 in docker on an odroid hc1 wuth a xbee s2c. On a few occasions trying to add the aqara devices messed up the zigbee.db and i had to delete it and re start. And i get various error messages in the logs from either zigpy and zigpy_xbee
@techoguy
Is the colour transisition still an issue for you?
I recently had this issue with Hue globes and found the cause is ZHA in Home Assistant sending the colour command before the On command, which means the colour command while the light is OFF is ignored (as per ZCL specs).
I have raised an issue and one of the devs helped me by making a custom zha light py file that sends the colour command after the on command and the transitions work as expected with that.
I used the work around you used also, but note that brightness = 0 would actually be the same as an off command. It would need to be a brightness = 1 (or for some hue globes, brightness =2, as some take 1 as off).
Great to know! I don’t use colors much so it hasn’t been an issue or something I look into.
I have been playing around with a couple Xiaomi Aqara devices on HA 0.86. (1 Door Sensor, 1 Motion Sensor).
When I first pair them they seem to work great. The show everything they are supposed to although I don’t think the battery level is accurate. The issue I am having though is after a day or two they seem to drop off the network and stop responding and need to be repaired. Anyone else having this issue?
Yes, I have two Xiaomi Aquara door sensors and I’m experiencing the same issue. They drop off the network and the ZHA entity changes to offline. One sensor has been dropping ever 3 to 12 hours, the other sensor made it a few days before dropping offline.
I assume this is due to the Xiaomi devices being so picky about the parent devices.
Any ideas @dmulcahey?
Full log with ZHA debugging enabled:
logger:
default: info
logs:
bellows.ezsp: debug
bellows.zigbee.application: debug
bellows.uart: debug
homeassistant.components.zha: debug
zigpy: debug
zigpy.application: debug
zigpy.zdo: debug
It’s a common issue with Xiaomi devices. There are a few routers that hold them well. Google it and you’ll find info. I’ll post links to the info I have after work this evening.
Thanks! I hadn’t looked at your code yet but I assumed it was doing something clever with keep alives or timeouts to keep the sensors online - is there something we can modify at the bellows level to make these more stable?
not that I know of. The devices are aged out by the stack not bellows / zigpy.
Here are the resources I spoke of (2 posts on the same thread):
I have several of the sylvania smart plugs from link 2 and they do a really good job keeping the Xiaomi sensors online. Just make sure to read the notes on the model #'s
I see a local store has these plugs in stock and on clearance… I hope they are the right model.
Let me know what the price is.
$25 CDN so about 32 cents american with the current exchange rate…
the repeaters listed in this post supposedly work as well.
Nice to know. They have the bulbs on sale too so I might pick up a couple of those as well.
So a question about the devices that do not work as repeaters for xiaomi. Is having them going to cause issues? Like is the device going to try and connect to one of these devices and then die anyway even if I buy a compatible repeater?