Commit Graph

865 Commits (0173c61fee0726f01f77a5178457224d406881eb)

Author SHA1 Message Date
Fabian Affolter 13859388c1
Upgrade locationsharinglib to 2.0.7 (#14640) 2018-05-27 20:16:47 +02:00
Lorenz Schmid edfc54b2eb Added option to connect via SSL for OpenWRT(luci) device tracker (#14627)
* Added option to connect via HTTPS for OpenWRT(luci) device tracker

* Use string formatting

* Update quotes

* Remove whitespace
2018-05-26 09:51:21 +02:00
Fabian Affolter cc5edf69e3 Show warning if no locations are shared (fixes #14177) (#14511) 2018-05-18 09:04:47 +02:00
thelittlefireman f06a0ba373 Bump locationsharinglib to 2.0.2 (#14359)
* Bump locationsharinglib to 2.0.2

* Bump locationsharinglib to 2.0.2
2018-05-17 23:06:39 +02:00
Mike 144524fbbb Update hitron_coda.py (#14506)
missed a typo that wasn't caught with testing since I don't have a Rogers router.
2018-05-17 19:44:01 +02:00
Fabian Affolter 954e4796b8 Use ATTR_NAME from const.py (#14450) 2018-05-14 13:05:52 +02:00
Evgeniy 9c7523d7b0 Improving icloud device tracker (#14078)
* Improving icloud device tracker

* Adding config validations for new values

* Adding config validations for new values

* Moving icloud specific setup to platform schema. Setting default in platform schema.
2018-05-08 23:42:57 +02:00
Mike 48b13cc865 Update hitron_coda.py to fix login for Shaw modems (#14306)
I have a Hitron modem provided by Shaw communications rather than from Rogers as the Docs specify for this device_tracker but it seems like the api/code is all the same except that the login failed due to the password being passed as "pws" instead of "pwd". Making that one character change allowed HASS to read the connected device details from my Hitron modem. If this difference is actually one that stands between the Rogers-provided Hitron modems and the Shaw-provided variant, I am happy to create another device-tracker file for the Shaw modem. I just figured I would go with the simplest solution first.
2018-05-08 09:26:46 +02:00
Mathieu Velten ce98dfe395 Add support for tracking devices on Netgear access points (#13331)
* Netgear: add support for tracking devices on access points

* Netgear: add SSL support and autodetection
2018-05-02 09:38:24 -04:00
Paulus Schoutsen 83d300fd11 Custom component loading cleanup (#14211)
* Clean up custom component loading

* Fix some tests

* Fix some stuff

* Make imports work again

* Fix tests

* Remove debug print

* Lint
2018-05-01 20:57:30 +02:00
Otto Winter a4bf421044 Convert more files to async/await syntax (#14142)
* Move more files to async/await syntax

* Attempt Work around pylint bug

Using lazytox :P
2018-04-28 19:26:20 -04:00
Kane610 4b06392442 Zone component config entry support (#14059)
* Initial commit

* Add error handling to config flow
Change unique identifyer to name
Clean up hound comments

* Ensure hass home zone is created with correct entity id
Fix failing tests

* Fix rest of tests

* Move zone tests to zone folder
Create config flow tests

* Add possibility to unload entry

* Use hass.data instead of globas

* Don't calculate configures zones every loop iteration

* No need to know about home zone during setup of entry

* Only use name as title

* Don't cache hass home zone

* Add new tests for setup and setup entry

* Break out functionality from init to zone.py

* Make hass home zone be created directly

* Make sure that config flow doesn't override hass home zone

* A newline was missing in const

* Configured zones shall not be imported
Removed config flow import functionality
Improved tests
2018-04-26 17:59:22 -04:00
thelittlefireman ca29224846 Bump locationsharinglib to 1.2.2 (#14070)
* Bump locationsharinglib to 1.2.2

* Bump locationsharinglib to 1.2.2
2018-04-24 18:46:17 +02:00
Stijn Tintel 1fbc650871 device_tracker.ubus: catch ConnectionError (#14045)
When an OpenWrt device monitored via ubus is offline, this causes the
log to be flooded with several exceptions. Avoid this by catching
requests.exceptions.ConnectionError in addition to
requests.exceptions.Timeout.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2018-04-22 12:55:45 +02:00
Ryan Bahm c2bee496e2 Add Accuracy to Google Location Sharing (#14039)
* Update locationsharinglib to 1.2.1 and add accuracy.

* Change indents to match HA style
2018-04-22 08:42:18 +02:00
thelittlefireman ba7fccba34 Bump locationsharinglib to 1.2.1 (#13980)
* Bump locationsharinglib to 1.2.1

*  Bump locationsharinglib to 1.2.1
2018-04-18 15:59:48 -04:00
stephanerosi f11d4319d2 Fix typo an coding style (#13970) 2018-04-18 12:43:55 +02:00
ChristianKuehnel e472436b84 Add services for bmw_connected_drive (#13497)
* implemented services for bmw remote services

* added vin to attributes of tracker
* moved component to new package
* added service description

* fixed static analysis warnings

* implemented first set of code reviews

* removed locking related services

* fixed static analysis warnings

* removed excess blank lines

* refactoring of setup() to resolve warning
"Cell variable bimmer defined in loop (cell-var-from-loop)"

* added missing docstring

* added service to update all vehicles from the server

* implemented changes requested in code review

* added check if invalid vin is entered
2018-04-17 17:37:00 +02:00
Sebastian Muszynski add0afe31a Xiaomi MiIO Device Tracker: Unused variable removed (#13948)
* Unused variable removed and pinning added to be in sync with all xiaomi_miio components

* requirements_all.txt updated
2018-04-17 11:45:19 +02:00
Marco 86709427b6 Fixed Capsman data not being used (#13917) 2018-04-16 09:54:57 +02:00
stephanerosi 36a663adeb Add extra attributes for device scanner, Nmap and Unifi (IP, SSID, etc.) (#13673)
* Start of development

* Add extra attributes from unifi scanner

* Store IP of the device in the state attributes with nmap

* Allow not defining get_extra_attributes method in derived classes
2018-04-16 08:20:58 +02:00
Kyle Niewiada 2bff03836b Fix #13846 Double underscore in bluetooth address (#13884) 2018-04-15 13:59:10 +02:00
Toby Gray 978a79d369 device_tracker.ubus: Handle devices not running DHCP (#13579) 2018-04-10 20:38:36 +02:00
Paulus Schoutsen 5ac52b74e0
Remove vendor lookup for mac addresses (#13788)
* Remove vendor lookup for mac addresses

* Fix tests
2018-04-09 21:21:26 -04:00
PlanetJ 4008bf5611 Adding configration to disable ip address as a requirement Fixes: #13399 (#13692)
* Adding configration to disable ip address as a requirement Fixes: #13399

* Remove whitespace
2018-04-05 18:45:09 +02:00
shuaiger 63820a78d9 Fix asuswrt ap mode failure (#13693)
* fix asuswrt ap mode failure

When using ap mode, asuswrt device_tracker does dont work properly as ip can not be retrieved from wl command. This version fixed the issue.

* save 1 line code

* another 2 lines saved

* typo correction
2018-04-05 18:00:40 +02:00
Ville Skyttä 415af5e257 Spelling fixes (#13681) 2018-04-04 23:30:02 +02:00
Sebastian Muszynski 9ce4755f8a Xiaomi Mi WiFi Repeater 2 integration as device tracker (#13521)
* Xiaomi Mi WiFi Repeater 2 integration as device tracker

* Unused import removed

* python-miio version pinned

* Missing period added
2018-04-02 19:45:12 +02:00
Martin Hjelmare c8f2810fac Make mysensors updates and platform setup async (#13603)
* Use async updates but keep methods that interact with mysensors
  gateway thread, eg turn_on and turn_off, non async.
* Use Python 3.5 async syntax.
2018-04-01 08:36:26 -07:00
Frederik Bolding 7c99567b65 Added support for requesting RSSI values from Bluetooth devices (#12458)
* Added support for requesting RSSI values from Bluetooth devices

* Moved Bluetooth RSSI code to separate library and imported it

* Cleaned up tuple issues

* Changed concatination of mac addresses

* Changed string formatting to use new style

* Ran gen_requirements_all.py
2018-03-31 23:22:54 +02:00
Rene Nulsch 3b4faa74a0 Remove MercedesME component (#13538) 2018-03-31 15:10:56 +02:00
Michaël Arnauts 0f24fea6bb Google Maps location sharing device tracker (#12301)
* Google Maps location sharing device tracker.

* Use ConfigType and change debug logging to _LOGGER.debug()

* Update to locationsharinglib 0.3.0

* Remove unneeded lines.

* Use hass.config.path for config file location.

* Fixed remarks

* Return boolean in setup_scanner
2018-03-30 22:47:20 +02:00
ChristianKuehnel 979a8f8772 Fix BMW device tracker toggling state if vehicle tracking is disabled (#12999)
* if tracking is disabled, the position is not set in the device tracker.

This fixes an issue with a toggling vehicle state.

* removed useless attributes
2018-03-30 18:12:57 +02:00
Cedric Van Goethem a5ae77ab93 Add extra check for ESSID field in case there's a wired connection (#13459) 2018-03-25 18:03:23 -07:00
Beat 8ab5978db3 Fix encoding errors in mikrotik device tracker (#13464) 2018-03-25 18:02:21 -07:00
ChristianKuehnel 4d52875229 Update to new "b2vapi" of BMW ConnectedDrive (#13305)
* updated to new "b2vapi" of bimmer_connected

* updated requirements_all.txt

* updated 2 more vehicle names after rebase

* cleanup of import statements

* found one more broken name...

* removed unused constant

* cleanup of import statements 2
2018-03-24 12:16:49 +01:00
Paulus Schoutsen 456ff4e84b
Tado: don't reference unset hass var (#13237)
Tado: don't reference unset hass var
2018-03-15 13:53:59 -07:00
Paulus Schoutsen 56b3cb0583
Fix Tado doing async wrong (#13078)
* Fix Tado doing async wrong

* Remove last coroutine decorator
2018-03-11 12:33:07 -07:00
Matthias Urlichs f5cc40024d Rename homeassistant.util.async to .async_ (#13088)
"async" is (going to be) a reserved word.
2018-03-11 10:01:12 -07:00
Paulus Schoutsen a8a895a61b
allow ios device tracker see calls to go through (#13020) 2018-03-09 19:39:50 -08:00
mueslo 3ba19c52d5 Add consider_home and source_type to device_tracker.see service (#12849)
* Add consider_home and source_type to device_tracker.see service

* Use schema instead of manual validation

* Extend schema to validate all keys

* Fix style

* Set battery level to int
2018-03-08 23:57:21 -08:00
Ryan Mounce dc94079d74 Make ubus dhcp name resolution optional (#12658)
For the case that a separate DHCP server is used or the device is a dumb
WiFi access point, allow device name resolution to be disabled.
2018-03-06 19:16:18 +01:00
Paulus Schoutsen 3920de7119
Fix async method call in sync context (#12890) 2018-03-04 18:31:29 -08:00
Alan Tse 36e9f523d1 Adding additional switches and sensors for Tesla (#12241)
* Adding switch for maxrange charging and sensors for odometer and range

* Fixing style errors
2018-03-04 11:35:38 +01:00
Reed Riley 53078f3069 iCloud location tracking improvements (#12399)
* Add an error message when there are name collisions in iCloud

* Teach icloud component to set interval based on proximity to nearest zone.
2018-02-28 16:54:19 -08:00
Johann Kellerman 446390a8d1 AsusWRT log exceptions (#12668)
* logexception

* Improve err message #2978

* not quiet

* tests
2018-02-26 16:08:37 -08:00
ChristianKuehnel 316eb59de2 Add new component: BMW connected drive (#12277)
* first working version of BMW connected drive sensor

* extended coveragerc

* fixed blank line

* fixed pylint

* major refactoring after major refactoring in bimmer_connected

* Update are now triggered from BMWConnectedDriveVehicle.
* removed polling from sensor and device_tracker
* backend URL is not detected automatically based on current country
* vehicles are discovered automatically
* updates are async now

resolves:
* https://github.com/ChristianKuehnel/bimmer_connected/issues/3
* https://github.com/ChristianKuehnel/bimmer_connected/issues/5

* improved exception handing

* fixed static analysis findings

* fixed review comments from @MartinHjelmare

* improved startup, data is updated right after sensors were created.

* fixed pylint issue

* updated to latest release of the bimmer_connected library

* updated requirements-all.txt

* fixed comments from @MartinHjelmare

* calling self.update from async_add_job

* removed unused attribute "account"
2018-02-20 23:02:08 +01:00
Adam Mills 22a007a785
Bump aioautomatic to 0.6.5 for voluptuous 0.11 (#12480) 2018-02-17 14:13:27 -05:00
Paulus Schoutsen 3fd61d8f45 Update voluputous (#12463)
* Update voluputous

* Fix http config

* Fix optional with default=None

* Optional, default=none

* Fix defaults in voluptuous schemas

* Fix tests

* Fix update error

* Lint
2018-02-17 10:29:14 +01:00
Rene Nulsch 00ff305bd7 Fix MercedesMe - add check for unsupported features (#12342)
* Add check for unsupported features

* Lint fix

* change to guard clause
2018-02-12 21:07:20 -08:00
Mike O'Driscoll 52f57b755e Change Unifi SSID filtering to list comprehension (#12344)
Changed from filter to list comprehension.
2018-02-12 20:02:07 +01:00
Abílio Costa d34a4fb6e3 nmap_tracker: don't scan on setup (#12322)
* nmap_tracker: don't scan on setup

	A scan takes about 6 seconds so it delays HA from booting. Since
another scan is done by the device_tracker base component during setup,
there is no need to do two scans on boot.

* simplify setup
2018-02-12 08:52:00 +01:00
Albert Lee ebe4418afe device_tracker.asuswrt: Ignore unreachable ip neigh entries (#12201) 2018-02-11 23:24:29 -08:00
Mike O'Driscoll eaa2791539 Unifi tracking filter by SSID (#12281)
Enable unifi device tracker component to track devices only
on specific SSIDs.
2018-02-11 23:23:53 -08:00
Otto Winter 678f284015 Upgrade pylint to 1.8.2 (#12274)
* Upgrade pylint to 1.8.1

* Fix no-else-return

* Fix bad-whitespace

* Fix too-many-nested-blocks

* Fix raising-format-tuple

See https://github.com/PyCQA/pylint/blob/master/doc/whatsnew/1.8.rst

* Fix len-as-condition

* Fix logging-not-lazy

Not sure about that TEMP_CELSIUS though, but internally it's probably just like if you concatenated any other (variable) string

* Fix stop-iteration-return

* Fix useless-super-delegation

* Fix trailing-comma-tuple

Both of these seem to simply be bugs:
 * Nest: The value of self._humidity never seems to be used anywhere
 * Dovado: The called API method seems to expect a "normal" number

* Fix redefined-argument-from-local

* Fix consider-using-enumerate

* Fix wrong-import-order

* Fix arguments-differ

* Fix missed no-else-return

* Fix no-member and related

* Fix signatures-differ

* Revert "Upgrade pylint to 1.8.1"

This reverts commit af78aa00f125a7d34add97b9d50c14db48412211.

* Fix arguments-differ

* except for device_tracker

* Cleanup

* Fix test using positional argument

* Fix line too long

I forgot to run flake8 - shame on me... 🙃

* Fix bad-option-value for 1.6.5

* Fix arguments-differ for device_tracker

* Upgrade pylint to 1.8.2

* 👕 Fix missed no-member
2018-02-11 09:20:28 -08:00
escoand cad9e9a4cb allow wildcards in subscription (#12247)
* allow wildcards in subscription

* remove whitespaces

* make function public

* also implement for mqtt_json

* avoid mqtt-outside topic matching

* add wildcard tests

* add not matching wildcard tests

* fix not-matching tests
2018-02-09 15:22:50 -08:00
Albert Lee 1db4df6d3a device_tracker.asuswrt: Clean up unused connection param (#12262) 2018-02-09 15:21:10 -08:00
luca-angemi 4c11a3461f Update owntracks.py (#12260) 2018-02-09 23:06:31 +01:00
Otto Winter 2ae0c5653e Fix source code using Windows newline (#12248)
* 🚜 Fix usage of carriage return

* 🤝 Rebase and repeat

* 🚜 Fix file permissions
2018-02-09 08:11:47 +01:00
Sergey Isachenko d0ffb1bc52 librouteros version bump (#12227) 2018-02-07 23:15:02 -08:00
Rene Nulsch 323fe87b57 Change attributes in new Mercedes Me component (#12147)
* Fix wrong component doc URL

* Change attributes to lowercase snakecase

* pylint fix

* Remove test comments
2018-02-05 23:29:19 +01:00
Anthony Arnaud 86daec8c59 Fix #11875 Ubus broken since upgrade to 0 57 (#12141) 2018-02-02 17:22:29 -08:00
Anthony Arnaud 0f879a6c60 Fix #8475 device tracker ubus tracks unauthenticated and unassociated devices (#12140) 2018-02-02 17:22:14 -08:00
Rene Nulsch ed2d54ab45 Add Mercedes me component (#11743)
* Add Mercedes me component

* pump api version to 0.1.2

* Add Mercedes me component

* pump api version to 0.1.2

* clean up code

* Code cleanup

* Remove unneeded return statement

* Return statements added again

* Implement requested changes

* Rework component, move data load to component

* lint

* remove debug logging

* Change RainCloud comments, change from track_utc_time to track_time_interval

* Final cleanup for version 1
2018-02-02 10:56:58 -05:00
Otto Winter 8dcfd35b8b Spelling fixes (#12041)
* Spelling fixes

*Lots* of them.

* Spelling breaking changes

* Fix lint errors
2018-01-29 23:37:19 +01:00
Ville Skyttä 384f63dd1d Typing fixes (#12015)
* .gitignore: Add .mypy_cache

* Typing fixes
2018-01-29 00:24:08 -08:00
Ville Skyttä 55ee8959ba Spelling fixes (#11940) 2018-01-27 11:58:27 -08:00
Ville Skyttä e750428e9d huawei_router: Fix documentation link (#11961) 2018-01-27 16:33:33 +01:00
Ville Skyttä 3af7c67bf1 Fix asuswrt AttributeError on neigh for unknown device (#11960) 2018-01-27 15:20:28 +01:00
kennedyshead 2d8ef36a6c fixes #11848 (#11915)
Adding tests to check the component after latest patch
2018-01-26 10:30:48 -08:00
Gregory Dosh d65ac7421d device tracker - tomato https support (#11566)
* initial https support

* adding tests

* lint errors

* missing docstring

* fixing non-deterministic params

* fixing non-deterministic params

* Updating docstrings & added missing tests

* revert _LOGGER

* updating default port to reflect ssl/nonssl

* fixing docstrings for tests
2018-01-24 04:51:06 -05:00
William Scanlon 6a6ea263cf Fix Unifi direct errors caused by AP reboot. (#11835)
* Fix Unifi direct errors caused by AP reboot.

* Inverted logic in update
2018-01-21 18:13:28 +01:00
Fabian Affolter 47e31dc9ee Fixes for PEP257 (#11810)
* Fixes for PEP257

* More updates
2018-01-20 22:35:38 -08:00
Conrad Juhl Andersen 536424b0c8 Owntracks: Use bluetooth_le as source_type if beacon was used for location change. (#11615)
* Use bluetooth_le source_type, if location was changed by beacon

* No reason to do nested ifs

* Added tests for source_type on owntracks

* Fixed The Hound

* Added test and fixed bug surfaced by test
2018-01-18 23:00:20 +01:00
kennedyshead 6b103cc9b9 Fix for asuswrt, telnet not working and presence-detection for router mode (#11422)
* Fix for telnet mode
Fix for presence detection

closes #11349 #10231

* Optimisation when device is disconnected
2018-01-11 14:12:27 -08:00
Sean Wilson a23f60315f Fix bluetooth tracker source (#11469)
* Add new sources for bluetooth and bluetooth_le trackers (rather than just using the generic 'gps' catch-all).

* Fix lint issues
2018-01-11 14:10:47 -08:00
Paulus Schoutsen 88b70e964c
Remove execution file perm (#11563) 2018-01-09 23:55:14 -08:00
Chris Cowart 8c0035c5b3 New features for Owntracks device_tracker (#11480)
* New features for Owntracks device_tracker

- Supporting a mapping of region names in OT to zones in HA, allowing
  separate namespaces in both applications. This is especially helpful
  if using one OT instance to update geofences for multiple homes.
- Creating a setting to ignore all location updates, allowing users to
  rely completely on enter and leave events. I have personally always
  used OT integrations with home automation this way and find it the
  most reliable.
- Allowing the OT topic to be overridden in configuration

* Fixing configuration of MQTT topic, related tests

* Tests for Owntracks events_only feature

* Tests for customizing mqtt topic, region mapping

* Fixing _parse and http for owntracks custom topic

* Making tests more thorough and cleaning up lint
2018-01-08 08:16:45 +01:00
Anders Melchiorsen 8267a21bfe Lazy loading of service descriptions (#11479)
* Lazy loading of service descriptions

* Fix tests

* Load YAML in executor

* Return a copy of available services to allow mutations

* Remove lint

* Add zha/services.yaml

* Only cache descriptions for known services

* Remove lint

* Remove description loading during service registration

* Remove description parameter from async_register

* Test async_get_all_descriptions

* Remove lint

* Fix typos from multi-edit

* Remove unused arguments

* Remove unused import os

* Remove unused import os, part 2

* Remove unneeded coroutine decorator

* Only use executor for loading files

* Cleanups suggested in review

* Increase test coverage

* Fix races in existing tests
2018-01-07 14:54:16 -08:00
Fabian Affolter b22a26891e
Upgrade pysnmp to 4.4.4 (#11485) 2018-01-06 19:54:15 +01:00
tschmidty69 4914ad1dd9 Ping device tracker now respects interval_seconds (#11348)
* Ping device tracker now respects interval_seconds
2017-12-29 16:18:39 +01:00
Fabian Affolter af6c39f4d1 Upgrade pysnmp to 4.4.3 (#11317) 2017-12-27 09:17:43 +01:00
Mitko Masarliev 169459b57f Fix for track_new_devices BC (#11202)
* BC fix

* more tests

* inline if change

* inline if change
2017-12-26 14:49:24 -08:00
Aaron Bach 5566ea8c81 Adds support for disabled Tiles and automatic session renewal (#11172)
* Adds support for disabled Tiles and automatic session renewal

* Updated requirements

* Collaborator-requested changes

* Collaborator-requested changes
2017-12-24 01:19:04 +01:00
Andrey Kupreychik 4f5d7cea11 Added password for GPS logger endpoint (#11245)
* Added password for GPS logger endpoint

* Fixed lint error

* Update gpslogger.py

* fix lint

* fix import
2017-12-24 00:15:06 +01:00
Przemek Więch 024f1d4882 Try multiple methods of getting data in asuswrt. (#11140)
* Try multiple methods of getting data in asuswrt.

Solves #11108 and potentially #8112.

* fix style

* fix lint
2017-12-17 12:46:47 +01:00
Adde Lovein b2c5a9f5fe Add GPS coords to meraki (#10998) 2017-12-10 09:47:14 -08:00
Mitko Masarliev e66268dffe Meraki AP Device tracker (#10971)
* Device tracker for meraki AP

* styles fix

* fix again

* again

* and again :)

* fix hide if away

* docs and optimization

* tests and fixes

* styles

* styles

* styles

* styles

* styles fix. Hope last

* clear track new

* changes

* fix accuracy error and requested changes

* remove meraki from .coveragerc

* tests and minor changes

* remove location
2017-12-06 09:24:20 +01:00
Mitko Masarliev 8e4942088e Add option to set default hide if away for new devices (#10762)
* Option to change hide_if_away

* tests fix

* change new device defaults

* tests and requested changes

* fix assert
2017-12-05 21:56:43 -08:00
Mateusz Drab 38a1f06d14 Fix linksys_ap.py by inheriting DeviceScanner (#10947)
As per issue #8638, the class wasn't inheriting from DeviceScanner, this commit patches it up.
2017-12-04 18:58:52 +01:00
William Scanlon 2664ca498e
Support for Unifi direct access device tracker (No unifi controller software) (#10097) 2017-11-17 14:47:40 -05:00
boltgolt f494c32866 Small fix to be able to use mac and vendor in "device_tracker_new_device" event. (#10537)
* Small fix to be able to use mac and vendor in EVENT_NEW_DEVICE event

* Missed device_tracker test
2017-11-15 22:41:39 -08:00
Ari Lotter 2dcde12d38 Support presence detection using Hitron Coda router (#9682)
* Support presence detection using Hitron Coda router

* at least 2 spaces before inline comment

* Update hitron_coda.py

* rewrote authentication code, it actually works now

* make line slightly shorter to comply with hound

* Removed hardcoded IP address

* Fix string formatting, add timeout, and use generator

* Update hitron_coda.py

* Update hitron_coda.py

* Update hitron_coda.py

* typo

* update .coveragerc

* Update stale URL
2017-11-13 23:10:39 +01:00
Fabian Affolter 6974f2366d Upgrade pysnmp to 4.4.2 (#10539) 2017-11-13 09:24:07 -08:00
Aaron Bach 79001fc361 Adds support for Tile® Bluetooth trackers (#10478)
* Initial work in place

* Added new attributes + client UUID storage

* Wrapped up

* Collaborator-requested changes
2017-11-11 23:21:03 +01:00
Eric Hagan 7d9d299d5a OwnTracks Message Handling (#10489)
* Improve handling and logging of unsupported owntracks message types

Added generic handlers for message types that are valid but not
supported by the HA component (lwt, beacon, etc.) and for
message types which are invalid. Valid but not supported
messages will now be logged as DEBUG. Invalid messages will
be logged as WARNING.

Supporting single "waypoint" messages in addition to the
roll-up "waypoints" messages.

Added tests around these features.

* Style fixes
2017-11-10 09:29:21 -08:00
Fabian Affolter de9d19d6f4 Use constants for HTTP headers (#10313)
* Use constants for HTTP headers

* Fix ordering

* Move 'no-cache' to platform
2017-11-04 12:04:05 -07:00
GTH 25a25dde7a Add support for 'Send Current Position' feature in Geofency 5.1 (#10012) 2017-10-31 14:17:14 +01:00
Audric Schiltknecht 6b96bc3859 Add support for odhcpd DHCP server (#9858)
This commit adds support for the odhcp DHCP server in addition to
dnsmasq. A new configuration option 'dhcp_software' has been added and
allows the user to set the server used (defaults to dnsmasq to not break
existing installations).
2017-10-31 13:40:12 +01:00
Eric Hagan ed3f7d1581 OwnTracks work. Beacon logic and testcases (#10183)
* OwnTracks work. Beacon logic and testcases

The existing test cases don't really make clear what is being
tested and the iBeacon / Region / Zone / Tracker thing is all
a bit confused.

I'm distinguishing a fixed-place beacon used to trigger entrance
into an HA zone (as a Region Beacon) from a beacon affixed to a
portable or mobile object (as a Mobile Beacon). The behaviors
and test cases for those usages should be different. A Region Beacon
will be named the same as a Home Assistant Zone and seeing an event
from that beacon should trigger a device tracker update related
to that zone. It would be appropriate, though unnecessary, to
configure the Region Beacon with the GPS coordinates of its static
physical location.

A Mobile Beacon is not named after any HA Zone and seeing the beacon
triggers an update in HA setting the location of the beacon to the
current device_tracker location. In this way, when my_phone sees
the beacon on my_keys, the location of my_keys is set to where
my_phone is. And when my_phone stops seeing my_keys, my_keys location
is the location of my_phone the last time it saw them.

A Mobile Beacon's GPS information should be ignored because it's
almost certain to be incorrect because the beacon moves. In fact,
beacons typcially come configured with lat/lon as 0.0/0.0 so using
the location of the beacon in an update has a nasty habit of
setting you and your keys on the bottom of the Atlantic Ocean.

Leave message handling is changed to treat mobile beacons
differently from region beacons and gps regions.

active beacons should be a set. you shouldn't end up
with multiple "active" entries for the same beacon. Let's
enforce that with the correct data structure.

Added test for real-world bug that is fixed.
A series of mobile beacon and region beacon
enter and leave events could cause a mobile
beacon to stick to the tracking device even
though it had tracked through a "leave" event.

Changed two tests to look at the size
of the 'mobile_beacons_active' structure rather
than at the object which will allow this test
to work with any sort of list, set, etc.

* Removing excess logging and unnecessary try catch.

From review on PR #10183 I've removed some info logging
that was unnecessary and I've made the suggested changes
to an if block and a try/catch.
2017-10-31 00:18:45 -07:00
Fabian Affolter cc293db5ab
Update services.yaml files (#10229)
* Add period to the description

* Update abbreviation
2017-10-30 21:39:12 +01:00
Nicolae Vlădescu 05ece53ec2 Librouteros capsman fix (#10217)
* Catch MultiTrapError exceptions also

* Expect librouteros api exceptions on every call and also set fallbacks

* Do not re raise

* Fix lint issue
2017-10-30 08:41:37 +01:00
Fabian Affolter 115c59d88c Move constant to 'const.py' and use already definied ones (#10204) 2017-10-29 12:32:02 +01:00
Fabian Affolter afe88dfa0f Upgrade libnacl to 1.6.1 (#10161) 2017-10-27 08:01:32 +02:00
Egor Tsinko acbf45d5f8 added platform discovery code back into device_tracker (#10169) 2017-10-27 07:57:31 +02:00
Fabian Affolter b1291e572e Upgrade pysnmp to 4.4.1 (#10138) 2017-10-26 10:38:27 +02:00
Adam Mills 05ba78d886 Aioautomatic bump and scope update (#10043)
* Bump aioautomatic version

* Include vehicle:events scope for automatic

* Sort scopes
2017-10-22 17:11:35 -04:00
Alok Saboo f05a8bfa2a Update fritzconnection to 0.6.5 (#9950) 2017-10-18 20:58:26 +02:00
Daniel Welch 1bec2c005d using defusedxml ElementTree for safer parsing of untrusted XML data (#9934)
* using defusexml ElementTree for safer parsing of untrusted XML data

* move from core dependency to platform specific dependency

* style difference: put back end of list comma in setup.py
2017-10-18 16:21:46 +02:00
Sergey Isachenko d95b75a10c Dependemcy version bump. (#9899)
Closes #8213.
Closes #7575.
2017-10-16 21:46:21 +02:00
Eugenio Panadero 26cb67dec2 minimal fixes in the owntracks mqtt device tracker (#9866)
* fix UnboundLocalError when unable to parse payload, and show bad topics that cannot be parsed ok

* Update owntracks.py
2017-10-14 15:46:06 -07:00
icovada 80826bc985 Add CAPSman master to mikrotik presence detection (#9729)
* Add CAPSman master to mikrotik presence detection

Automatically prefer caps-man registered clients over locally connected

* Remove blank line

* Trailing whitespace removed
2017-10-13 10:54:58 +02:00
rbflurry b00d0a1253 Use the Last Seen attribute in unify (#8998)
* Uses the Last Seen attribute in unify

* Update unifi.py

fix format

* Update unifi.py

formatting again

* update test_unifi to call CONF_CONSIDER_HOME

Updated.

* Update test_unifi.py

* Update test_unifi.py

* More unit test test

* Update where consider_home comes from.

* Update test_unifi.py

* Update unifi.py

* Update unifi.py

* Update test_unifi.py

* Update unifi.py

* Update unifi.py

* Update test_unifi.py

* fix hound

* Update test_unifi.py

* Update test_unifi.py

* Update unifi.py

* Update unifi.py

* Update test_unifi.py

* Update unifi.py

* Update unifi.py

* Update test_unifi.py

* Update unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update unifi.py

* Update unifi.py

* Update unifi.py

* Update unifi.py

* Update test_unifi.py

Fix the butcher of tests.

* Update unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update unifi.py

* Update unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update test_unifi.py

* Update unifi.py

* Update test_unifi.py

* Update unifi.py

* Update unifi.py

* Update unifi.py

* Update unifi.py
2017-10-13 10:13:58 +02:00
Fabian Affolter 3bdb7052b8 Upgrade libnacl (#9769)
* Upgrade libnacl to 1.6.0

* Small style updates
2017-10-12 18:13:43 +02:00
Paulus Schoutsen 3b5a9e7796 OwnTracks: Handle lwt message (#9831)
* OwnTracks: Handle lwt message

* Update owntracks.py
2017-10-12 08:25:18 -07:00
Adam Cooper 0de2266a72 Resolving bug that prevents ssl_verify option for Unifi device_tracker (#9788)
* Added TODO to illustrate my intentions

* Resolved linting issue

* Resolved bool or file validation and updated tests

The tests have been updated to include mocks to assert a temp
ca cert exists as it should for the positive tests with an
additional negative test for a file not existing being tested.

* Resolved flake8 linting issues (test docstrings)
2017-10-11 00:08:36 +02:00
Paulus Schoutsen fc47e9443b OwnTracks: Fix handler is None checking (#9794)
* OwnTracks: Fix handler is None checking

* Update owntracks.py
2017-10-10 10:39:25 +02:00
Egor Tsinko 35484ca086 fix for LocationParseError in netgear platform (#9683)
* fix for LocationParseError in netgear platform

* added unit tests for get_scanner()

* fixed houndci-bot warnings

* fixed lint warnings

* fixed lint warnings

* fixed broken test

* removed guard clause from netgear.py
removed all discovery related code from device_tracker
removed unnecessary unit test

* removed discovery related tests

* removed unused import

* removed unused import
2017-10-08 22:14:39 -07:00
Fabian Affolter e502202de7 Upgrade pysnmp to 4.3.10 (#9722) 2017-10-07 09:47:52 +02:00
Paulus Schoutsen 6fb55b363a Add OwnTracks over HTTP (#9582)
* Add OwnTracks over HTTP

* Fix tests
2017-09-28 09:49:35 +02:00
Paulus Schoutsen 1baf0da627 Clean up OwnTracks (#9569)
* Clean up OwnTracks

* Address comments
2017-09-25 09:05:09 -07:00
Michael Prokop 08b0629eca Fix a bunch of typos (#9545)
s/Addres /Address /
s/Chnage/Change/
s/Converion/Conversion/
s/Supressing/Suppressing/
s/agains /against /
s/allready/already/
s/analagous/analogous/
s/aquired/acquired/
s/arbitray/arbitrary/
s/argment/argument/
s/aroung/around/
s/attibute/attribute/
s/auxillary/auxiliary/
s/befor /before /
s/commmand/command/
s/conatin/contain/
s/conection/connection/
s/coresponding/corresponding/
s/entites/entities/
s/enviroment/environment/
s/everyhing/everything/
s/expected expected/expected/
s/explicity/explicitly/
s/formated/formatted/
s/incomming/incoming/
s/informations/information/
s/inital/initial/
s/inteface/interface/
s/interupt/interrupt/
s/mimick/mimic/
s/mulitple/multiple/
s/multible/multiple/
s/occured/occurred/
s/occuring/occurring/
s/overrided/overridden/
s/overriden/overridden/
s/platfrom/platform/
s/positon/position/
s/progess/progress/
s/recieved/received/
s/reciever/receiver/
s/recieving/receiving/
s/reponse/response/
s/representaion/representation/
s/resgister/register/
s/retrive/retrieve/
s/reuqests/requests/
s/segements/segments/
s/seperated/separated/
s/sheduled/scheduled/
s/succesfully/successfully/
s/suppport/support/
s/targetting/targeting/
s/thats/that's/
s/the the/the/
s/unkown/unknown/
s/verison/version/
s/while loggin out/while logging out/
2017-09-23 17:15:46 +02:00
Andrey Kupreychik 78bb0da5a0 Added Zyxel Keenetic NDMS2 based routers support for device tracking (#9315)
* Added Zyxel Keenetic NDMS2 based routers support for device tracking

* Review feedback

* Review feedback+

* Review feedback: removed unneeded code
2017-09-16 10:29:24 +02:00
Michaël Arnauts a7bce5f9e6 Allow empty hostnames when detecting devices with the aruba device_tracker. (#9440) 2017-09-15 22:55:53 -07:00
Adam Mills 1c8253f762 Bump version of aioautomatic (#9435) 2017-09-14 20:37:51 -04:00
felix schwenzel 51ff6009a3 typo in waypoint import topic preventing waypoint import (#9338)
owntracks (tested on ios version 9.6.3/de_DE) publishes single waypoints under the topic owntracks/<user>/<device>/waypoint (singular).
owntrack publishes a waypoint export (publish) under the topic owntracks/<user>/<device>/waypoints (plural).

the owntracks component did not catch my waypoint export to mqtt, only single waypoint updates (i.e. after editing a waypoint or creating a new one). these single waypoints were rejected „because of missing or malformatted data“. when i changed the WAYPOINT_TOPIC to 'owntracks/{}/{}/waypoints', owntracks imported my published waypoint list, after i triggered it under Setting / Publish Waypoints.
2017-09-11 23:20:09 +02:00
Erik Eriksson 418ccc820a Handle the case where no registration number is available (instead display VIN (vehicle identification number)). (#9073) 2017-09-05 09:10:01 -07:00
Gunnar Helgason f51163f803 Add Geofency device tracker (#9106)
* Added Geofency device tracker

Added Geofency device tracker

* fix pylint error

* review fixes

* merge coroutines
2017-09-01 23:56:59 +02:00
Adam Mills 7d281fd224 Skip automatic events older than latest data (#9230)
* Skip automatic events older than latest data

* Update test
2017-08-31 16:29:18 +02:00
Sergey Isachenko 5f445b4a13 Tesla platform (#9211)
* Tesla support implemetation

* requirements_all.txt fix

* .coveragerc fix

* logging-too-many-args fix

* logging-too-many-args attempt 2

* Post-review fixes.

* requirements version fix

* requirements

* Lint fix

* Hot fix

* requirements_all.txt fix

* Review preparation.

* 1. Linting fix.
2. Minimal value for SCAN_INTERVAL hardcoded to 300 sec (to prevent possible ban form Tesla)

* Removed redundant whitespace.

* Fixed components according to @MartinHjelmare proposals and remarks.

* .coveragerc as @MartinHjelmare suggested.

* Minor changes

* Fix docstrings

* Update ordering

* Update quotes

* Minor changes

* Update quotes
2017-08-30 23:13:02 -05:00
mjj4791 cc18b5af3d Prevent iCloud exceptions in logfile (#9179)
* Prevent iCloud exceptions in logfile

With this change ValueError exceptions in the logfile caused by this component will disappear.
These errors are caused by the iCloud API returning an HTTP 450 error and the external lib throwing a ValueError because of it.

A PR has been raised against the external library, but that fix did not yet make it into a new version of the library. This will catch the exception in the mean time.... https://github.com/picklepete/pyicloud/pull/138

* Align log messages
2017-08-28 09:09:36 -07:00
Adam Mills 21bf089b17 Bump aioautomatic to prevent leaking exceptions (#9148) 2017-08-26 17:09:57 -04:00
Martin Hjelmare 8775c54d29 Refactor mysensors callback and add validation (#9069)
* Refactor mysensors callback and add validation

* Add mysensors entity class. The mysensors entity class inherits from
  a more general mysensors device class.
* Extract mysensors name function.
* Add setup_mysensors_platform for mysensors platforms.
* Add mysensors const schemas.
* Update mysensors callback and add child validation.
* Remove gateway wrapper class.
* Add better logging for mysensors callback.
* Add discover_persistent_devices function.
* Remove discovery in mysensors component setup.
* Clean up gateway storage in hass.data.
* Update all mysensors platforms.
  * Add repr for MySensorsNotificationDevice.
  * Fix bug in mysensors climate target temperatures.
  * Clean up platforms. Child validation simplifies assumptions in
    platforms.
  * Remove not needed try except statements. All messages are validated
    already in pymysensors.
* Clean up logging.
* Add timer debug logging if callback is slow.
* Upgrade pymysensors to 0.11.0.

* Make dispatch callback async

* Pass tuple device_args and optional add_devices

* Also return new_devices as list instead of dictionary.
2017-08-25 08:58:05 -07:00
Adam Mills 95c57412ff Automatic device tracker remove password (#9002)
* Remove now disabled password auth from automatic

* Fallback to configurator more permissively

* Fix test for changes

* Bump lib
2017-08-15 21:04:44 -04:00
Adam Mills 19d1d748d4 Add support for Automatic OAuth2 authentication (#8962)
* Add support for Automatic OAuth2 authentication

* Fix async conversion of configurator

* Rename method for async

* Use hass.components to get configurator component

* Fix typo

* Move session data to hidden directory

* Make configurator callback optional
2017-08-13 22:37:50 -07:00
Abílio Costa d195fd47f7 Add new device tracker for Huawei Routers. (#8488)
* Add new device tracker for Huawei Routers.

	This was tested with the HG8247H model, used by Vodafone
	Portugal for the Fiber service.

* add to .coveragerc; remove import and space

* add comments and fix lint

* rename methods

* huawei_router: add constants to scanner class

* huawei_router: remove lock; use format() in string

* huawei_router: use tupple instead of member only class

* huawei_router: reduce min scan time

* huawei_router: lint

* huawei_router: lint

* huawei_router: add missing lines in imports

* huawei_router: correctly decode string after router firmware update

* Remove things that is done on core now
2017-08-10 17:01:52 +02:00
Paulus Schoutsen 828c469ef7 Fix Lint 2017-07-28 20:53:15 -07:00
Paulus Schoutsen 0a6d519b9d Merge remote-tracking branch 'origin/master' into release-0-50 2017-07-28 02:42:58 -07:00
Brian Gehrich 0ab0e35d59 Updated pysnmp to 4.3.9 (#8675) 2017-07-27 22:33:17 +02:00
Fabian Affolter 4fcaea23a8 Upgrade libnacl to 1.5.2 (#8670) 2017-07-27 17:23:07 +02:00
Pascal Vizeli f86bd15580 Cleanup old device_tracker stuff (#8627)
* Cleanup old device_tracker stuff

* Fix lint
2017-07-24 07:45:02 -07:00
Anton Lundin 0c09cfc6c4 ubus: Make multiple instances work again (#8571)
Back in "ubus: Refresh session on Access denied (#8111)" I added the
decorator _refresh_on_acccess_denied. Somehow that stopped multiple ubus
trackers from working in parallel, and only the one first init'ed
worked.

Changing the order of the decorators fixes the issue but, I'm sorry to
say I can't figure out why. There's some magic somewhere which I'm
missing.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-07-23 23:51:25 -07:00
Anton Lundin b0b6026c68 ubus: Make multiple instances work again (#8571)
Back in "ubus: Refresh session on Access denied (#8111)" I added the
decorator _refresh_on_acccess_denied. Somehow that stopped multiple ubus
trackers from working in parallel, and only the one first init'ed
worked.

Changing the order of the decorators fixes the issue but, I'm sorry to
say I can't figure out why. There's some magic somewhere which I'm
missing.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-07-23 23:51:07 -07:00
Maikel Wever 5c39eebea8 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: 677f3fbb7f
2017-07-23 23:35:48 -07:00
Alexander Rust ffd3081743 Added additional attributes to OwnTracks device_tracker (#8503)
* Added additional attributes to OwnTracks device_tracker

* Added missing space after :
2017-07-16 21:43:47 +02:00
Paulus Schoutsen d0275c8075 Persistent notification import (#8507)
* Rewrite persistent notification creation

* Update components.is_on to use auto loading

* Fix two hass parameters
2017-07-16 21:39:38 +02:00
Maikel Wever f6c3832e90 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: 677f3fbb7f
2017-07-16 10:27:48 -07:00
Paulus Schoutsen d29bdddaa7 Add bind_hass to components (#8502)
* Add bind_hass to components

* Add bind_hass to group
2017-07-16 10:14:46 -07:00
Andy Castille 63ff173305 Use user-set device names for Linksys Smart Wi-Fi routers (3) (#8300)
* Use user-set device names for Linksys Smart Wi-Fi routers (3)

* Newline at end of linksys_smart.py

* Remove spaces in last line of linksys_smart.py

* Update linksys_smart.py
2017-07-06 23:07:12 -07:00
Alex ed5d10448e Presence detection for tp link eap225 (#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 (#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
2017-07-06 22:52:40 -07:00
Matthew Schick a7d5a8d93e Cleanup the asuswrt component (#8359)
* Get the list of wireless interfaces from nvram so tri-band routers
  work
* ARP checks don't work reliably for ap mode so remove it, associated
  list seems pretty solid
* Match on 'mac' instead of 'ip' since we can't use it for ap mode
* The `client_info_tmp` nvram reference, Asus removed it some time ago
* Update AsusWrtResult
2017-07-06 22:34:21 -07:00
Paulus Schoutsen 46e030662d Fix pylint 1.7.2 no-else-return issues (#8361)
* Fix pylint 1.7.2 no-else-return issues

* Update tomato.py
2017-07-05 23:30:01 -07:00
Paulus Schoutsen 5779d64e98 Fix some issues for PyLint 1.7.2 (#8356)
* Fix some issues for PyLint 1.7.2

* More fixes

* Revert position change for cover
2017-07-05 20:02:16 -07:00
Flavien Charlon 8185587100 Fix the "302" error in the UPC Connect component and remove the need to specify the router password (#8335)
* Remove the need to login on the UPC Connect component

* Remove unnecessary imports

* Update the unit tests for the UPC Connect component

* Fix the "302" error with the UPC Connect component

* Fix a flake8 error

* Update the unit tests for the UPC Connect component
2017-07-04 21:06:24 -07:00
Fabian Affolter 96e1d5524a Upgrade libnacl to 1.5.1 (#8259) 2017-06-30 11:12:21 +02:00
Morten Lied Johansen 0099168ff8 Add device tracker for Linksys Smart Wifi devices (#8144)
* Add device tracker for Linksys Smart Wifi devices

* Fixing code style
2017-06-23 22:36:04 -07:00
Anton Lundin 548417761e ubus: Refresh session on Access denied (#8111)
When a openwrt router reboots, all the session ids gets invalidated.
In that case we need to log in again and get a new session id.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-06-22 13:34:57 +02:00
Luar Roji 04920fa0bf Only mark active DHCP clients as present (#8110)
We only want to know which of the DHCP clients are indeed active.

For example: I've a table of static DHCP leases with most of the IPs of my network, so this module is always detecting them as present. With my patch only the active ones will be detected as present.

I already mentioned here: https://github.com/home-assistant/home-assistant/pull/7366#issuecomment-302950139
2017-06-20 12:16:56 +02:00
Caleb 6a017efc0e Update pyunifi component to use APIError passed from pyunifi 2.13. Better accommodate login failures with wrapper in pyunifi 2.13. (#7899)
* Pyunifi update

* Update pyunifi_test

* Import API Error

* Adjust test_unifi.py to import APIError

* Remove urllib import

* Remove urllib import from test

* Try fix mock

* Remove automations.yaml

* Lint
2017-06-17 11:09:27 -07:00
Erik Eriksson a119bd0056 Provide entity_id to avoid sensor mixup (fixes #7636). Use async_dispatcher. Provide icon. (#7946)
* Avoid sensor mixup. Fixes #7636. Also provide icon. Plus some smaller
fixes.

* fix async p1

* Create volvooncall.py
2017-06-15 22:28:30 -07:00
Pascal Vizeli 814834512a Group service / dynamic handling (#7971)
* Add Service to group

* Finish service

* Add service functions

* fix lint

* Address paulus comments

* fix lint & cleanup

* fix lint

* fix lint

* fix lint p3

* add test for check group

* add more tests

* fix lint

* Update service.yaml

* Fix order for tests

* Fix comment

* Fix test

* Fix tests

* Fix name in tests

* Fix view

* Fix default value

* Fix lint

* Fix key error

* add name

* migrate component entity

* fix tests

* fix import

* migrate device tracker

* fix lint

* fix bug

* fix logic

* fix lint

* fix tests

* fix generator

* fix group

* fix other tests.

* Not need to load group on first stage anymore.

* fix service

* add more group depency

* fix tests

* Revert "fix tests"

This reverts commit 35a922b3a8.

* Real fix

* fix test p2

* fix test p3

* fix test p4

* fix test p5

* fix test p6

* fix lint

* fix test p7

* Rename attribute

* fix group test

* fix bug

* fix flagy tests

* fix service.yaml

* fix lint
2017-06-16 00:52:28 +02:00
Fabian Affolter d1da53615f Upgrade pysnmp to 4.3.8 (#8044) 2017-06-15 21:24:31 +02:00
Andrey 02f7eb9675 Allow device_tracker platforms to specify picture and icon upon discovery (#8018)
* Allow device tracker platforms to specify picture

* Allow device tracker to specify icon during discovery

* Clean up and add tests

* Fix lint

* Fix test
2017-06-14 14:39:18 +02:00
Fabian Affolter 9189cbdc8b Remove globally disabled pylint issues (#8005) 2017-06-13 11:10:32 +02:00
vrs01 8a4e993183 Update ping.py (#7944) 2017-06-08 07:30:51 +02:00
Fabian Affolter 1c4e097bed Upgrade pysnmp to 4.3.7 (#7828) 2017-05-30 09:08:57 +02:00
Lev Aronsky 8fcc750998 Added handling of an AssertionError from pxssh failed login (#7750)
* Added handling of an AssertionError from pxssh failed login

* Destory and re-create pxssh instance, to fix behavior upon router restart.
2017-05-29 11:22:20 +02:00
Fabian Affolter c12b8f763c Upgrade pysnmp to 4.3.6 (#7806) 2017-05-29 10:28:31 +02:00
Paulus Schoutsen e68bd0457c Fix more deprecation warnings (#7778)
* Remove setting up an hbmqtt broker

* Don't pass loop to web.Application in tests

* Use .query instead of deprecated .GET for aiohttp requests

* Fix closing file resource

* Do not use asyncio mark

* Notify.html5 - PyJWT: Use options to disable verify

* Yamaha: Test was still using deprecated ip

* Remove pytest-asyncio
2017-05-26 13:12:17 -07:00
Paulus Schoutsen f43db3c615 Replace executor with async_add_job (#7658)
* Remove executor

* Lint

* Lint

* Fix tests
2017-05-26 08:28:07 -07:00
Anton Sarukhanov 3a843e1817 Add icons to device tracker. (#7759) 2017-05-24 19:12:26 -07:00
Lev Aronsky c556b619b7 Asuswrt continuous ssh (#7728)
* Make ssh and telnet connections continuous in asuswrt

* Refactored SSH and Telnet connections into respective classes.

* Fixed several copy-paste typos and errors.

* More typos fixed.

* Small changes to arguments, to pass automated tests.

* Removed unsupported named arguments.

* Fixed a couple of mistakes in Telnet, and other lint errors.

* Added Telnet tests, and added lint exceptions.

* Removed comments from tests, as they irritated the hound.
2017-05-23 09:55:01 -07:00
tobygray ca3f07cdef device_tracker.ubus: Handle empty results (#7673)
If OpenWRT isn't running the DHCP server then some OpenWRT hardware,
such as TP-Link TL-WDR3600 v1, can't determine the host
corresponding to an associated wifi client. This change handles that
by returning None when the request has no data in the result.
2017-05-21 17:26:05 -07:00
LvivEchoes 99ea1e3f4f Continue tracking device over dhcp lease table if wireless adapter not installed (#7690) 2017-05-21 17:18:55 -07:00
Paulus Schoutsen d369d70ca5 Fix tests (#7659)
* Remove global hass

* Http.auth test no longer spin up server

* Remove server usage from http.ban test

* Remove setupModule from test device_sun_light_trigger

* Update common.py
2017-05-19 07:37:39 -07:00
Adam Mills 04f1054d07 Automatic version bump (#7555) 2017-05-11 22:47:47 +02:00
Adam Mills 8c90fd19ff Try to request current_location Automatic scope (#7447) 2017-05-10 05:44:52 -07:00
Fabian Affolter c12c742297 Upgrade beautifulsoup4 to 4.6.0 (#7491) 2017-05-08 19:39:40 +02:00
Caleb 41212b90c4 Update to pyunifi 2.12 (#7468)
* Update to pyunifi 2.12

* Update requirements_all.txt
2017-05-06 22:39:21 -07:00
Robbie Trencheny 12910de9ae Merge pull request #7289 from jminardi/jminardi/tplink-logout
Log out of TP-Link router after devices are recorded.
2017-05-04 18:47:25 -07:00
Adam Mills c35d09d5f0 Convert automatic device tracker to push updates (#7404)
* Convert automatic device tracker to push updates

* Update test

* Add to coveragerc

* Fire hass events when automatic update received

* Change brace indentation
2017-05-02 21:21:17 -07:00
Fabian Affolter 4d52b0ecd5 Update docstrings (#7405)
* Update docstrings

* Fix lint issues

* Update docstrings
2017-05-02 22:47:20 +02:00
Fabian Affolter a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Jack Minardi 7a24e210ae Try again to pass string to error msg 2017-05-01 09:31:23 -04:00
Alok Saboo 86cfc2a0ed Updated docstrings (#7383)
* Updated docstrings

* Updated docstrings

* Updated docstrings

* Update docstrings

* Update more docstrings
2017-04-30 20:10:08 -07:00
Jack Minardi bc0559813c Dont add two strings inside logger call 2017-04-30 22:26:16 -04:00
Jack Minardi dd7690f265 Use % formatting 2017-04-30 21:31:55 -04:00
Jack Minardi b6827ce57a Use throwaray variable name 2017-04-30 21:02:03 -04:00
Fabian Affolter 3ee4d1060f Update docstrings (#7361)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update tomato.py

* Update isy994.py

* Lint + fix tests

* Lint
2017-04-29 22:04:49 -07:00
LvivEchoes e4ebae55d5 Feature/add mikrotik device tracker (#7366)
* Add Mikroik device tracker platform

* Update coveragerc with mikrotik.py

* Update coveragerc with mikrotik.py

* Fix lint errors
2017-04-29 20:39:11 -07:00
Adam Mills 6631e9e939 Version bump for automatic (#7329) 2017-04-27 08:01:30 -04:00
Adam Mills 00f034cef2 Version bump of aioautomatic (#7300)
* Version bump of aioautomatic

* Update requirements_all.txt
2017-04-25 20:21:16 -07:00
Jack Minardi 8bf1c21738 Add space 2017-04-25 00:48:23 -04:00
Jack Minardi 943861a8a3 Remove unused var 2017-04-25 00:45:59 -04:00
Jack Minardi 450fd7f2b5 Log out of router admin interface after devices are recorded. 2017-04-25 00:34:26 -04:00
Jack Minardi 2d5da3e958 Catch `KeyError`; Add `response.text` to error message 2017-04-25 00:32:31 -04:00
Fabian Affolter cfc023e128 Don't use len(SEQUENCE) as condition value (#7249)
* Don't use len(SEQUENCE) as condition value

* Update volvooncall.py
2017-04-23 20:41:09 -07:00
Gianluca Barbaro f59b3da5fe JSON MQTT Device tracker (#7055)
* ready for PR

* minor fix

* another minor fix

* new platform mqtt_json

* using ATTR constants

* voluptuous check on JSON payload

* voluptuous check on JSON payload
2017-04-19 22:53:07 -07:00
Anders Melchiorsen 6cbe28a9cd Send stderr of ping tracker to devnull (#7096)
When pinging an inaccessible device, OS errors like

    ping: sendto: No route to host

can occur. For a ping tracker this is not an error but rather a normal
situation. Thus, it makes sense to hide the error.
2017-04-15 19:00:01 -07:00
Adam Mills 35de3a1dc4 Use third-party lib aioautomatic for automatic (#7126) 2017-04-15 18:11:36 -07:00
Fabian Affolter c43a3efabd Remove globally disabled pylint issue and update docstrings (#7111) 2017-04-15 00:32:04 +02:00
Martin Hjelmare 4e388666b2 Fix mysensors callback (#7057)
* Fix mysensors callback

* All messages was not triggering proper updates. Fix by checking all
  child value types each update.

* Upgrade mysensors dep

* Fix pickle persistence when upgrading.
2017-04-11 19:17:09 -07:00
Fabian Affolter cc459e25cc Remove configuration sample (#7048) 2017-04-11 09:05:27 -07:00
Martin Hjelmare 749f79e813 Upgrade mysensors dep and callbacks (#6950) 2017-04-06 00:21:21 -07:00
Paulus Schoutsen 714b516176 aiohttp 2 (#6835)
* Upgrade aiohttp2

* Fix resource caching

* Fix helpers.aiohttp_client

* Lint

* Use static path for api error_log

* Fix ClientErrors import

* Remove not needed DisconnectError

* Remove releasing responses code

* Add timeout if stream starts non responding

* More async_aiohttp_proxy_stream cleanup

* Fix references to ClientError

* Fix fingerprinting

* Fix aiohttp stream tests

* Rename aiohttp_proxy_stream

* Remove impossible darksky test

* Fix sleepiq requests escaping mocker

* Lint

* Remove deprecated parameter

* Break up aiohttp_proxy_stream in 2 methods

* Lint

* Upgrade to aiohttp 2.0.4

* Convert connector close to a callback

* Fix static fingerprinted links
2017-03-30 00:50:53 -07:00
Paulus Schoutsen bfe0aee468 Locative tests to use aiohttp test utils (#6838) 2017-03-29 22:19:58 -07:00
tantecky a70af62e60 Make get_snmp_data more robust (#6798) 2017-03-27 12:22:59 +02:00
Fabian Affolter 6e44ccf683 Upgrade pysnmp to 4.3.5 (#6793) 2017-03-26 15:53:53 +02:00
Finbarr Brady 9a305c9742 Fix for issue: luci returns 403 invalid token when rebooted #6715 (#6717) 2017-03-20 08:55:59 -07:00
David Straub edf20f542a Phone book lookup support for Fritz!Box call monitor (#6474)
* Update fritzconnection dependency in fritz and fritzbox_netmonitor components

* Add phone book name lookup support to FritzBox call monitor

* Updated requirements_all.txt

* Requested changes to FritzBox call monitor

* Listen to HOME_ASSISTANT_STOP and close thread

* Safe CPU time
2017-03-17 14:40:12 +01:00
Caleb b705b3ddb9 Update to Pyunifi2.0 (#6490)
* Updated pyUnifi

* Missing comma

* Security opt-out, not opt-in

* Adjust minimal values

* Update to pyUnifi 2.0
2017-03-10 11:15:21 +01:00
Reed Riley 3d3a0a7a4f Improved iCloud 2FA support. (#5984) 2017-03-08 12:07:34 +01:00
Job Vermeulen bc9f2d21c4 Tado device_tracker exception when mobile device has geofencing enabled but location is currently unknown. (#6401) 2017-03-05 21:38:14 +01:00
Paulus Schoutsen 2650c73a89 Split bootstrap into bs + setup (#6416)
* Split bootstrap into bs + setup

* Lint
2017-03-05 10:41:54 +01:00
Pascal Vizeli c0bf3d7f32 Restore flow on device_tracker platform (#6374)
* Restore flow on device_tracker platform

* fix flow

* fix lint
2017-03-05 08:06:53 +01:00
Pascal Vizeli ed9e93c29f Migrate mqtt tracker and arwn sensor to async / cleanup owntrack (#6373)
* Migrate mqtt tracker and arwn sensor to async / cleanup owntrack

* Fix tests / lint
2017-03-03 12:09:10 +01:00
Pascal Vizeli 3e70154695 OwnTrack Async (#6363)
* Migrate owntrack to async

* fix tests
2017-03-03 09:23:58 +01:00
Micha LaQua 3fa8aff78e snmp: upgrade pysnmp to 4.3.4 (#6359)
* snmp: upgrade pysnmp to 4.3.4

fixes https://github.com/home-assistant/home-assistant/issues/6238

* snmp: v4.3.4: add missing definition changes
2017-03-02 16:12:44 +01:00
Pascal Vizeli 4e96e461f7 Cleanup component track_point_in_utc_time usage (#6330) 2017-03-01 07:37:48 -08:00
Pascal Vizeli 41f558b181 Bootstrap / Component setup async (#6264)
* Bootstrap / Entiy setup async

* Cleanup add_job stuff / return task/future object

* Address paulus comments / part 1

* fix install pip

* Cleanup bootstrap / move config stuff to config.py

* Make demo async

* Further bootstrap improvement

* Address Martin's comments

* Fix initial tests

* Fix final tests

* Fix bug with prepare loader

* Remove no longer needed things

* Log error when invalid config

* More cleanup

* Cleanups platform events & fix lint

* Use a non blocking add_entities callback for platform

* Fix Autoamtion is setup befor entity is ready

* Better automation fix

* Address paulus comments

* Typo

* fix lint

* rename functions

* fix tests

* fix test

* change exceptions

* fix spell
2017-02-28 20:33:19 -08:00
Erik 1c6ba989a9 Support for naming vehicle. Support for selecting what resources to display 2017-02-23 12:00:51 +01:00
Johann Kellerman 74837dbf45 Restore for device_tracker (#6150) 2017-02-22 22:55:11 +02:00
Erik Eriksson 65ed85c6eb volvooncall: fix missing property. see vehicle when discovered. (#6144) 2017-02-22 00:24:42 -08:00
Scott Bradshaw 37a8035c54 Added support for alternate SSH ports in AsusWRT (#4832) (#6109)
* Added support for alternate SSH ports in AsusWRT (#4832)

* Always set the SSH port in SSH arguments

* Removed whitespace

* Adding port=22 to the mock calls

* Changed config.get(CONF_PORT)  to config[CONF_PORT] per feedback from @pvizeli
2017-02-20 09:06:50 +01:00
Pascal Vizeli 5d8e219448 Update aiohttp handling with upc connect (#6108)
* Refactor upc connect

* fix aiohttp cleanup

* fix test

* fix tests

* allow status code for login
2017-02-19 23:25:45 +01:00
Erik Eriksson 9e73115337 Updated volvooncall library + support sensors, heater and lock (#6052) 2017-02-18 17:09:25 -08:00
William Scanlon 8a5fe38d69 Slugify trackr device_id (#6062)
* Slugify trackr device_id

* Removed replace
2017-02-17 21:39:05 +01:00
Pascal Vizeli a496a7c792 Protect device_tracker scan interval / TTS logging (#6041)
* Protect device_tracker scan interval / TTS logging

* clear pass
2017-02-16 07:13:33 -08:00
Pascal Vizeli 6674a8ad57 [Device Tracker] Remove coro (#6014)
* Remove coro and make flow faster.

* fix lint

* address comments
2017-02-15 19:52:06 -08:00
Martin Hjelmare b6404d70ec Fix mysensors platforms version requirement (#5942)
* Notify and device tracker platforms require mysensors version 2.0 or
  greater.
2017-02-13 11:23:28 +01:00
Mark Oude Veldhuis 0d76d72b9f Add support for multiple devices to Tado device tracker (#5810)
* Add support for multiple devices to Tado device tracker

* Hound did not agree with my usage of spaces

* Two blank lines were expected

* Keep CONF_HOME_ID in the Tado file

* Make home_id optional

* Work with different API URLs depending on home_id being present

* Remove CONF_HOME_ID from HA's const.py file

* Missed removing CONF_HOME_ID from the import
2017-02-09 18:50:14 -08:00
George.M 8951e1bdc0 The word `router` was misspelt (#5803)
fixed as this message is user facing
2017-02-08 12:28:45 +01:00
Martin Hjelmare 45a7c27280 Add mysensors device tracker and platform discovery (#5781)
* Add mysensors device_tracker platform

* Add discovery of device_tracker platforms

* Enable discovery of device_tracker platforms that are not
  DeviceScanner.
* Update signature of setup_scanner function in all affected platforms.
* Add test.
* Use discovery for mysensors device_tracker platform.

* Remove gps accuracy

* Small change to core like schema

* fix depency
2017-02-07 20:47:11 +01:00
Alessandro Mogavero 86da4f511d Improve Sky Hub error handling (#5762)
* Added error handling in function _get_skyhub_data

* Error line split for readability
2017-02-07 00:28:33 -08:00
Fabian Affolter 91bebca0b6 Upgrade pysnmp to 4.3.3 (#5757) 2017-02-05 11:22:32 +01:00
Trevor b5f285a789 Fix OwnTracks state names (#5454)
* Fix OwnTracks state names (#5453)

* Update owntracks.py

* Update tests
2017-02-01 22:06:02 -08:00
Pascal Vizeli a72d32b9af Bugfix async blocking loop with xml parser. (#5694) 2017-02-01 17:20:52 +01:00
Michaël Arnauts b080ae154c Add devices detected by ping as SOURCE_TYPE_ROUTER instead of GPS (#5625) 2017-01-31 08:01:14 -08:00
Kyle Hendricks fddab7f2b4 Fixes the AsusWRT `ip neigh` regex to handle the possible IPv6 "router" flag (#5605)
See the last line here: http://linux-ip.net/gl/ip-cref/ip-cref-node62.html
2017-01-29 09:37:59 +01:00
Fabian Affolter e1412a223c Update docstring (quotes, links, content) (#5602) 2017-01-28 16:02:19 +01:00
Lukas 5a7a84fad1 Device Tracker for Linksys Access Points (#4933)
* Implementation for Linksys Access Points

* update .coveragerc

* update requirements

* add default timeout of 10sec

* address lint issues
2017-01-26 23:27:29 -08:00
Pascal Vizeli c3a55e7d82 Fix upc lint error (#5554) 2017-01-25 18:46:37 +01:00
Pascal Vizeli 393c7f2cf1 [device.upc_connect] Discount on STOP. (#5553)
* [device.upc_connect] Discount on STOP.

* close session it self

* Update upc_connect.py
2017-01-25 09:20:31 -08:00
Oleksii Serdiuk ca1dc202f9 ASUSWRT: Add IPv6 support when parsing neighbors (#5536)
* ASUSWRT: Add IPv6 support when parsing neighbors

The regex for IPv6 should cover most cases, but it doesn't validate
whether IP is correct. It also might fail for some edge cases.

Also, ignore 'duid xx:xx:xx:xx:xx:xx:xx:xx:xx:xx' line in leases.

Closes #2814 - ASUSWRT doesn't support ipv6

* Update asuswrt.py
2017-01-25 00:02:39 -08:00
Alessandro Mogavero c7ff7af39d Sky hub (#5509)
* Added new platform sky_hub

* added env to virtual environment gitingore

* Removed unuseful imports

* BT home hub 5 renamed to sky hub in the comments

* Added sky_hub to .coveragerc

* Added example configuration in sky_hub docstring

* sky_hub made compliant with test style standards

* homehub functions renamed to skyhub

* Update .gitignore

* Update .coveragerc
2017-01-25 00:02:08 -08:00
Paulus Schoutsen d8e5e60a08 Merge remote-tracking branch 'origin/master' into dev 2017-01-24 20:59:34 -08:00
Touliloup 909978b0d1 [Device Tracker] Xiaomi Mi Router token refresh (#5437)
Device token is refreshed if not anymore valid (for example after router reboot).
Token refresh will only be tried once per update.
2017-01-19 15:05:37 +01:00
Alex 3267aa8c08 WIP fritz install dependencies fix (#5399)
* updated fritzconnection dependency to 0.6 from pypi

* updated requirements_all for new dependencies of fritz platform
2017-01-18 11:01:31 +01:00
Pascal Vizeli cfc936761b Make upc more robust (#5404)
* Make upc more robust

* update unittest

* add test for parse error
2017-01-17 23:35:02 +01:00
Job Vermeulen 40ba4fd872 Tado device tracker support (#5046)
* Added tado device tracker

* Added tado device tracker to .converagerc

* Updated docs

* Code formatting and removed unused import

* Code formatting and removed unused import

* Respected the lint line length

* Respect pydocstyle rules

* Respect the lint line limit length

* Fixed reviewer feedback

* Changed the tracker to support async

* Respect the New line end of file rule

* Update .coveragerc
2017-01-16 23:15:11 -08:00