8000 Presence detection for tp link eap225 by alex-ruehe · Pull Request #8322 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Presence detection for tp link eap225 #8322

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

Merged
merged 18 commits into from
Jul 7, 2017
Merged

Presence detection for tp link eap225 #8322

merged 18 commits into from
Jul 7, 2017

Conversation

alex-ruehe
Copy link
Contributor
@alex-ruehe alex-ruehe 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

@mention-bot
Copy link

@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.

@balloob balloob merged commit ed5d104 into home-assistant:dev Jul 7, 2017
@balloob
Copy link
Member
balloob commented Jul 7, 2017

Nice! 🐬

@andrey-git
Copy link
Contributor

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
Copy link
Member
balloob commented Jul 7, 2017

Yeah my bad, I fixed it.

@balloob balloob mentioned this pull request Jul 13, 2017
@maikelwever
Copy link
Contributor

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
This regression was introduced by home-assistant#8322.

Fix is to utf encode the password like the other TP-Link backends do.
balloob pushed a commit that referenced this pull request Jul 16, 2017
* 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 pushed a commit that referenced this pull request Jul 24, 2017
* 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 pushed a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017
* 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 pushed a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 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.

* 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0