Commit Graph

918 Commits (99c5087c1e6868a3d7e819e1084728c5dcc558ac)

Author SHA1 Message Date
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
Pascal Vizeli 7af92d0bca Bugfix upc with aiohttp 1.2 (cookies) (#5362) 2017-01-16 22:08:24 -08:00
Pascal Vizeli 8a95cc4104 Bugfix timedelta v2 (#5349)
* Bugfix timedelta v2

* fix volvo

* fix lint
2017-01-16 22:08:24 -08:00
Pascal Vizeli f08e2648ae Bugfix upc with aiohttp 1.2 (cookies) (#5362) 2017-01-16 11:06:23 +01:00
Pascal Vizeli 2e3d5302bf Bugfix timedelta v2 (#5349)
* Bugfix timedelta v2

* fix volvo

* fix lint
2017-01-15 23:53:37 +01:00
Michaël Arnauts c3783bf49b Bugfix for ping component now DEFAULT_SCAN_INTERVAL is a timedelta (#5318) 2017-01-14 11:55:29 +01:00
Touliloup 394b52b9e8 Xiaomi device tracker (#5283)
* [Device Tracker] Xiaomi Mi Router integration as device tracker

    This device tracker allow to track device connected to Xiaomi Router.
    Parameter: host, username (default admin) and password.

* [Device Tracker] Addition of Xiaomi device tracker file in coverage
2017-01-13 21:24:58 -08:00
William Scanlon f7a1d63d52 Support for TrackR device trackers (#5010)
* Support for TrackR device trackers

* Change small style for hass
2017-01-13 00:16:05 +01:00
Pascal Vizeli 6b00f7ff28 Bugfix async device_tracker see callback (#5259) 2017-01-10 17:19:51 +01:00
Pascal Vizeli bb02fc707c [device_traker/upc] New UPC connect box platform (#5100) 2017-01-09 18:08:37 +02:00
Lewis Juggins 41ef6228be [device_tracker] Use home zone GPS coordinates for router based devices. (#4852) 2017-01-07 23:09:07 +02:00
Pascal Vizeli 1719d88602 Bugfix default values to timedelta (#5193)
* Bugfix default values to timedelta

* fix unittests
2017-01-06 00:16:12 +01:00
Adam Mills 93d462b010 Fix for async device_tracker (#5192) 2017-01-05 23:10:43 +01:00
Nick Touran a36ca62445 Support longer-than-60-second scan_interval and interval_seconds (#5147)
* Update scan_interval and interval_seconds max to 1 day vs. 60 seconds

* Format fixes

* Add docstring on unittest.

* Added and implemented new async_track_time_interval helper.

* Format fixes, removed unused import.

* Undid whoops on unsub_polling.

* Updated unit tests for scan_interval.

* Added unit test for track_time_interval.

* Allow other forms of time interval input for scan_interval and interval_seconds
2017-01-05 23:05:16 +01:00
Sander de Leeuw 497a1c84b5 Fixed invalid response when sending a test-request from Locative iOS app (#5179) 2017-01-05 10:05:39 +02:00
Michaël Arnauts 5e8e2a8312 Ping device tracker (#5176)
* Ping device tracker

* Style fixes
2017-01-04 21:06:09 +01:00
Giannie 67b74abf8d Allow selection of bluetooth device to use (#5104)
Adding the device_id key to the bevice tracker component allows selecting the bluetooth device to use in case the default device does not have BLE Capabilities
2017-01-03 23:34:51 +01:00
Pascal Vizeli b2371c6614 Update device_traker for async platforms (#5102)
Async DeviceScanner object, migrate to async, cleanups
2017-01-02 21:50:42 +02:00
Johan Bloemberg 43e5d28643 Fix and test for prefixed MAC addresses. (#5052)
* Fix and test for prefixed MAC addresses.

* Fix style.

* Don't commit old code.

* Fix style.
2016-12-26 14:02:12 +01:00
Johann Kellerman 46cad514d4 Revert "[device_tracker] Don't clear GPS coordinates when using two device trackers." (#4851) 2016-12-11 19:18:11 +02:00
Lewis Juggins e0552ad899 [device_tracker] Don't clear GPS coordinates if no GPS seen (#4848) 2016-12-11 15:13:43 +02:00
Lewis Juggins cdf9464698 [device_tracker.gpslogger] Add additional activity attribute. 2016-12-11 09:06:29 +00:00
Daniel Høyer Iversen ee5b9e7291 Configurable scan options for nmap (#4838) 2016-12-10 19:53:25 +02:00
Albert Lee bc646070c8 Match uppercase MAC addresses in asuswrt 'arp -n' output (#4742) (#4764) 2016-12-05 22:20:21 -08:00
Caleb 8ca2345fd4 Pyunifi dep (#4754)
* change unifi dependency to pyunifi

* Change dependency to fix #4336

* Run gen_requirements_all.py script

* Changed import statement to reflect new package

* Updated test_unifiy.py with different module

* Update requirements_all.txt
2016-12-05 21:35:54 -08:00
Daniel Høyer Iversen 8afd30b7d4 fix setting battery in device_tracker (#4756) 2016-12-05 18:04:04 -08:00
Daniel Høyer Iversen 308744d8a0 Add additional attributes to GPSLogger (#4755) 2016-12-05 19:33:51 +00:00
Paulus Schoutsen 13006cee68 Device tracker attributes (#4753) 2016-12-05 19:32:17 +00:00
Daniel Høyer Iversen 71fc446425 Merge pull request #4719 from home-assistant/device_tracker
device tracker
2016-12-05 16:32:29 +01:00
Daniel Hoyer Iversen 5a7e446646 device tracker 2016-12-05 09:12:13 +01:00
Johan Bloemberg 9bf13231f7 Actually test calling async macvendor lookup and fix it. (#4718) 2016-12-04 09:51:40 -08:00
Marcelo Moreira de Mello 53c1b93b61 Added persistent_notification in case of error during Unifi device_tracker setup (#4682) 2016-12-03 22:11:52 -08:00
Johan Bloemberg 08f8e540e3 Macvendor (#4468)
* Add MAC vendor lookup for device_tracker.

* Test vendor mac lookup and fix device attribute.

* Generate requirements.

* Style.

* Use hyphen instead of underscore to satisfy 'idna'.

https://github.com/kjd/idna/issues/17

* Resort imports.

* Refactor macvendor to use macvendors.com API instead of netaddr library.

* Test vendor lookup using macvendors.com api.

* Remove debugging.

* Correct description.

* No longer needed.

* Device tracker is now an async component. Fix ddwrt tests.

* Fix linting.

* Add test case for error conditions.

* There is no reason to retry failes vendor loopups as they won't be saved to the file anyways at that point.

* Sorry, bad assumption, this only made things worse.

* Wait for async parts during setup component to complete before asserting results.

* Fix linting.

* Is generated when running 'coverage html'.

* Undo isort.

* Make aioclient_mock exception more generic.

* Only lookup mac vendor string with adding new device to known_devices.yaml.

* Undo isort.

* Revert unneeded change.

* Adjust to use new websession pattern.

* Always make sure to cleanup response.

* Use correct function to release response.

* Fix tests.
2016-12-01 18:30:41 -08:00
Pascal Vizeli b4841a17a6 Hotfix device_tracker yaml config (#4611) 2016-11-28 18:43:47 +01:00
Paulus Schoutsen 32ffd006fa Reorganize HTTP component (#4575)
* Move HTTP to own folder

* Break HTTP into middlewares

* Lint

* Split tests per middleware

* Clean up HTTP tests

* Make HomeAssistantViews more stateless

* Lint

* Make HTTP setup async
2016-11-25 13:04:06 -08:00
dainok 260a619a40 Added GPSLogger API (#4089)
* Added GPSLogger API, check https://goo.gl/eJnKw5 for details.

* Switched to debug severity and added to coveragerc

* Switched to debug severity for logs

* Updated .coveragerc

* Update .coveragerc

* Merged from sfiorini

* Merged from sfiorini

* Update .coveragerc
2016-11-22 22:19:57 -08:00
Aaron Morris 65b85ec6c0 Fix missing space in error message between "accuracy" and "is" (#4542) 2016-11-22 20:45:06 -08:00
Pascal Vizeli 859d0d5ad6 Bugfix device_tracker init tracker scan (#4514) 2016-11-21 19:32:21 -08:00
Matt N f71396c293 Fix nmap_tracker documentation link (#4471) 2016-11-19 15:31:45 -08:00
Paulus Schoutsen d2bbc6ef70 Upgrade linter (#4461) 2016-11-18 21:47:59 -08:00
Pascal Vizeli c56f99baaf Async migration device_tracker (#4406)
* Async migration device_tracker

* change location stuff to async

* address paulus comments

* fix lint & add async discovery listener

* address paulus comments v2

* fix tests

* fix test_mqtt

* fix test_init

* fix gps_acc

* fix lint

* change async_update_stale to callback
2016-11-18 23:35:08 +01:00
Erik Eriksson 265232af98 only check heater status if present (#4459) 2016-11-18 14:12:51 -08:00
Fabian Affolter e6c4113c5b Fix lint issues for 0.33 (#4451)
* Fix PEP257 issues

* Fix ident

* Fix lint issues

* Update docstrings

* Fix indent

* Fix indent

* Fix lint issues

* Fix lint issue

* Again lint
2016-11-18 23:05:03 +01:00
Paulus Schoutsen d774ba46c7 Fix device tracker sending invalid event data 2016-11-14 20:59:29 -08:00
Paulus Schoutsen 479457d6ec device_tracker.see should not call async methods (#4377) 2016-11-14 18:35:58 -08:00
Jeffrey Lin cd1b0ac67d Added NVRAM-based MAC to IP mapping as backup to ARP tables (#4189) 2016-11-10 22:46:58 -08:00
Finbarr Brady ee322dbbdc Cisco IOS device tracker support (#4193) 2016-11-09 22:36:57 +02:00
Danijel Stojnic 88fc64c8a0 Add Map support for Locative component (#4174)
* Add Map support for Locative component

The Locative App on the mobile is sending an HTTP request to the
server where also the GPS location is sent.
But the GPS location was not passed to the event device_tracker.see.

Use the passed GPS location from Locative and pass it to the
device_tracker.see event.

With this the device is then also shown on the HA Map component.

* Use existing constants for latitude and longitude

Use the existing constants from homeassistant.consts:

ATTR_LATITUDE for 'latitude'
ATTR_LONGITUDE for 'longitude'

* Reuse the "yield from self.hass.loop.run_in_executor" again

* Use variable gps_location
2016-11-05 13:05:15 -07:00
Samuel Bétrisey 1463fc4fe0 Add Swisscom Internet-Box device tracker (#4123)
* Add Swisscom Internet-Box device tracker

* Add Swisscom device tracker to .coveragerc

* Add timeout to requests
Fix formatting and add missing comments to pass the lint test

* Remove authentication which was not required

I realised that there was no need to be authenticated to get the
connected devices. Thanks Swisscom :/

* Moving config to a PLATFORM_SCHEMA and using voluptuous
2016-11-05 13:04:44 -07:00
Pascal Vizeli d7b3c9c38e Fix log owntrack log flooting (#4198) 2016-11-03 18:42:22 -07:00
Bart274 a3ae96440b Update the icloud device_tracker (#4081)
* Update the icloud device_tracker

* addressed @kellerza 's comments

* GMTT config needs an entity_id

* renamed services

* fix cookiedir and clean up keep_alive function

* fix travis errors

* forgot a self.

* update devices after initializing the API

* changed wording

* addressed changes from @kellerza

* Syntax error solved

* Update icloud.py

* Only use account of username instead of whole username as default for account name

* use slugify instead of slug for schema

* remove Google Maps Travel Time

* Add comment from original tracker back
2016-11-02 21:07:23 -07:00
Erik Eriksson afde5a6b26 extracted logic into an external package. monitor more attributes. support for more than one vehicle (#4170) 2016-11-01 22:01:00 -07:00
Lewis Juggins a5fb284717 Add new_device_discovered event (#4132) 2016-11-01 21:52:27 -07:00
Johann Kellerman e487a09190 Remove None value before writing known_devices (#4098)
* Remove None

* Replace null
2016-11-01 21:51:31 -07:00
Fabian Affolter be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Fabian Affolter 9f2aae1357 Maintenance 2nd (#4106)
* Add link to docs

* Fix link

* Update line breaks

* Update ordering

* Align vera platofrm to only use add_devices
(instead od add_devices_callback)

* Remove line break

* Use consts

* Update ordering

* Update ordering

* Use const, create default name, use string formatting

* Update ordering

* Use const

* Update import style

* Update ordering and line breaks

* update line breaks

* Set default port

* Set defaults and update ordering

* Update ordering

* Minor style updates

* Update ordering, defaults, line breaks, and readability

* Use constants

* Add line breaks

* use string formatting

* Update line breaks

* Update logger
2016-10-30 09:58:34 +01:00
Pascal Vizeli d5368f6f78 Async bootstrap / component init (#3991)
* Async bootstrap

* Adress comments

* Fix tests

* More fixes

* Tests fixes
2016-10-27 00:16:23 -07:00
Bart274 53ea926292 Fix for see service attributes (#4023) 2016-10-25 10:59:20 +02:00
David-Leon Pohl e2d23d902a Unittests for ddwrt device tracker and bugfix (#3996)
* BUG Message data cannot be changed thus use voluptuous to ensure format

* Pilight daemon expects JSON serializable data

Thus dict is needed and not a mapping proxy.

* Add explanation why dict as message data is needed

* Use more obvious voluptuous validation scheme

* Pylint:  Trailing whitespace

* Pilight sensor component

* Python 3.4 compatibility

* D202

* Use pytest-caplog and no unittest.TestCase

* Fix setup/teardown of unittests

* Activate coverage testing

* Bugfix whitelist filter and use bugfixed pilight library

* Use newest pilight library that has a bugfix

* Add unittest for pilight hub component

* PEP257 for docstrings

* Bugfix setting device name from host name and small cleanup

- Init with connection error handling is more clear
- Comments clean-up

* PEP257

* New unittest with full coverage

* Upload missing testfixtures

* D209

* Handle double quotes in reply

* Formatting
2016-10-24 22:18:24 -07:00
Paulus Schoutsen 519d9f2fd0 async HTTP component (#3914)
* Migrate WSGI to asyncio

* Rename wsgi -> http

* Python 3.4 compat

* Move linting to Python 3.4

* lint

* Lint

* Fix Python 3.4 mock_open + binary data

* Surpress logging aiohttp.access

* Spelling

* Sending files is a coroutine

* More callback annotations and naming fixes

* Fix ios
2016-10-23 23:48:01 -07:00
Johann Kellerman 8d375e2d47 Improve known_device.yaml writing (#3955)
* Better known_device.yaml writing

* yaml dump
2016-10-21 21:41:27 -07:00
Teemu Mikkonen 9f6d1c4e7b Device tracker: SNMPv3 (#3961)
* Add initial SNMPv3 support for better security

* Fixed indentation errors

* Fixed flake8 E128 on row 65

* Disabled warning about too many instance-attributes

* Removed extra code, added Inclusive to make better config validation
2016-10-20 23:01:30 -07:00
henryk 2b37b4251b Fritzbox - Only report a MAC address if it's really there (#3964)
Fixes 'Neither mac or device id passed in'
2016-10-20 20:04:11 +02:00
hcooper d60c2d604f Add support for multiple inputs to nmap tracking module as a list (#3944) 2016-10-20 07:15:00 +02:00
Johann Kellerman 57f32fa629 Fixup device_tracekt.mqtt voluptuous & unit tests (#3904) 2016-10-18 18:10:28 -07:00
Pascal Vizeli 0b8b9ecb94 Async EntitiesComponent (#3820)
* first version

* First draft component entities

* Change add_entities to callback from coroutine

* Fix bug add async_prepare_reload

* Group draft v1

* group async

* bugfix

* bugfix v2

* fix lint

* fix extract_entity_ids

* fix other things

* move get_component out of executor

* bugfix

* Address minor changes

* lint

* bugfix - should work now

* make group init async only

* change update handling to old stuff

* fix group handling, remove generator from init

* fix lint

* protect loop for spaming with updates

* fix lint

* update test_group

* fix

* update group handling

* fix __init__ async trouble

* move device_tracker to new layout

* lint

* fix group unittest

* Test with coroutine

* fix bug

* now it works 💯

* ups

* first part of suggestion

* add_entities to coroutine

* change group

* convert add async_add_entity to coroutine

* fix unit tests

* fix lint

* fix lint part 2

* fix wrong import delete

* change async_update_tracked_entity_ids to coroutine

* fix

* revert last change

* fix unittest entity id

* fix unittest

* fix unittest

* fix unittest entity_component

* fix group

* fix group_test

* try part 2 to fix test_group

* fix all entity_component

* rename _process_config

* Change Group to init with factory

* fix lint

* fix lint

* fix callback

* Tweak entity component and group

* More fixes

* Final fixes

* No longer needed blocks

* Address @bbangert comments

* Add test for group.stop

* More callbacks for automation
2016-10-16 09:35:46 -07:00
Hydreliox 7771cc2ccf Add Bbox Modem Routeur for device tracker (#3848) 2016-10-13 19:43:51 -07:00
Erik Eriksson 63d9ea6643 slugify (#3777) 2016-10-09 09:15:58 -07:00
Johann Kellerman 4d9bac6f9c Coerce device IDs from known_devices to be slugs (#3764)
* Slugify & consider_home test fix [due to load valid PR]

* undo schema change

* Fix slugify error
2016-10-08 14:40:50 -07:00
Johann Kellerman fb94aaa5a1 Load yaml using validator and include consider_home (#3743)
* Load yaml using validator, consider_home

* timedelta, track_if_away

* improve voluptuous

* Add default back

* Change time_period validation order
2016-10-07 18:08:33 -07:00
Erik Eriksson fccc7e69d0 Improved exception handling. Don't stop updating from server because of exception. (#3724) 2016-10-07 17:24:02 -07:00
Fabian Affolter 12f1be9b1c Fix PEP257 issues and ordering (#3720) 2016-10-05 17:32:29 -07:00
Erik Eriksson 5900d8a2c1 only query vehicle attributes once (#3668)
use registration number as dev id
2016-10-04 00:58:25 -07:00
Erik Eriksson 287a7e2720 Support for encrypted payload (#3587) 2016-10-04 00:57:37 -07:00
deisi c93b63963b Fix 3621 (#3642)
Happens when the scanner searches for a mac address, that has been forgotten
by the fritzbox.
2016-10-04 00:47:58 -07:00
Erik Eriksson 9f8acbec95 Add support for tracking position and status for a Volvo car (#3617) 2016-10-01 23:00:01 -07:00
Paulus Schoutsen a1488b46f6 Fix zone being setup twice 2016-09-24 00:04:03 -07:00
Paulus Schoutsen 8251039ca4 Fix nmap config (#3482) 2016-09-22 08:44:18 -07:00
Johann Kellerman 169f054c6c Use voluptuous for nmap, tplink, thomson device trackers (#3124)
* Use Voluptuous for nmap, tplink, thomson device_trackers

* Fix logic
2016-09-17 23:44:15 -07:00
Teagan Glenn 8189ec2c8d Automatic polling (#3360)
* Test updating automatic

* Scan interval

* Schedule scan every time delta

* Pass around has

* Recursive issue

* Method invocation

* Oops

* Set up poll

* Default argument value

* Unused import

* Semicolon

* Fix tests

* Linting

* Unneeded throttle as it's handled by time event

* Use track time change event listener

* Disable lint rule

* Attribute removed - removing test

* Debug instead of info

* Unused import
2016-09-12 19:59:34 -07:00
clach04 c90cc77c41 bluetooth_le_tracker clarify header with LE (#3328) 2016-09-12 07:56:12 +02:00
Teagan Glenn 360a650370 Automatic Device Tracker Bug Fix (#3330)
* Iterate over items

* Pass display name as host name
2016-09-11 21:53:05 -07:00
Johann Kellerman dba78b02da Add voluptuous to locative (#3254) 2016-09-12 01:12:28 +02:00
Mal Curtis 8438001942 Fix TP-Link Archer C7 long passwords (#3225)
* Fix tplink C7 long passwords

Fixes an issue where passwords longer than 15 chars could not log in to Archer C7 routers.

* Truncate in correct place

* Add comment about TP-Link C7 pass truncation

* Fix lint error

* Truncate comment at 79 chars not 80
2016-09-10 08:08:51 -07:00
Johann Kellerman 47864fc7d7 Owntracks voluptuous fix (#3191) 2016-09-06 18:35:10 -07:00
Bart274 9ade87013e Bluetooth: keep looking for new devices (#3201)
* keep looking for new devices

* Update bluetooth_tracker.py

* change default value for tracking new devices

* remove commented code
2016-09-06 11:51:36 -06:00
Johann Kellerman 17a2cac7e1 Use Voluptuous for Luci and Netgear device trackers (#3123)
* Use Voluptuous for Luci and NEtgear device trackers

* str_schema shortcut

* Undo str_schema
2016-09-05 11:37:36 -06:00
Johann Kellerman ad52816595 Use voluptuous for BT and Owntracks device trackers (#3187)
🐬
2016-09-04 11:10:20 -06:00
Johann Kellerman 22362727e4 Use voluptuous for Unifi, Ubus (#3125) 2016-09-04 10:06:16 +02:00
Open Home Automation db7f6a328f Bugfix: ctach Runtime errors (#3153)
"RuntimeError: Disable scan failed" has been seen in a live installation
2016-09-03 16:47:11 -07:00
Dan 68ef55a982 Add exclude option to nmap device tracker (#2983)
* Add exclude option to nmap device tracker

Adds an optional exclude paramater to nmap device tracker.
Devices specified in the exclude list will never be scanned
by nmap. This can help to reduce log spam.

ex:
```
device_tracker:
  - platform: nmap_tracker
    hosts: 10.0.0.1/24
    home_interval: 1
    interval_seconds: 12
    consider_home: 120
    track_new_devices: yes
    exclude:
      - 10.0.0.2
      - 10.0.0.1
```

* Handle optional exclude

* Style fixed
2016-09-03 16:41:38 -07:00
Johann Kellerman 91a3522100 Improve voluptuous and login errors for Asus device tracker (#3170) 2016-09-03 17:32:43 -06:00
Johann Kellerman fe7f797ad9 Add voluptuous for tomato and SNMP (#3172) 2016-09-03 17:30:48 -06:00
Teagan Glenn 601395bc12 Automatic ODB device tracker & device tracker attributes (#3035) 2016-09-03 18:38:17 +02:00
Johann Kellerman a571271c39 Use voluptuous for Aruba (#3119) 2016-09-01 22:28:46 -06:00
Johann Kellerman 586e47d08d Use Voluptuous for BT Home Hub (#3121) 2016-09-01 22:28:28 -06:00
Johann Kellerman 78f0e681ed Use voluptuous for Fritzbox and DDWRT (#3122) 2016-09-01 22:28:03 -06:00
Johann Kellerman dadcf92290 Allow 'None' MAC to be loaded from known_devices (#3102) 2016-09-02 00:02:35 +02:00
Open Home Automation 83f1272662 Fix for BLE device tracker (#3019)
* Bug fix tracked devices
* Added scan_duration configuration parameter
2016-09-01 22:18:58 +02:00
Fabian Affolter 24d412938e Use voluptuous for HDMI CEC & CONF_DEVICES constants (#3107) 2016-09-01 22:04:00 +02:00
Greg Dowling 0943cc78cd Merge pull request #2973 from nma83/owntracks-waypoint-import
Owntracks waypoint import
2016-08-31 15:25:49 +01:00
NMA 12e2c38436 Code review feedback from @pavoni 2016-08-31 08:16:01 +05:30
Johann Kellerman 55d305359e Device tracker component & platform validation. No more home_range. (#2908)
* Device tracker component & platform validation. No more home_range.

* Mock, bluetooth

* Renamed _CONFIG_SCHEMA. Raise warning for #1606

* test duplicates

* Fix assert

* Coverage

* Typing

* T fixes
2016-08-30 10:22:52 -06:00
Daniel 62bbda1f82 Bug fix for asuswrt device_tracker. Issue #3015 2016-08-29 08:23:20 +02:00
Daniel Høyer Iversen 821b3d7fac Bug fix for asuswrt device_tracker. Issue #3015 (#3016)
🐬
2016-08-28 17:34:01 -06:00
NMA 70fe7f747a * Improved zone naming in waypoint import
* Added more test coverage for owntracks and zone
2016-08-28 13:18:30 +05:30
Johann Kellerman 6f1c97b9d3 Voluptuous for AsusWRT (#2998)
* Voluptuous for AsusWRT
2016-08-27 22:30:06 +02:00
NMA 5a25c74276 Refactored zone creation based on code review feedback, enhanced configuration 2016-08-26 19:52:08 +05:30
NMA 2ca3541eac Fixed zone test break and code style issues 2016-08-25 21:33:07 +05:30
NMA 95b7a8c4b9 Removed redundant assignment to CONF_WAYPOINT_IMPORT_USER 2016-08-25 17:07:53 +05:30
NMA 185ae50e24 Rebased to upstream 2016-08-25 17:02:45 +05:30
NMA e6b7511e7d Added test for Owntracks waypoints import 2016-08-25 16:52:22 +05:30
NMA 1ada7d6211 Backend support for importing waypoints from owntracks as HA zones 2016-08-25 16:52:22 +05:30
NMA 2bea5a484f Added test for Owntracks waypoints import 2016-08-25 16:47:34 +05:30
Teagan Glenn d2f7b3c7db Merge pull request #2922 from dpford/tplink-5g
Add tplink Archer C7 device tracking support for 5Ghz networks
2016-08-21 16:49:19 -06:00
Dan Ford 2b4980ae5d Add tplink Archer C7 device tracking support for 5Ghz networks 2016-08-21 13:09:44 -07:00
Nolan Gilley 635e5c8eba Add voluptuous to ecobee, speedtest.net, fast.com, actiontec, forecast.io (#2872)
* add voluptuous

* fixes for comments

* str to cv.string
2016-08-21 10:29:13 -07:00
Open Home Automation ccd8f51253 Ble tracker (#2810)
* Added Bluetooth Low Energy device tracker

* Added new file(s)

* Fixed pylint errors

* Remove traling zeros from device names

* recreated deleted file

* Added requirements

* Renamed to bluetooth_le tracker
Removed gattlib from tests
Minor code cleanup

* - fixed .coveragerc bug
- changed discovery algorithm, new devices will only be added if seen 5 times to make sure
  HA doesn't blow the database with devices just passing by
2016-08-17 23:41:05 -07:00
Robbie Trencheny 37561765ff Add Gravatar support to device_tracker (#2836)
* Support passing an email address linked to Gravatar as the picture in known_devices.

* Add a dedicated field for Gravatar

* Bring tests back up to where they were before Gravatar.

* Add tests for Gravatar.
2016-08-16 21:08:57 -07:00
pavoni 41dad9a8f7 Tidy warnings. 2016-08-16 09:48:13 +01:00
pavoni c0b1ff0eaf Handle accuracy zero correctly in enter/leave events. 2016-08-15 13:08:30 +01:00
NMA 75e6ed87d6 Backend support for importing waypoints from owntracks as HA zones 2016-08-12 14:48:28 +05:30
Fabian Affolter 5faba21b8c Upgrade python-nmap to 0.6.1 (#2681) 2016-07-31 13:47:46 -07:00
Johann Kellerman 4f89230251 Update icloud to respect track=false. (#2640) 2016-07-27 20:38:55 -07:00
Johann Kellerman 8c728d1b4e Update icloud device_tracker (#2614)
*  slugify() for dev_id (fixes #2162) [Keep space replacement to not impact known_devices.yaml]
*  pyicloud upgrade 0.9.1
*  config validation
*  Only poll icloud every 4 minutes...
*  Immediately pull device state on HASS start
*  Added new test with icloud char e' acute [chr(233)]
* Suppress pyicloud logging
2016-07-26 23:53:31 +02:00
Paulus Schoutsen ef64e11b50 known devices yaml robustness (#2523) 2016-07-13 23:56:02 -07:00
Dale Higgs ab63fbff3f Fix AsusWRT to prevent SSH key confusion (#2467)
Changed "pub_key" to "ssh_key" while maintaining backwards compatibility. Quotes were also updated to match across the file.
2016-07-08 08:58:31 -07:00
Jordan Keith 83a72ab4dc Update unifi.py to support sites (#2434)
* Update unifi.py

Add support for a site that is not the default within the Unifi Controller.

i.e. A controller with multiple sites:

 - Home
 - Friends
 - Parents (default)

Supplying the identifier for 'Home' now means that the devices tracked will be associated with 'Home'.

* Update test_unifi.py

Fix test modules as well.
2016-07-04 08:20:00 -07:00
Matthew Treinish aa3d0e1047 Fix incorrect check on presence of password and pub_key (#2355)
This commit fixes an issue with the use of None in default values
for the config get() calls in __init__() of AsusWrtDeviceScanner.
These values are cast as strings and when a NoneType is cast it
returns the string "None" this broke the check for the existence
of these fields. This commit fixes the issue by changing the default
value to be an empty string '' which will conform with the behavior
expected by the ssh login code.

Closes #2343
2016-06-22 17:01:39 -07:00
Lewis Juggins 7b8b78ec0e BT Home Hub 5 device tracker support (#2250) 2016-06-14 22:41:49 -07:00
Per Sandström 38030fcfca ASUSWRT Autodetect protocol (#2300) 2016-06-14 22:17:32 -07:00
Paulus Schoutsen 39913075f4 Fix Locative view name 2016-06-14 22:12:44 -07:00
Matthew Treinish 1381984b77 Add ssh public key support to the asuswrt component (#2287)
The pexpect.pxssh module has support for using public key
authentication. [1] This commit adds support for leveraging that and
establishing a ssh connection with a public key instead of a password.

[1] http://pexpect.readthedocs.io/en/stable/api/pxssh.html#pexpect.pxssh.pxssh.login
2016-06-12 21:27:41 -07:00
Paulus Schoutsen 30f74bb3ca Migrate to generic discovery method (#2271)
* Migrate to generic discovery method

* Add tests for discovery
2016-06-11 17:43:13 -07:00
Paulus Schoutsen b60806583c Update asuswrt.py 2016-06-10 21:14:11 -07:00
Jeffrey Lin 30f5727b40 Added support for AP mode in asuswrt (#2263)
* Added support for AP mode in asuswrt

* Corrected number of return values in asuswrt
2016-06-09 21:30:47 -07:00
Fabian Affolter 69f2f0f34a Upgrade pysnmp to 4.3.2 (#2236)
* Upgrade pysnmp to 4.3.2

* Fix pylint issue
2016-06-05 15:57:46 -07:00
Paulus Schoutsen 1798df7686 Handle invalid dev ids for dev tracker + owntracks (#2174) 2016-05-26 21:49:44 -07:00
Paulus Schoutsen 15e329a588 Tons of fixes - WIP 2016-05-21 15:01:33 -07:00
pavoni 8ff9506138 Ignore acc: 0 updates. 2016-05-19 16:16:43 +01:00
pavoni dd1703469e Handle region enter/leave with spaces. 2016-05-19 16:04:55 +01:00
froz 8d34b76d51 Restored telnet as an option. Activate with config option 'protocol: telnet'. Default is ssh (#2096) 2016-05-17 15:55:12 -07:00
froz 49acdaa8fd Device Tracker - ASUSWRT: Replaced telnet with ssh (#2079) 2016-05-15 12:20:17 -07:00
Paulus Schoutsen 6901e5ea5e Random fixes (#1996)
* OwnTracks handle malformed data better

Fixes #1991 .

* Remove dependency for util.dt
2016-05-07 10:16:14 -07:00
Bart274 d4fe6f385a Update pyicloud version (#1849)
* Update requirements_all.txt

* Update icloud.py
2016-04-24 06:49:04 +02:00
Dan 43a94995c2 Update unifi version
New unifi version has a fix that will allow it to install correctly
2016-04-21 07:56:19 -07:00
Manoj c1ca13d613 Add bluetooth device tracker (#1830)
This tracker discovers new devices on boot and tracks bluetooth devices
periodically based on interval_seconds value. Devices discovered are
stored with 'BT_' as the prefix for device mac.

Requires PyBluez
2016-04-19 08:18:46 -07:00
deisi e8bf47ff59 Fix for the issue #1323 (#1835) 2016-04-17 12:32:04 -07:00