1
mirror of https://github.com/home-assistant/core synced 2024-09-12 15:16:21 +02:00
Commit Graph

44 Commits

Author SHA1 Message Date
Florian Klien
5418e0510d XMPP HTTP upload (#17426)
* notify.xmpp: first working http upload

* extension guessing for upload

* docstrings, flake8, pylint

* hass.async_add_executor_job(...)

* catch more errors, allow unverified SSL request

allow user to specify unverified SSL request to URL
cleaner code
catch more exceptions

* pylint

* catching XMPP exceptions, timeout for requests call

removed calls for roster and presence
added timeout for upload request call
cleared up debug, info, warning messages
cleared up requests call for secure and insecure retrieval of image
catching IqError, IqTimeout, XMPPError from slixmpp
docstring updated

* added timout for http upload of local files

* timeout, mimetypes, random filenames

guessing filetypes and mimetypes with stdlib mimetypes
setting a random filename for privacy
working around slixmpp timeout issues with asyncio.wait_for

* code cleanup

* added file upload for rooms/groupchats

* version bump for slixmpp to 1.4.1

added NotConnectedError, removed double catches of IqErrors
removed asyncio import

* slixmpp 1.4.1 in requirements_all

* added url and path templating

* Minor changes

* fixed review requests

fixed possible path issue for foo/../bar/ paths
fixed possible access for non-whitelisted files
fixed None or X
fixed try-else block, moved else block into try
fixed raising error in upload_file if url is None
fixed using data.get after it's already been checked
fixed added docstring for tiny get_url function
2018-11-04 09:17:05 +01:00
Florian Klien
d4b092706a XMPP async (#17283)
* new lib dependencies, working old xmpp

* non working aioxmpp

* reverting to sync xmpp

will try slixmpp instead of aioxmpp

reasons:
echo bot example of aioxmpp had blocking behavior (slixmpp echo bot works fine)
closer API to sleekxmpp
less dependencies than aioxmpp

* first working slixmpp version

* DEBUG messages, changed MUC call

the joinMUC method changed from sleekxmpp to slixmpp
added debug messages
better name for cleanup callback

* flake8

* little cleanup, tested MUC

* requirements_all

* dependencies managed by slixmpp, removed debug messages

* resource configurable by user, requirements updated

* changed __init__ parameter code format

* removed trailing dots from LOG messages

* changed super call to python3 format
2018-10-13 10:37:42 +02:00
Ville Skyttä
1c42caba76 Pylint 2 useless-return fixes (#15677) 2018-07-25 19:35:57 +02:00
Ben Randall
7d43ad6a37 Colorlog windows fix (#13929)
* Fix colorlog on windows

Modified the way logging is initialized to fix two things.
1. If the import of `colorlog` fails the logs will still be formatted
   using the expected HASS log format.
2. Ensure that `logging.basicConfig` is called AFTER `colorlog` is
   imported so that the default handler generated will be writing to the
   wrapped stream generated when `colorama` is initialized.  This allows
   colored logging to work on Windows.

Added support for a `--log-no-color` command line switch in the event
that someone just wants to disable colored log output entirely.

* Fix line lengths

* Switch default value
2018-04-18 10:18:44 -04:00
Fabian Affolter
690760404b
Move constant to 'const.py' and use already defined ones (#10211) 2017-10-29 17:28:07 +01:00
Ludovic
628b9bd8d8 notify.xmpp - Add support for MUC (#9931)
* Add support for MUC

* Fix two spaces before inline comment
2017-10-18 16:28:37 +02:00
Fabian Affolter
19887f8742 Upgrade pyasn1 to 0.3.7 and pyasn1-modules to 0.1.5 (#9810) 2017-10-11 16:26:34 +03:00
Fabian Affolter
f1aef33dd6 Upgrade pyasn1 to 0.3.6 (#9548) 2017-09-23 18:32:29 +02:00
Fabian Affolter
ced642c862 Upgrade pyasn1 to 0.3.5 and pyasn1-modules to 0.1.4 (#9474) 2017-09-18 07:45:27 +02:00
ohmer1
5971a7c009 Optionally disable ssl certificate validity check. (#9181)
* Optionally disable ssl certificate validity check.

* Fix lines too long.

* Fix formatting.

* Force build CI

* Fix "Method could be a function (no-self-use)"
2017-09-06 08:58:13 +03:00
Fabian Affolter
8673e53940 Upgrade pyasn1 to 0.3.3 and pyasn1-modules to 0.1.1 (#9216) 2017-08-29 21:06:18 -07:00
Fabian Affolter
24e9fa238a Upgrade pyasn1 to 0.3.2 and pyasn1-modules to 0.0.11 (#8856) 2017-08-06 15:20:13 +02:00
Fabian Affolter
bc376f7045 Upgrade pyasn1 to 0.3.1 and pyasn1-modules to 0.0.10 (#8787) 2017-08-02 14:14:01 +02:00
Fabian Affolter
1432ae649a Upgrade pyasn1-modules to 0.0.9 (#7887) 2017-06-03 22:33:43 +02:00
Fabian Affolter
cf1a27bd7c Use constants (#7888) 2017-06-03 22:33:12 +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
Fabian Affolter
8d606f8d16 Upgrade sleekxmpp to 1.3.2 (#6773) 2017-03-24 21:44:04 +01:00
Fabian Affolter
9330142987 Upgrade pyasn1 to 0.2.3 (#6588) 2017-03-13 21:01:45 +01:00
Fabian Affolter
12bc7c7316 Upgrade pyasn1 to 0.2.2 (#5796) 2017-02-07 22:55:21 +01:00
Fabian Affolter
d88c903537 Upgrade pyasn1 to 0.2.1 (#5755) 2017-02-05 10:16:57 +01:00
Martin Hjelmare
9db1aa7629 Add discovery notify support and mysensors notify (#5219)
* Add mysensors notify platform

* Make add_devices optional in platform callback function.
* Use new argument structure for all existing mysensors platforms.
* Add notify platform.
* Update mysensors gateway.

* Refactor notify setup

* Enable discovery of notify platforms.
* Update and add tests for notify component and some platforms.
* Continue setup of notify platforms if a platform fails setup.
* Remove notify tests that check platform config. These tests are not
  needed when config validation is used.
* Add config validation to APNS notify platform.
* Use discovery to set up mysensors notify platform.

* Add discovery_info to get_service and update tests

* Add discovery_info as keyword argument to the get_service function
  signature and update all notify platforms.
* Update existing notify tests to check config validation using test
  helper.
* Add removed tests back in that checked config in apns, command_line
  and file platforms, but use config validation test helper to verify
  config.
* Add a test for notify file to increase coverage.
* Fix some PEP issues.

* Fix comments and use more constants

* Move apns notify service under notify domain
2017-01-15 03:53:14 +01: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
d4b3f56d53 Maintenance (#4101)
* UPdate ordering, fix typos, and align logger messages

* Update import style, fix PEP257 issue, and align logger messages

* Updaate import style and align logger messages

* Update import style and align logger messages

* Update ordering

* Update import style and ordering

* Update quotes

* Make logger messages more clear

* Fix indentation
2016-10-29 09:12:43 -07:00
Fabian Affolter
002660fd9e Upgrade dnspython3 to 1.15.0 (#3804) 2016-10-10 23:24:10 -07:00
Fabian Affolter
3b5142eb85 Upgrade dnspython3 to 1.14.0 (#3522) 2016-09-28 00:07:39 -07:00
Pascal Vizeli
e460d8f637 Use voluptuous for message_bird, sendgrid (#3136) 2016-09-05 07:07:31 +02:00
Pascal Vizeli
6b6d34ba51 Use voluptuous for xmpp (#3127) 2016-09-01 22:27:28 -06:00
Lewis Juggins
0bcfb65a30 Refactor notification titles to allow for them to be None, this also includes a change in Telegram to only include the title if it's present, and to use a Markdown parse mode for messages (#3100) 2016-09-01 14:35:46 +01:00
Fabian Affolter
4a16d8064d Enable certificate verification and allow non-encrypted communication (#1763) 2016-04-11 21:55:17 -07:00
Fabian Affolter
652f059d6a Fix PEP257 issues 2016-03-08 11:46:32 +01:00
Paulus Schoutsen
e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen
a301d869d7 PyLint 1.5 fixes 2015-11-29 13:49:05 -08:00
Fabian Affolter
bfa8e58879 Update link to docs (Jekyll 3 update) 2015-11-09 18:33:11 +01:00
Paulus Schoutsen
98b4c27211 Style fixes 2015-11-08 22:21:02 -08:00
Paulus Schoutsen
3b3f5fe6fe Clean up notifiy component 2015-11-08 22:15:34 -08:00
Fabian Affolter
893b9fc8ac Move configuration details to docs 2015-10-13 22:08:11 +02:00
Fabian Affolter
f9cecdee28 Update docstring (config file) and attempt to honor PEP0257 2015-09-07 18:26:20 +02:00
Ryan Kraus
893ae15042 Changed component REQUIREMENTS to absolute versions. 2015-08-29 21:39:50 -04:00
Fabian Affolter
e0db473294 update dnspython 2015-08-27 14:26:06 +02:00
Fabian Affolter
387769edff add dnspython 2015-08-27 14:16:29 +02:00
Paulus Schoutsen
940b2998ea Add REQUIREMENTS list to components 2015-07-07 00:01:46 -07:00
Fabian Affolter
fdb46d80ba Update documentation 2015-05-13 19:06:17 -07:00
Fabian Affolter
76fd70657a remove deprecated parameter 2015-05-10 23:22:06 +02:00
Fabian Affolter
07b5f3d597 initial xmpp nofication platform 2015-05-10 22:23:25 +02:00