SmartThingsCommunity / SmartThingsEdgeDrivers

Apache License 2.0
259 stars 446 forks source link

[Aqara] Presence Sensor FP2 #1546

Open seojune79 opened 1 month ago

seojune79 commented 1 month ago

Check all that apply

Type of Change

Checklist

Description of Change

Summary of Completed Tests

github-actions[bot] commented 1 month ago

Duplicate profile check: Passed - no duplicate profiles detected.

github-actions[bot] commented 1 month ago

Invitation URL: https://bestow-regional.api.smartthings.com/invite/d429GXaPoyjo

github-actions[bot] commented 1 month ago

Test Results

   62 files    375 suites   0s :stopwatch: 1 822 tests 1 822 :white_check_mark: 0 :zzz: 0 :x: 3 146 runs  3 146 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 640f0667.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 1 month ago

Minimum allowed coverage is 90%

Generated by :monkey: cobertura-action against 640f0667a413440b9674c6adc6228d57c2f236fc

varzac commented 1 month ago

For LAN devices we need to include a search-parameters.yml to allow the hub to only start the driver if there is a matching device on the network.

varzac commented 1 month ago

I have an FP2 so I decided to try to discover it. Currently I am just getting:

2024-07-29T16:17:20.207227119Z TRACE aqara-presence-sensor  try_add_device : dni= ***, ip= 192.168.1.146
2024-07-29T16:17:24.910038642Z ERROR aqara-presence-sensor  get_credential : ip = 192.168.1.146, failed to get token, error = closed
2024-07-29T16:17:24.915560443Z ERROR aqara-presence-sensor  credential is nil
2024-07-29T16:17:24.927665159Z ERROR aqara-presence-sensor  failed to get credential. dni= ***, ip= 192.168.1.146

I made sure to update the FP2 to the latest firmware, but if there is anything else needed to test let me know.

seojune79 commented 1 month ago

For LAN devices we need to include a search-parameters.yml to allow the hub to only start the driver if there is a matching device on the network.

I added it.

seojune79 commented 1 month ago

I have an FP2 so I decided to try to discover it. Currently I am just getting:

2024-07-29T16:17:20.207227119Z TRACE aqara-presence-sensor  try_add_device : dni= ***, ip= 192.168.1.146
2024-07-29T16:17:24.910038642Z ERROR aqara-presence-sensor  get_credential : ip = 192.168.1.146, failed to get token, error = closed
2024-07-29T16:17:24.915560443Z ERROR aqara-presence-sensor  credential is nil
2024-07-29T16:17:24.927665159Z ERROR aqara-presence-sensor  failed to get credential. dni= ***, ip= 192.168.1.146

I made sure to update the FP2 to the latest firmware, but if there is anything else needed to test let me know.

You'll need to use the firmware that will be released in August to enroll in the SmartThings Hub. If you need that firmware, please let me know the information below in the Aqara Home app.

You give me the information and our developers will request Equipment diagnosis permission application authorization. You'll have to approve it. After that, our developers will update your FP2 to that firmware.(FP2 must be online to be updated.)

How to connect to your SmartThings hub after the FP2 firmware update.

  1. The FP2 must be enrolled in the Aqara Home app.
  2. The SmartThings hub and FP2 must be connected to the same network.
  3. Your SmartThings hub must have the current driver installed.
  4. "Scan nearby" in the SmartThings app and the FP2 will register with the SmartThings hub.
lelandblue commented 1 month ago

@seojune79 Can you please clarify, what testing have you completed to date? I noticed this was missing from the original message in this PR, can you please add or share more details?

seojune79 commented 1 month ago

@seojune79 Can you please clarify, what testing have you completed to date? I noticed this was missing from the original message in this PR, can you please add or share more details?

We tested with Samsung to ensure that the following events are handled the same as in the Aqara Home app. (Settings can only be made in the Aqara Home app, and depending on the setting, the same event will occur in both the Aqara Home app and the SmartThings app.)

lelandblue commented 1 month ago

@tpmanley or @varzac Could you review the latest commit when you get a chance and let me know if this review is good to proceed? Thank you.

varzac commented 1 month ago

One issue I ran into was I edited the names of my Zones last week, however when looking today I see that the names have reverted to Zone 1, Zone 2, Zone 3. I don't know if that is due to ongoing development or something else.

tpmanley commented 1 month ago

One issue I ran into was I edited the names of my Zones last week, however when looking today I see that the names have reverted to Zone 1, Zone 2, Zone 3. I don't know if that is due to ongoing development or something else.

I saw this too and reproduced it by rebooting my hub. The first multipleZonePresence.zoneState event generated after the reboot had the default "zone1" name again.

seojune79 commented 1 month ago

One issue I ran into was I edited the names of my Zones last week, however when looking today I see that the names have reverted to Zone 1, Zone 2, Zone 3. I don't know if that is due to ongoing development or something else.

Did it happen even though you didn't change the zone? If you experience that issue again, please share how to reproduce it.

seojune79 commented 1 month ago

One issue I ran into was I edited the names of my Zones last week, however when looking today I see that the names have reverted to Zone 1, Zone 2, Zone 3. I don't know if that is due to ongoing development or something else.

I saw this too and reproduced it by rebooting my hub. The first multipleZonePresence.zoneState event generated after the reboot had the default "zone1" name again.

Thanks. I've reproduced the issue on my FP2, I'll check it out.

seojune79 commented 4 weeks ago

One issue I ran into was I edited the names of my Zones last week, however when looking today I see that the names have reverted to Zone 1, Zone 2, Zone 3. I don't know if that is due to ongoing development or something else.

I saw this too and reproduced it by rebooting my hub. The first multipleZonePresence.zoneState event generated after the reboot had the default "zone1" name again.

I fixed it.

varzac commented 3 weeks ago

I did have my Zone names disappear again. Otherwise the device has been working great for me. I don't know how the zone names were lost I just opened up the app and they were gone. There was a hub firmware update so there was a hub reboot. But I did re-name them and manually reboot the hub and the name persisted. Was the fix you added something that would only take affect the next time I named them?

seojune79 commented 2 weeks ago

Can someone let me know how this PR is going?

lelandblue commented 2 weeks ago

Can someone let me know how this PR is going?

Hey @seojune79 - @cjswedes just did a review of the new commit. Please feel welcome to review. As a result - This device will proceed through the WWST Certification process. I hope I have answered your question.

seojune79 commented 2 weeks ago

We made some code changes based on his comments.