GithubHelp home page GithubHelp logo

jumping2000 / notifier Goto Github PK

View Code? Open in Web Editor NEW
32.0 6.0 5.0 560 KB

Appdaemon Notifier Centre for Home Assistant - hassiohelp.eu crew

Home Page: https://hassiohelp.eu

License: GNU General Public License v3.0

Python 100.00%
home-assistant home-automation hassio hassio-configuration appdaemon appdaemon-apps companion-app homeassistant notification-center notifications

notifier's Introduction

GitHub release (latest by date) GitHub Release Date

Appdaemon Notifier for Home Assistant

Buy me a coffeeBuy me a coffee

Notifier Centre for Home Assistant jumping2000
GitHub release (latest by date) GitHub Release Date Hass.io Maintenance GitHub issues

Package-Notification-HUB-AppDaemon
GitHub release (latest by date) GitHub Release Date Hass.io Maintenance GitHub issues

Notifier is an AppDaemon app which works togheter with Centro Notifiche to sends text (Telegram, Push, WhatsApp), TTS Google and Alexa, VoIP notifications to you and/or your devices like PC, smartphone, pad, etc..

The app works with Appdaemon v4.x.-5.x

Installation

Steps to follow:

image

(👆 remember the my: integration)

Remember it!

The app doesn't work standalone but togheter with Centro Notifiche


Ti piace questo package? Lascia una stella su Github e supportami per realizzarne altri!


notifier's People

Contributors

caiosweet avatar jumping2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

notifier's Issues

"bug" in google notifier

Ciao Giampi,

ho notato forse un bug nel notifier quando il messaggio audio è particolarmente lungo. In pratica succede che il volume viene reimpostato al livello base del periodo della giornata (mattina-pomeriggio-sera-ecc) mentre il media_player sta ancora parlando.

Pensi sia possibile creare un wait che aspetta che il media_player usato sia in idle prima di cambiare di nuovo il volume al livello precedente?

Fammi sapere se posso aiutarti in qualsiasi modo

Ciao

punti aperti

