Skip to content
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

[FP2] Offline event after reconnection attempt to prevent fake offline #1734

Closed
wants to merge 1 commit into from

Conversation

hdlee27
Copy link
Contributor

@hdlee27 hdlee27 commented Nov 8, 2024

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

If the socket connection is lost due to the router settings, etc., an offline event has been raised.
This causes confusion by posting a fake offline event in a situation where reconnection is possible.
Therefore, after checking if reconnection is possible, it modifies offline to be raised only when reconnection is not possible.

Summary of Completed Tests

Registering devices in SmartThings Station, leaving them for more than the monitoring time, and checking for reconnection

Copy link

github-actions bot commented Nov 8, 2024

Channel deleted.

Copy link

github-actions bot commented Nov 8, 2024

Test Results

   64 files  ±0    400 suites  ±0   0s ⏱️ ±0s
1 993 tests ±0  1 993 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 433 runs  ±0  3 433 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit dfcd2a8. ± Comparison against base commit 8a36689.

Copy link

github-actions bot commented Nov 8, 2024

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against dfcd2a8

@apex22
Copy link

apex22 commented Nov 12, 2024

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

Still generates offline events, i.e...
WARN Aqara Presence Sensor device_manager.is_valid_connection : failed to connect to device, dni = xx:xx:xx:xx:xx:xx, err= wantread, status= nil
WARN Aqara Presence Sensor create_sse : invalid connection
ERROR Aqara Presence Sensor device_manager.update_status : failed to get status, dni= xx:xx:xx:xx:xx:xx, err= wantread, status= nil

@hdlee27 hdlee27 closed this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants