Closed madface303 closed 2 years ago
@madface303 Can you post the device signature? Without it, we can't really help much.
Oh sorry, i'm really new to this.
{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0107",
"in_clusters": [
"0x0000",
"0x0001",
"0x0003",
"0xfcc0"
],
"out_clusters": [
"0x0003",
"0x0019",
"0xfcc0"
]
}
},
"manufacturer": "LUMI",
"model": "lumi.motion.ac02",
"class": "zigpy.device.Device"
}
Is it that what you need?
Yes, that's what I need 😄. Your device is a bit weird, may need a bit of testing. Try if this custom quirk works for your device: motion_ac02.zip How to install custom quirk: https://github.com/zigpy/zha-device-handlers/discussions/693#discussioncomment-857274
Thank you very much. Just tried but it doesn't work. I have to pair it twice (the first time it hangs at the initialize stage in HA). There are now 2 new sensors (ias_zone and occupancy, i know the from my old aqara motion sensors), but non of them changes if there is motion.
Did you check if the quirk applies? Did you get some error in the logs?
@madface303 Does the battery status work?
@MattWestb Do you know something about this? The device is very weird, it doesn't have a OccupancySensing
input cluster, could it be the information is handled via the manufacturer cluster 0xFCC0
?
Xiaomi / Aquara is having there own protocol they is using for some functions but i have dot digging in it but you can looking in the xiaomi and aquara quirk folder and i think you is finding most in the init and also in other devices how they have doing all things we knowing (Xiaomi was one large PITA before tuya was taking over with there MCU devices).
@Tropaion No, there is a battery sensor but it's state is unknown. I attached a picture of the entities in HA. I think the quirk applied because in ZHA Interface i can see 'motion_ac02.MotionT1' Debug Logs of the pairing process is attached too
@madface303 I looks like this will be trial and error. Since this device is similar to an already existing one, lets try this first: motion_ac02.zip
Thank you very much, but unfortunately it is also not working. Now i have another sensor with illumance which has 302lx and is not changing like other sensors.
I found another thread for this device for Zigbee2MQTT. I do not know much about zigbee behind the scenes, maybe it can help you? https://github.com/Koenkk/zigbee2mqtt/issues/11990
And do you need logfiles from me again? Thanks for your help!
Btw, this devices is working with zigbee2mqtt. Hopefully this issue can provide some information you'll find helpful: https://github.com/Koenkk/zigbee2mqtt/issues/11990
Noob question... How does this update get pulled in to zha?
The sensor isn't supported yet. If it's supported eventually, the update will arrive through a normal Home Assistant Core update.
(It's also possible to temporarily install a custom quirk when it's done, but that can break stuff too.)
Hi, what is the status? I've just bought the device and I am also familar with python. I could help develop it further, if needed?
There is a or open in draft. Everything works except the configuration
My signature looks a bit different, so I am posting it, too:
{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0107",
"in_clusters": [
"0x0000",
"0x0001",
"0x0003",
"0x0400",
"0x0406",
"0x0500",
"0xfcc0"
],
"out_clusters": [
"0x0003",
"0x0019",
"0xfcc0"
]
}
},
"manufacturer": "LUMI",
"model": "lumi.motion.ac02",
"class": "motion_ac02.LumiMotionAC02"
}
Hrm… there must be a mode setting for these then. I tried the well known one and it didn’t work… maybe I did something wrong. Does yours just work??
I added the motion_ac02.py
from your draft PR and added it to the /config/custom_zha_quirks/ folder, changed the configuration.yaml to load it and restarted hass.
zha:
custom_quirks_path: /config/custom_zha_quirks/
See the screenshot in the PR. ias_zone, illuminance and occupancy looks ok, but the battery is not displayed properly. Sensors are looking good and seem to work.
My quirk won’t apply to your device. So that means yours works ootb.
Never mind… you posted the signature after the quirk was applied
I am a bit confused now. Did I apply your quirk now or not?
Btw, battery is also displayed now. Looks good.
Yes you did.
FWIW, I installed the custom quirk, which is getting picked up by ZHA, and the device pairs, but doesn't work. I see the following:
And this happens even if I press the physical button to wake it up, and no matter what I waive in front of the sensor itself. There's also "Identify: Press" which does nothing, and 2 unshown diagnostic entities. I've paired and re-paired a few times with the same results. I have NOT cleared pycache as I'm not sure if that will mess up the working devices, but will try if that's necessary.
FWIW, I installed the custom quirk, which is getting picked up by ZHA, and the device pairs, but doesn't work. I see the following:
- Power: unknown
- ias_zone: Clear
- Occupancy: Clear
And this happens even if I press the physical button to wake it up, and no matter what I waive in front of the sensor itself. There's also "Identify: Press" which does nothing, and 2 unshown diagnostic entities. I've paired and re-paired a few times with the same results. I have NOT cleared pycache as I'm not sure if that will mess up the working devices, but will try if that's necessary.
What is your coordinator? For TI / Conbee you NEED to be on the latest firmwares or the device will not communicate w/ the network
@dmulcahey I'm using the Nortek HubZ USB stick (HUSBZB-1). It's not perfect, but I have a lot of other Aqara devices paired with it successfully.
And what version of HA?
And what version of HA?
2022.4.7
Have you done anything with custom deps or anything wacky? I’m also using a Nortek stick and it just works once quirked. I’m out of ideas…
Nope. Nothing. I'm running Home Assistant in Docker on Synology, and have HACS with some repositories, but nothing that should impact ZHA. This is the ONLY custom quirk I have installed. I have been trying to figure out if the Nortek is on the latest firmware, but I've only had it a handful of months and it said it was the latest when I got it... Should I be trying to update that... would I use the instructions here ( https://github.com/walthowd/husbzb-firmware)?
On Mon, May 2, 2022 at 5:28 PM David F. Mulcahey @.***> wrote:
Have you done anything with custom deps or anything wacky? I’m also using a Nortek stick and it just works once quirked. I’m out of ideas…
— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/1498#issuecomment-1115387904, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB74P7CUIZ2CM5UEGEWYW7DVIBCJJANCNFSM5TQSSGQQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Lee Milstein | @.*** | 917-509-9237
UPDATE: I deleted the custom quirk and folder along with the reference to the zha folder in the config. Then restarted ha twice. Then downloaded the quirk again and started fresh with install and pairing... It worked! It never reached the screen with the yellow and green icons, but the sensors are working when I look at the device or entities in developer tools or configuration devices.
I can't set sensitivity levels, but this is already fantastic!
@dmulcahey Amazing work you're doing. Do you have a new zip of the custom quirk you'd like us to test?
The quirk from @Tropaion looks pretty good to me as well.
Even the illuminance sensor seems to work for me.
Just like @LCMilstein the sensitivity levels would be amazing, no idea what that takes to get to work though.
@dmulcahey Amazing work you're doing. Do you have a new zip of the custom quirk you'd like us to test?
The linked PR has the current code. This device may require a HA change for the custom interval support… I have it working just not sure if I like it
@dmulcahey Amazing work you're doing. Do you have a new zip of the custom quirk you'd like us to test?
The linked PR has the current code. This device may require a HA change for the custom interval support… I have it working just not sure if I like it
Apologies for the dumb question, but I am only somewhat technical and not super familiar with the capabilities here on GitHub... I have gone to your pull request, but when I click on the second link, it just takes me to a description page; there's no file there to download. Am I supposed to copy the code and save it to a file using my editor directly? Has the .zip file you linked to above been updated so I can just download that again (even though it has the same name it did before your latest additions)? OR should I just wait until it gets incorporated into HA's update in a future release?
I installed the linked P1 quirk and was successfully using the P1 to trigger LED lights when entering a room. This was with HA OS 7.6 installed.
This morning, I upgraded to HA OS 8.0 and now the P1 will not initiate the automations. The P1 still shows correctly detecting motion, but the automations no longer start. Nothing else in the system changed other than allowing the OS upgrade.
If I trigger the P1 such that it shows "detected", I can manually run the automations and they function properly. However, as mentioned above, the P1 will not trigger the automations "automatically". I edited the automations to re-search/reconnect with the P1 but no joy.
Any thoughts?
I installed the linked P1 quirk and was successfully using the P1 to trigger LED lights when entering a room. This was with HA OS 7.6 installed.
This morning, I upgraded to HA OS 8.0 and now the P1 will not initiate the automations. The P1 still shows correctly detecting motion, but the automations no longer start. Nothing else in the system changed other than allowing the OS upgrade.
If I trigger the P1 such that it shows "detected", I can manually run the automations and they function properly. However, as mentioned above, the P1 will not trigger the automations "automatically". I edited the automations to re-search/reconnect with the P1 but no joy.
Any thoughts?
Nothing on our end can cause that.
hi, watching this thread closely cause I have a few of the P1s in the box, and waiting for the official integration in ZHA (sorry, I know that doesn't help). But have you tried checking automation trace to be sure if it’s a trigger or condition issue? Also, check the HA logs at around the time where the automation sould have worked.
Anto79-ops - good suggestions on trace and David was correct, there was not anything in the update that caused the problem - just something dumb I did. So much to learn - thank you both for responding so quickly.
quick question for those using the quirk, there was a request for the light detection (lux) part to operate without the motion. Is this working in the quirk and if so, how often does the light sensor report? thanks!
As of this time, the light detection seems tied to the motion sensor. When motion is detected, the lux value updates. I could not see any lux updates in my system between motion detection occurrences.
After over a week of usage, I'm finding 2 challenges with the version of the device so far:
I got 2 of these today. Added 1 to ZHA without issues but indeed it shows nothing, no motion and battery status unknown. Looking forward to seeing this been added to ZHA and configurable.
I removed and readded this device after the official release. There are entities called opple_cluster, which I've rather determined what they are, but detection time doesn't seem to do anything, I don't know what the "switch" does (it auto resets after a fixed period of time) and no lux indictator. Whassup?
@Jeppedy There seems to be a bug where the lux sensor currently doesn't initialize, so it won't work for now.
Regarding changing the settings: you'll need to change the setting (detection interval, sensitivity or the trigger LED) and then immediately press the button on the motion sensor once, so it updates the setting.
You'll find out what configuration entity does what at the end of the entity name/id by default.
I found a workaround for the detection interval setting change not taking effect. If I use the developer setting page to change the setting it stays. Yet to test if it’s taking effect or not.
Best regards, Karthik. https://karthiks.in Sent from my iPhone
On Jun 3, 2022, at 1:28 AM, TheJulianJES @.***> wrote:
@Jeppedy There seems to be a bug where the lux sensor currently doesn't initialize, so it won't work for now.
Regarding changing the settings: you'll need to change the setting (detection interval, sensitivity or the trigger LED) and then immediately press the button on the motion sensor once, so it updates the setting.
You'll find out what configuration entity does what at the end of the entity name/id by default.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
It should also work that way. I'm able to properly use the configuration setting for the detection interval. Just have to press the button on the sensor shortly after hitting enter/clicking out of the field/changing the number.
Yup - you’re correct. Something dumb on my part…. 😞. So much to learn….
Sorry for the false alarm and thanks for all the effort you are putting into HA. It’s a STEEP learning curve, but so much better than others products in the market.
Best regards, Bobby Hobbs
On May 16, 2022, at 11:46 AM, David F. Mulcahey @.***> wrote:
I installed the linked P1 quirk and was successfully using the P1 to trigger LED lights when entering a room. This was with HA OS 7.6 installed.
This morning, I upgraded to HA OS 8.0 and now the P1 will not initiate the automations. The P1 still shows correctly detecting motion, but the automations no longer start. Nothing else in the system changed other than allowing the OS upgrade.
If I trigger the P1 such that it shows "detected", I can manually run the automations and they function properly. However, as mentioned above, the P1 will not trigger the automations "automatically". I edited the automations to re-search/reconnect with the P1 but no joy.
Any thoughts?
Nothing on our end can cause that.
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fzigpy%2Fzha-device-handlers%2Fissues%2F1498%23issuecomment-1127959693&data=05%7C01%7C%7C81d610c758874dd6ac7708da37640d6d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637883200105181905%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vXtKjlUxauOdi7R9KFQtMoT1HT%2BmHMwob7K2bOpgiOM%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEDOGIEGULHXXPEGLLXCVWLVKKCYRANCNFSM5TQSSGQQ&data=05%7C01%7C%7C81d610c758874dd6ac7708da37640d6d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637883200105181905%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=fWNDd29JXVfFfEfacSP6GVycia%2FEgrORteUfKMikXDI%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Kind of defeats the purpose of having it use a web Ui without having to be physically next to the device when changing config
Best regards, Karthik. https://karthiks.in Sent from my iPhone
On Jun 3, 2022, at 6:18 AM, TheJulianJES @.***> wrote:
It should also work that way. I'm able to properly use the configuration setting for the detection interval. Just have to press the button on the sensor shortly after hitting enter/clicking out of the field/changing the number.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
Hi,
Latest HA ZHA stock uses "Quirk: zhaquirks.xiaomi.aqara.motion_ac02.LumiMotionAC02" and everything worked fine with the original fw ver 6 that the device come with.
There was only a GUI issue where the GUI shows the led indicator off in the GUI, but it's always on after ZHA pairing.
Writing "0" by hand in the motion indicator attribute in the "manage zigbee device" menu works around the led GUI issue.
Then I had the idea to test ZHA OTA, sending the update request from zha-toolkit made ZHA upload the fw version 10, but with version 10 the whole OppleCluster seem to have stopped working so I cannot turn off the led indicator on motion anymore.
I had to commit the qcow2 image into its base, restart the VM with a new qcow2 cow, edit this file in /mnt/merged/ like this:
diff --git a/zigpy/zcl/clusters/general.py b/general.py
index 5cf05dc..a4d1b9f 100644
--- a/zigpy/zcl/clusters/general.py
+++ b/general.py
@@ -1873,6 +1873,7 @@ class Ota(Cluster):
should_update = img.should_update(
manufacturer_id, image_type, current_file_version, hardware_version
)
+ should_update=True
self.debug(
"OTA image version: %s, size: %s. Update needed: %s",
img.version,
@@ -1887,7 +1888,7 @@ class Ota(Cluster):
foundation.Status.SUCCESS,
img.key.manufacturer_id,
img.key.image_type,
- img.version,
+ 11,
img.header.image_size,
tsn=tsn,
)
@@ -1933,7 +1934,7 @@ class Ota(Cluster):
img = await self.endpoint.device.application.ota.get_ota_image(
manufacturer_id, image_type, model
)
- if img is None or img.version != file_version:
+ if img is None:
self.debug("OTA image is not available")
await self.image_block_response(foundation.Status.ABORT, tsn=tsn)
return
ha core restart
Then issue the ZHA Toolkit: ota_notify again.
Finally shutdown the VM and delete the qcow2 cow, create a new fresh cow from the untouched base, and start the VM,( to rollback the above patch).
The OppleCluster works again now on the fw ver 6, so I could turn off the led again which I really don't like to flash by night, the sensitivity setting also works again.
I guess one should be more careful with the OTA updates, but at least I managed to downgrade.
Is your feature request related to a problem? Please describe. The Sensor is recognized by ZHA but there is no motion sensor (only power, lqi and rssi, power and rssi have state unknown)
Link to product https://www.aqara.com/en/product/motion-sensor-p1
Describe the solution you'd like Use it with home assistant ;)
Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.