home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.67k stars 30.42k forks source link

Migrate XMPP notify platform to asyncio #17005

Closed fabaff closed 6 years ago

fabaff commented 6 years ago

Home Assistant release with the issue:

A while

Operating environment (Hass.io/Docker/Windows/etc.):

Needs to work on all.

Component/platform: https://www.home-assistant.io/components/notify.xmpp/

Description of problem: Currently we use sleekxmpp which doesn't support asyncio and has some issue which could become relevant in the futures. The integration should be migrated to a different Python XMPP module. E.g., slixmpp or aioxmpp.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

notify:
  - name: NOTIFIER_NAME
    platform: xmpp
    sender: YOUR_JID
    password: YOUR_JABBER_ACCOUNT_PASSWORD
    recipient: YOUR_RECIPIENT
thundergreen commented 6 years ago

My idea would be by refactoring this component also to integrate httupuload with a Python project like

https://github.com/sezuan/uploadr

Fir the moment I use this upload component with shell scripts but would be nice having this wrapped around xmpp component to be able to also send pictures / media like with telegram

I would go for aioxmpp with httupuload feature described here:

https://docs.zombofant.net/aioxmpp/devel/api/public/httpupload.html#module-aioxmpp.httpupload

flowolf commented 6 years ago

I'll give that a go! not sure if the HTTP-upload feature will be part of the first PR, but let's see.