Is your feature request related to a problem? Please describe.

  1. Last message 245 se metti il timestamp altrimenti il max 255
    1.1 il restore è valido per google e Alexa, lo lasciamo così o lo rimetti nel file generale?
  2. noi usiamo markdown per telegram, meglio prevenire errori vedi .replace("","-") oppure, ma ho riscontrato problemi, forse per via di troppi test, .replace(""," ")
    Oppure sosstituire tutti i markdown (*,_,`,etcetc) con '' (dando possibilità con uno switch?)
  3. vedi title = [{} - {}] {} ho tolto * centrali
  4. come facciamo con il secret.py e secret.yaml? (volendo si può importare il secret.yaml come app.yaml ;)
  5. dividiamo le impostazioni delle entity nei file yaml? (google,alexa,ariela)
  6. aggiungi push alexa
  7. per il tts ariela non c'è la coda... ma per adesso ok!!
  8. per i replace dei tts forse tenterò di usare re.sub che ne pensi? (tipo sostituire virgole con punti, esclamazioni con punto etcetc)
  9. Al momento nel package restano come automazioni:
    id: notification_repeat_last_message_hub
    id: send_intercom_message_hub
    id: guest_mode_hub
    id: create_notification_automation_group_hub
    Che intenzioni hai?

per adesso è tutto, questo messaggio si distruggerà dopo la tua lettura :0)

Bug - I can’t find TTS GOOGLE COMPONENT

Home Assistant Core Version

2024.01.02

Home Assistant Installation Type

Home Assistant Operating System

Description

I can’t find TTS GOOGLE COMPONENT

Questo errore è restituito dalla card. Alexa funziona ma i dispositivi Google no. Con altri servizi di notifica che usano direttamente il servizio tts funziona, quindi tts funziona ed è presente. Controllato il nome aggiunto alla blueprint ed è lo stesso.

Notifier_Dispatch: ------------------------------------------------------------
2024-01-07 11:53:39.793095 WARNING Notifier_Dispatch: Unexpected error in worker for App Notifier_Dispatch:
2024-01-07 11:53:39.793314 WARNING Notifier_Dispatch: Worker Ags: {'id': '9db57c54434a4479b61cf0aed3b7ad7b', 'name': 'Notifier_Dispatch', 'objectid': 'dc96ae2cf90243cc85bb17d755e11428', 'type': 'scheduler', 'function': <bound method Notifier_Dispatch.package_download of <notifier_dispatch.Notifier_Dispatch object at 0x7f998ae83490>>, 'pin_app': True, 'pin_thread': 2, 'kwargs': {'__thread_id': 'thread-2'}}
2024-01-07 11:53:39.793548 WARNING Notifier_Dispatch: ------------------------------------------------------------
2024-01-07 11:53:39.794576 WARNING Notifier_Dispatch: Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/appdaemon/threading.py", line 1022, in worker
funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"]))
File "/homeassistant/appdaemon_apps/apps/notifier/notifier_dispatch.py", line 273, in package_download
version_installed = self.get_local_version(cn_path, FILE_MAIN) # <-- recupero versione locale
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/homeassistant/appdaemon_apps/apps/notifier/notifier_dispatch.py", line 198, in get_local_version
if os.path.isfile(cn_path + file_names):
~~~~~~~~^~~~~~~~~~~~
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

2024-01-07 11:53:39.794755 WARNING Notifier_Dispatch: ------------------------------------------------------------

Automation YAML config


alias: Centro Notifiche - Configurazione Avvio
description: new
use_blueprint:
  path: caiosweet/notifier_startup_configuration.yaml
  input:
    person:
      - person.papaa
      - person.mamma
    alexa_media_player:
      - media_player.echo
      - media_player.firetvstick_di_domenico
      - media_player.nexxt
    alexa_group_player:
      - group.ovunque
    google_media_player:
      - media_player.camera_da_letto
      - media_player.cucina
      - media_player.giorno
      - media_player.cameretta
      - media_player.notte
      - media_player.soggiorno
      - media_player.tutti
    google_group_player:
      - group.google_home_all
    ha_event_notify:
      - notify.mobile_app_iphone_mimmo
    download: true
    personal_assistant: jarvis

To Reproduce

Scrivi messaggio da interfono

invia

errore visualizzato in alto. Google non parla
Alexa parla

Expected behavior

—-

Actual Behaviour

—-

Additional Details

  • I'd like to help developing a fix for this issue.

Screenshots

No response

Additional context

No response

Problem after update to 2.0.2

If I upgrade to version 2.0.2, I get this error:

2020-11-12 19:56:22 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in call
return self._compiled([], data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 215, in _run
return self._exec(self._compiled, value, path)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 340, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 338, in _exec
v = func(path, v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
return schema(data)
File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 129, in validate
raise vol.Invalid("must contain at least one of {}.".format(", ".join(keys)))
voluptuous.error.Invalid: must contain at least one of entity_id, area_id.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1402, in async_call
processed_data = handler.schema(service_data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in call
return self._exec((Schema(val) for val in self.validators), v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 340, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 336, in _exec
v = func(v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 276, in call
raise er.MultipleInvalid([e])
voluptuous.error.MultipleInvalid: must contain at least one of entity_id, area_id.

I also noticed that if the entries I enter in the notification_media_player_google_hub contain spaces in the name (for example
"- Nest Hub

  • Home mini room ")
    these are resolved as "media_player.Nest Hub" and obviously don't work.

With version 2.0.1 I have no problems.

Grazie ;)

Errore centro notifiche

Home Assistant Core Version

2023.10.5

Home Assistant Installation Type

Home Assistant Supervised

Description

Errore sicuramente banale della mia configurazione che non riesco a risolvere.

L'automazione "CN FSM Elettrodomestici 2023.10.0 - Asciugatrice" (automation.cn_fsm_elettrodomestici_2023_10_0_asciugatrice) ha un'azione che chiama un servizio sconosciuto: script.my_notify.

Screenshot 2023-10-29 alle 10 28 18

Automation YAML config

errore

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Trigger the automation '....'
  4. See error

Expected behavior

errore

Actual Behaviour

errore

Additional Details

  • I'd like to help developing a fix for this issue.

Screenshots

No response

Additional context

No response

Usare Nabu casa

ciao volevo usare nabucasa non centro notifiche ma ho notato che il sistema del servizio risulta diverso da tts, si puo implementare nel codice, ti scrivo i due servizi per capire. magari c'è un modo nel servizio script.my_notify per utilizzare speak?

vecchio sistema che funziona con script.my_notify service: tts.google_translate_say data: message: prova messaggio entity_id: media_player.soggiorno

il tts.speak invece è cosi e non. funziona in script.my_notify

service: tts.speak target: entity_id: tts.home_assistant_cloud data: media_player_entity_id: media_player.soggiorno message: prova messaggio

in pratica utilizza target e media_player_entity_id

Feature request (Google/Alexa manager)

Media player e notifiche audio

  • Escludere servizio Google o Alexa.
  • Includere più media player (list) o tutti.
  • flessibilità opzioni.
  • Invio suoni o file audio (solo a inizio messaggio?).
  • false | no | 0 (0 per mantenere compatibilità).
  • true | yes | 1 (1 per mantenere compatibilità).
  • Migliorare gestione volumi? (Vedi se player in riproduzione).
  • Async (o evitare che un servizio blocchi il successivo se da errore).

Esempi

Esempio di funzionalità include ed esclude

google: false (esclusione del servizio, pari a switch off)

(riproduzione su questa lista usando entity o friendly_name) 
media_player_alexa: 
	- media_player.xxx
	- media_player.yyy

media_player_alexa: sala,studio 

media_player_alexa:
	- sala
	- studio

Flessibilità opzioni (anche per le notifiche testo poi vediamo)

alexa: # (tutto ciò inerente alexa)
	volume: 0.5
	voice: giorgio
	player: sala,studio #(o media_player: xx,yy)
	sound: clock #(da vedere se gestire una libreria)
	# oppure 
	# audio: soundbank://soundlibrary/foley/amzn_sfx_clock_ticking_01

alexa: no
google: # (tutto ciò inerente google)
	volume: 0.3
	media: \local\media\mio.mp3
	player: red,black (o anche all) #(o media_player: xxx)

Voip CallMeBot - Error with variable call_number using @user

Hello,

i have configured the Centro Notifiche for working with voip with callmebot.... and it is working fine.

In my system the call notification are disabled ...and for some automation i wanted to add a phone call (example: alarm)....For this , thanks to Caio , i use the variable called_number with my @username.
But when i validate my config i have :

- Error: Testing configuration at /config:
ERROR:homeassistant.util.yaml.loader : while scanning for the next token
found character '@' that cannot start any token
in "/config/packages......

I tried to use " and ' ("@user" and '@user') but is not working. For now i am using priority 1 that work great. Can you help me ?!

Thanks
Stefano
@stegazzi

Bug - Unable to use Google tts service

Home Assistant Core Version

2023.02.0

Home Assistant Installation Type

Home Assistant Operating System

Description

I'm unable to use google tts service (reverso works as expected).

I found the following message in appdaemon log:

2024-03-06 12:39:58.735921 ERROR GH_Manager: An error occurred in GH Manager - Errore nel Worker: Unknown service (default/tts/google_translate_say) in call_service from GH_Manager
2024-03-06 12:39:58.744600 INFO GH_Manager: (<class 'appdaemon.exceptions.ServiceException'>, ServiceException('Unknown service (default/tts/google_translate_say) in call_service from GH_Manager'), <traceback object at 0x7f71c6eb8100>)

Please notice that I renamed the tts service to google_translate_say (originally was google_it_it).

Automation YAML config

this is my gh_manager.yaml (updated in january 24)
___________

GH_Manager:
  module: gh_manager
  class: GH_Manager
  
  #log_level: DEBUG

  gh_service: tts.google
  ytube_player: media_player.ytube_music_player
  
  # Main hub
  gh_wait_time: input_number.notifier_tts_wait_time
  gh_select_media_player: select.notifier_player_google
  gh_sensor_media_player: sensor.notifier_player_google
  tts_period_of_day_volume: sensor.notifier_day_period_volume
  tts_language: input_select.notifier_language
  
  # Debug Sensor
  debug_sensor: sensor.notifier_debug_error
_________

To Reproduce

set notifier to send tts message using script_mynotify and click on sent: message is received on telegram for example but not streamed via google minis

Expected behavior

able to hear the tts message

Actual Behaviour

when using google (no issue with reverso) the message is not streamed and I see an error info on appdaemon log

Additional Details

  • I'd like to help developing a fix for this issue.

Screenshots

No response

Additional context

No response

WARNING AppDaemon: Unable to find module Notifier_Dispatch - initialize() skipped

Ciao, ho questo errore da quando ho aggiornato all'ultima versione, da cosa potrebbe dipendere, ho provato a rimuovere tutto compreso il container di appdaemon e il centro notifiche e riscaricare tutto da capo ma continuo ad avere questo errore.

2023-07-25 20:57:26.075332 WARNING Notifier_Dispatch: ------------------------------------------------------------
--
 
ModuleNotFoundError: No module named 'packaging'
from packaging import version
File "/conf/apps/notifier/notifier_dispatch.py", line 6, in <module>
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
response = future.result()
File "/usr/local/lib/python3.10/site-packages/appdaemon/utils.py", line 304, in run_in_executor
modname = await utils.run_in_executor(self, __import__, app_args["module"])
File "/usr/local/lib/python3.10/site-packages/appdaemon/app_management.py", line 323, in init_object
await self.init_object(app)
File "/usr/local/lib/python3.10/site-packages/appdaemon/app_management.py", line 1035, in check_app_updates
2023-07-25 20:57:26.075032 WARNING Notifier_Dispatch: Traceback (most recent call last):
2023-07-25 20:57:26.074556 WARNING Notifier_Dispatch: ------------------------------------------------------------
2023-07-25 20:57:26.074286 WARNING Notifier_Dispatch: Unexpected error initializing app: Notifier_Dispatch:
2023-07-25 20:57:26.073948 WARNING Notifier_Dispatch: ------------------------------------------------------------
2023-07-25 20:57:26.038621 WARNING Error: ------------------------------------------------------------


<br class="Apple-interchange-newline">

Grazie

Bug - with recent update

Home Assistant Core Version

2023.10.5

Home Assistant Installation Type

Home Assistant Operating System

Description

<Plugin jumping2000/notifier> Repository structure for 2023.7.0 is not compliant

Automation YAML config

fix

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Trigger the automation '....'
  4. See error

Expected behavior

fix

Actual Behaviour

fix

Additional Details

  • I'd like to help developing a fix for this issue.

Screenshots

No response

Additional context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.