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

Presence detection for tp link eap225 #8322

Merged

Conversation

Projects
None yet
8 participants
@alexrockt
Copy link
Contributor

commented Jul 3, 2017

Description:

Support for presence detection with TP-Link EAP225.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

alexrockt added some commits Jul 1, 2017

@mention-bot

This comment has been minimized.

Copy link

commented Jul 3, 2017

@alexrockt, thanks for your PR! By analyzing the history of the files in this pull request, we identified @michaelarnauts, @fabaff and @mKeRix to be potential reviewers.

fabaff and others added some commits Jul 3, 2017

@balloob

balloob approved these changes Jul 7, 2017

@balloob balloob merged commit ed5d104 into home-assistant:dev Jul 7, 2017

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
cla-bot Everyone involved has signed the CLA
hound No violations found. Woof!
@balloob

This comment has been minimized.

Copy link
Member

commented Jul 7, 2017

Nice! 🐬

@andrey-git

This comment has been minimized.

Copy link
Contributor

commented Jul 7, 2017

This PR reverted changes in snips.py and broke lint check:

************* Module homeassistant.components.snips
R:111, 4: Method could be a function (no-self-use)
@balloob

This comment has been minimized.

Copy link
Member

commented Jul 7, 2017

Yeah my bad, I fixed it.

@balloob balloob referenced this pull request Jul 13, 2017

Merged

0.49 #8468

@maikelwever

This comment has been minimized.

Copy link
Contributor

commented Jul 15, 2017

This PR seems to introduce an exception causing other tp-link device backends not to be queried because this new one fails.

Solution: add .encode('utf') like the other backends have:
password_md5 = hashlib.md5(self.password.encode('utf')).hexdigest().upper()

Traceback:

ERROR:homeassistant.components.device_tracker:Error setting up platform tplink
Traceback (most recent call last):
File "/home/homeassistant/home-assistant/homeassistant/components/device_tracker/__init__.py", line 151, in async_setup_platform
platform.get_scanner, hass, {DOMAIN: p_config})
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self  # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/home-assistant/homeassistant/components/device_tracker/tplink.py", line 39, in get_scanner
scanner = cls(config[DOMAIN])
File "/home/homeassistant/home-assistant/homeassistant/components/device_tracker/tplink.py", line 63, in __init__
self.success_init = self._update_info()
File "/home/homeassistant/home-assistant/homeassistant/util/__init__.py", line 303, in wrapper
result = method(*args, **kwargs)
File "/home/homeassistant/home-assistant/homeassistant/components/device_tracker/tplink.py", line 394, in _update_info
password_md5 = hashlib.md5(self.password).hexdigest().upper()
TypeError: Unicode-objects must be encoded before hashing

maikelwever added a commit to maikelwever/home-assistant that referenced this pull request Jul 16, 2017

Fix TP-Link device tracker regression since 0.49
This regression was introduced by home-assistant#8322.

Fix is to utf encode the password like the other TP-Link backends do.

@maikelwever maikelwever referenced this pull request Jul 16, 2017

Merged

Fix TP-Link device tracker regression since 0.49 #8497

1 of 1 task complete

balloob added a commit that referenced this pull request Jul 16, 2017

Fix TP-Link device tracker regression since 0.49 (#8497)
* Fix TP-Link device tracker regression since 0.49

This regression was introduced by #8322.

Fix is to utf encode the password like the other TP-Link backends do.

* Fix linting issue introduced in previous commit

Commit in question: 677f3fb

balloob added a commit that referenced this pull request Jul 24, 2017

Fix TP-Link device tracker regression since 0.49 (#8497)
* Fix TP-Link device tracker regression since 0.49

This regression was introduced by #8322.

Fix is to utf encode the password like the other TP-Link backends do.

* Fix linting issue introduced in previous commit

Commit in question: 677f3fb

dethpickle added a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017

Presence detection for tp link eap225 (home-assistant#8322)
* Added support for TP-Link EAP 225

* code style changes

* more code style changes

* more understandable variable name

* Added support for TP-Link EAP 225

* code style changes

* more code style changes

* more understandable variable name

* Fix pylint issue (home-assistant#8325)

* Added support for TP-Link EAP 225

* code style changes

* more code style changes

* more understandable variable name

* Added support for TP-Link EAP 225

* code style changes

* Update snips.py

dethpickle added a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017

Fix TP-Link device tracker regression since 0.49 (home-assistant#8497)
* Fix TP-Link device tracker regression since 0.49

This regression was introduced by home-assistant#8322.

Fix is to utf encode the password like the other TP-Link backends do.

* Fix linting issue introduced in previous commit

Commit in question: 677f3fb

@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.