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

Fix manual setup when roomba is on different subnet #54639

Merged
merged 8 commits into from Aug 22, 2021
Merged

Fix manual setup when roomba is on different subnet #54639

merged 8 commits into from Aug 22, 2021

Conversation

jorgror
Copy link
Contributor

@jorgror jorgror commented Aug 14, 2021

Proposed change

Fix an issue with manual setup of Roomba where it is not discovered automatically. Not my issue, but this describes exactly my setup and I have the same issue (#48180).

My solution does not solve the root cause of the bug, but it avoid it by using an alternative method for getting the name of the Roomba. The root cause of the issue is that name is not available in async_connect_or_timeout() in __init__.py line 88

A side effect of this fix is that we can also skip one (difficult) step in manual setup.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@project-bot project-bot bot added this to Needs review in Dev Aug 14, 2021
@probot-home-assistant
Copy link

Hey there @pschmitt, @cyr-ius, @shenxn, mind taking a look at this pull request as it has been labeled with an integration (roomba) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@MartinHjelmare MartinHjelmare changed the title Roomba fix issue with manual setup when roomba is on different subnet Fix manual setup when roomba is on different subnet Aug 15, 2021
@jorgror
Copy link
Contributor Author

jorgror commented Aug 20, 2021

Changing this will increase the chance the roomba is missed because it is won't be long enough for the device to see the discovery request due to its sleep patterns.

I have reverted this commit as I was not aware of this.

Does not require manual input of BLID
Will also get name, which has a side effect of skipping validate_input() which fail setup of my roomba.
I think the setup issue was discovered in #48180
This does not solve the root cause of the issue which is that name is not available in async_connect_or_timeout() in __init__.py line 88
Updated translations to remove BLID description.
…o much"

This reverts commit 6e27bb6dfc38524e513bd09a5cc22042dbf51f83.
Remove BLID as this input is not required anymore
Patch with _mocked_discovery to find device and BLID
Change name of found robot as we use _mocked_discovery to find name (the main reason for this change)
@bdraco bdraco self-requested a review August 21, 2021 13:43
Co-authored-by: J. Nick Koston <nick@koston.org>
Copy link
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and working 👍

I think it just needs black and should be good to go.

@frenck
Copy link
Member

frenck commented Aug 21, 2021

Ran black.

Copy link
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Dev automation moved this from Needs review to Reviewer approved Aug 21, 2021
@bdraco bdraco merged commit b942454 into home-assistant:dev Aug 22, 2021
Dev automation moved this from Reviewer approved to Done Aug 22, 2021
@jorgror jorgror deleted the roomba-manual-setup-fix branch August 22, 2021 06:39
raman325 added a commit to raman325/home-assistant that referenced this pull request Aug 22, 2021
* upstream/dev: (52 commits)
  Add zigbee connection for wemo bridge lights (home-assistant#53813)
  Use EntityDescription - ring (home-assistant#55023)
  Add support for bridge accessory unavailability (home-assistant#52207)
  Fix P1 Monitor requirement in manifest (home-assistant#55027)
  Improve device trigger type hinting (home-assistant#54907)
  Use EntityDescription - openuv (home-assistant#55022)
  Add silver quality scale to goalzero (home-assistant#53299)
  Add Binary Sensor for WeMo Insight & Maker (home-assistant#55000)
  Add state_class to relevant sensors in Danfoss Air (home-assistant#54847)
  Remove base_test from modbus test harness (home-assistant#55018)
  Add support for logger info in fronius integration (home-assistant#54795)
  Skip trying the pyudev observer when using standalone docker for usb (home-assistant#54987)
  Upgrade watchdog to 2.1.4 (home-assistant#54993)
  Upgrade apprise to 0.9.4 (home-assistant#55002)
  Fix incorrect power device class on energy sensors in Smappee (home-assistant#54994)
  Add missing BYN currency (home-assistant#55001)
  Fix manual setup when roomba is on different subnet (home-assistant#54639)
  [ci skip] Translation update
  Bump python-yeelight to 0.7.3 (home-assistant#54982)
  Upgrade PyTurboJPEG to 1.5.2 (home-assistant#54992)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants