* 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.
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.
* 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
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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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"
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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).
* 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.
* 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
* 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)
* 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
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.
* 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
* 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.
* 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
* 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
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>
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>
* 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
* 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
* 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
* 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
* 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
* 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
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>
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
* Allow device tracker platforms to specify picture
* Allow device tracker to specify icon during discovery
* Clean up and add tests
* Fix lint
* Fix test
* 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
* 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.
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.
* 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
* Convert automatic device tracker to push updates
* Update test
* Add to coveragerc
* Fire hass events when automatic update received
* Change brace indentation
* 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
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.
* 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.
* 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
* 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
* 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
* 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
* 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
* 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
* 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