Commit graph

45 commits

Author SHA1 Message Date
stephanerosi
f11d4319d2 Fix typo an coding style (#13970) 2018-04-18 12:43:55 +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
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
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
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
Pascal Vizeli
f86bd15580 Cleanup old device_tracker stuff (#8627)
* Cleanup old device_tracker stuff

* Fix lint
2017-07-24 07:45:02 -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
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
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
Daniel Høyer Iversen
ee5b9e7291 Configurable scan options for nmap (#4838) 2016-12-10 19:53:25 +02: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
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
hcooper
d60c2d604f Add support for multiple inputs to nmap tracking module as a list (#3944) 2016-10-20 07:15:00 +02: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
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
Fabian Affolter
5faba21b8c Upgrade python-nmap to 0.6.1 (#2681) 2016-07-31 13:47:46 -07:00
Fabian Affolter
f7943d9448 Upgrade python-nmap to 0.6.0 (attempt to fix #1592) 2016-03-23 22:25:35 +01:00
Fabian Affolter
cc7a4d545e Fix PEP257 issues 2016-03-07 21:18:53 +01:00
Fabian Affolter
7ff9aecd4e Update docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Paulus Schoutsen
e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Johan Carlquist
6a021c9ef6 Support for legacy nmap.
Older nmap like the one bundled with Ubuntu Precise (12.04), 5.21
requires that you specify what unit the value to --host-timeout is.
2015-11-28 20:43:27 +01:00
Fabian Affolter
97f9f8aa49 Update link to docs (Jekyll 3 update) 2015-11-09 13:12:18 +01:00
Fabian Affolter
403889bbeb Move configuration details to docs 2015-10-13 20:55:45 +02:00
Paulus Schoutsen
0624725e21 Ignore nmap style issue - pylint bug 2015-10-08 21:45:51 -07:00
Paulus Schoutsen
dc5f0ef314 NMap: fix hostname resolver
Fixes #482
2015-10-08 21:01:38 -07:00
Paulus Schoutsen
7e75add144 Update nmap dependency 2015-09-13 23:35:12 -07:00
Fabian Affolter
514b8eddb9 Update docstring (config file) and attempt to honor PEP0257 2015-09-07 19:19:11 +02:00
Paulus Schoutsen
03ceb667ba Hotfix for nmap -> v7.1 2015-09-01 08:50:45 -07:00
Paulus Schoutsen
b41706efe3 Make nmap work in Docker 2015-08-31 22:01:45 -07:00
Paulus Schoutsen
78826648e3 style + dependency fix 2015-08-31 00:44:59 -07:00
Paulus Schoutsen
ffac067be8 Migrate nmap_tracker to use different nmap lib 2015-08-31 00:29:41 -07:00
Ryan Kraus
f5b98c86f0 Mostly PyLint and Flake8 updates.
Rewrote imports of exceptions to be from the exceptions module.
Made nmap scanner check for libnmap dependency without crashing.
Various flake8 and pylint updates.
2015-08-29 22:34:35 -04:00
Ryan Kraus
893ae15042 Changed component REQUIREMENTS to absolute versions. 2015-08-29 21:39:50 -04:00
Paulus Schoutsen
74308b2677 Upgrade nmap dependency 2015-08-18 14:37:53 -07:00
Paulus Schoutsen
60ade75031 Add missing dependencies 2015-08-08 21:22:34 -07:00
Edwin Smulders
71ac550e7d Let the nmap device tracker return upper case MAC addresses. 2015-05-25 21:33:58 +02:00
Paulus Schoutsen
ae0cf49560 UTC upgrades for scheduler, nmap tracker, dsl_trigger 2015-05-14 21:07:15 -07:00
Fabian Affolter
6b42227b13 update header 2015-05-11 18:06:12 +02:00
Paulus Schoutsen
4484baa866 Remove lock and add host timeout to NMAP scanner 2015-03-25 22:50:51 -07:00
andythigpen
bfb5089ed5 Add configurable interval for nmap_tracker when devices are home.
Adds an option that will exclude devices from the periodic nmap scan
for the configured number of minutes.
2015-03-08 15:54:00 -05:00
Paulus Schoutsen
ff230cefe3 Disable pylint unused-argument check 2015-01-19 23:40:51 -08:00
Paulus Schoutsen
47e6290609 Make nmap mac regex more flexible to play nice with OS X 2014-12-19 15:42:34 -08:00
trainman419
4495812b84 nmap-based device tracking plugin 2014-12-14 23:28:12 -08:00