crserran / home-alarm

Alexa & Google Home alarm integrations and notifications system for your home security.
https://crserran.github.io/home-alarm
MIT License
22 stars 6 forks source link

Google Home Audio Issue #9

Closed LordNex closed 3 years ago

LordNex commented 3 years ago

Hello, NeX again.

Good news I got everything almost working. Lovelace is setup. Got 3 sensors installed and more on the way from Amazon. Issue I'm having mainly is getting it to fire the mp3 as an alarm. I first put the mp3 in the local/www directory on HA. Apps.yaml below. But when I did I would get a volume change sound on each speaker about every 2 seconds when triggered, but it would never fire the mp3.

I figured maybe us was due to the LetsEncrypt SSL I have on so instead I found a mp3 housed on an outside web server that was completely public. When I trigger the alarm with this I again get the volume increase sound, over and over every 2 seconds, until I toggle the alarm off in Lovelace. Once I do that it will play one loop of the mp3 on my bedroom_speaker but nothing on the whole_house group I have set.

I'm going to try and remove the grouping and send the command to each speaker individually, but the fact that I did that with the bedroom_speaker and it didn't play tells me somethings off. Any suggestions would be wonderful. Let me know if you need any logs.

`--- hello_world: module: hello class: HelloWorld

home_alarm: module: home_alarm class: HomeAlarm sensors:

Configuration.yaml

'``binary_sensor:

xaviml commented 3 years ago

Hi @LordNex,

You are hearing the audio over and over again every 2 seconds because your loop_delay is set to 2. This attribute is for Home Alarm to know how often the alarm needs to be replayed until reaching the duration from stop_delay. So loop_delay should be approximately equal or a little bit less than the actual duration of your mp3 if it's shorter than stop_delay, otherwise you can just remove the loop_delay attribute.

I hope this solves your issue.

Cheers, Xavi M.

P.S.: If you want to add a YAML configuration in here or any markdown editor, you can wrap your configuration with a block of ```, so like:

```yaml Your YAML code here ```

LordNex commented 3 years ago

Lol thought I had that code block wrapped sorry. It wasn't the actual audio that was playing. It was the beep sound of the speaker changing volume that keeps chirping. It's like it keeps trying to set the volume each time as well

I was finally able to get the audio to play. Had to specify each speaker instead of the speaker group I created in google home and then synced to HA. Just need to get the right sound and loop time set. I currently have 4 google home mini's but I'm really thinking of getting a Louder Db speaker, or hooking my large Theater speakers in. Still would love to try and find a way to use a voice activated pin or passcode to power it down. Make it more "Jarvis Like" LOL

xaviml commented 3 years ago

Interesting.. Well, I am glad you got it working @LordNex. Do you think @crserran can close this issue then since is solved?

Regarding the voice-activated pin, if you find how to actually do something like this, I would love to hear from it since it is something I would be also interested :D

Cheers, Xavi M.

LordNex commented 3 years ago

Yea go ahead. It’s was more of just a question than an issue anyway. I’m going to look into the voice pin as I have Ben able to do similar things with google tts before. My only problem is that I’m not familiar with AppDaemon so when it comes to troubleshooting anything these I’m somewhat at a loss. But I always love a challenge!

Thanks again man!

LoRd_NeX

On Oct 20, 2020, at 12:24 PM, Xavi Moreno notifications@github.com wrote:



Interesting.. Well, I am glad you got it working @LordNexhttps://github.com/LordNex. Do you think @crserranhttps://github.com/crserran can close this issue then since is solved?

Regarding the voice-activated pin, if you find how to actually do something like this, I would love to hear from it since it is something I would be also interested :D

Cheers, Xavi M.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/crserran/home-alarm/issues/9#issuecomment-713018486, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJD3CY5NTOIAWBJNEKLSLXBT3ANCNFSM4SWZIBYA.

LordNex commented 3 years ago

Oh, one other quick question. Do you know a way to insert which sensor triggered the alarm into the notifier message going to the mobile devices? Something like {sensor} as a variable or anything? Would be nice to include dynamic information into the message so that I know what was causing it. Thanks

LoRd_NeX

On Oct 20, 2020, at 12:24 PM, Xavi Moreno notifications@github.com wrote:



Interesting.. Well, I am glad you got it working @LordNexhttps://github.com/LordNex. Do you think @crserranhttps://github.com/crserran can close this issue then since is solved?

Regarding the voice-activated pin, if you find how to actually do something like this, I would love to hear from it since it is something I would be also interested :D

Cheers, Xavi M.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/crserran/home-alarm/issues/9#issuecomment-713018486, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJD3CY5NTOIAWBJNEKLSLXBT3ANCNFSM4SWZIBYA.

xaviml commented 3 years ago

Hi @LordNex,

You can add {sensor} in the title and message attributes. Like:

    - id: notifier
      notifiers:
        - notify.mobile_app_iphone
        - notify.notifier
      title: "ALARM ALERT! {sensor}"
      message: "Alarm has been fired from {sensor} sensor"

The {sensor} will be replaced by the friendly name of the sensor that was triggered.

Hope this helps, Xavi M.

LordNex commented 3 years ago

Perfect! Thanks a ton man! Keep up the good work!

On Oct 20, 2020, at 12:44 PM, Xavi Moreno notifications@github.com wrote:



Hi @LordNexhttps://github.com/LordNex,

You can add {sensor} in the title and message attributes. Like:

- id: notifier
  notifiers:
    - notify.mobile_app_iphone
    - notify.notifier
  title: "ALARM ALERT! {sensor}"
  message: "Alarm has been fired from {sensor} sensor"

The {sensor} will be replaced by the friendly name of the sensor that was triggered.

Hope this helps, Xavi M.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/crserran/home-alarm/issues/9#issuecomment-713029628, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJAUTUQHYLTTFUXYXOTSLXEA7ANCNFSM4SWZIBYA.

crserran commented 3 years ago

Thank you everybody! I am going to close the issue. You know that if you have any problem can open another one.

Thank you a lot for your support!!