-
Notifications
You must be signed in to change notification settings - Fork 498
Aqara-FP2: Add error handling and modify offline logic #2235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: hdlee27 <[email protected]>
Signed-off-by: hdlee27 <[email protected]>
Signed-off-by: hdlee27 <[email protected]>
@@ -108,6 +112,7 @@ end | |||
|
|||
function discovery.do_network_discovery(driver, _, should_continue) | |||
log.info_with({ hub_logs = true }, string.format("discovery start for Aqara FP2")) | |||
processing_devices = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be removed or was it intended to be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback. I have removed this variable. Please review it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this was being used and was just a file scoped variable which I think might have caused some confusion. It looks like this was guarding against multiple try add device attempts so I am unsure if this is actually okay to remove or not.
…ocess Signed-off-by: hdlee27 <[email protected]>
Signed-off-by: hdlee27 <[email protected]>
@@ -100,7 +100,7 @@ local function discovery_device(driver) | |||
break | |||
end | |||
end | |||
if (not processing_devices[dni]) and (not is_already_added) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this will cause a lot of extra device added messages from the driver to the cloud if we have already started adding the device to the platform, but the hub hasn't gotten the device record from the platform yet. Why is the processing_devices
not needed anymore? It seems like its purpose is to prevent sending multiply try_create_device
requests, which seems like something that we want to do.
…overy process" This reverts commit 3cbed4b.
Signed-off-by: hdlee27 <[email protected]>
Signed-off-by: hdlee27 <[email protected]>
@cjswedes @NoahCornell And when the connection was not good in the market, there was an issue that it did not appear to be The first patch was simply a modification to initialize However, there is a side effect concern as you mentioned, so I modified Please review it again including the new commit. |
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests
Verified operation with 3 FP2 devices connected at the same time to: