Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Home Audio Issue #9

Closed
LordNex opened this issue Oct 19, 2020 · 8 comments
Closed

Google Home Audio Issue #9

LordNex opened this issue Oct 19, 2020 · 8 comments

Comments

@LordNex
Copy link

LordNex commented Oct 19, 2020

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:
- binary_sensor.garage_motion
- binary_sensor.side_door_tamper_alert
- binary_sensor.kitchen_window
safe_mode: input_boolean.safe_mode
activation_delay: 15
stop_delay: 120
alerts:
- id: media_player
sound: https://bigsoundbank.com/UPLOAD/mp3/0268.mp3
volume: 1
loop_delay: 2
media_players:
- media_player.whole_house
- media_player.master_bedroom_speaker
- id: notifier
notifiers:
- notify.mobile_app_iphone_inator
title: "ALARM ALERT!"
message: "Someone/something triggered your Home Alarm! Better check and see whats up!!" `

Configuration.yaml

'``binary_sensor:
- platform: mqtt
state_topic: "RF_Bridge/tele/RESULT"
name: 'Garage Motion'
unique_id: "garage_motion"
value_template: '{{value_json.RfReceived.Data}}'
payload_on: "EF641E"
off_delay: 15
device_class: motion
qos: 1
# retain: false
- platform: mqtt
state_topic: "RF_Bridge/tele/RESULT"
name: 'Side Door Tamper Alert'
unique_id: "side_door_tamper"
value_template: '{{value_json.RfReceived.Data}}'
payload_on: "E2B5EB"
off_delay: 10
device_class: problem
qos: 1
- platform: mqtt
state_topic: "RF_Bridge/tele/RESULT"
name: 'Kitchen Window '
unique_id: "kitchen_window"
value_template: '{{value_json.RfReceived.Data}}'
payload_on: "3820B9"
off_delay: 30
device_class: window
qos: 1
`'

@xaviml
Copy link
Contributor

xaviml commented Oct 19, 2020

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
Copy link
Author

LordNex commented Oct 19, 2020

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
Copy link
Contributor

xaviml commented Oct 20, 2020

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
Copy link
Author

LordNex commented Oct 20, 2020 via email

@LordNex
Copy link
Author

LordNex commented Oct 20, 2020 via email

@xaviml
Copy link
Contributor

xaviml commented Oct 20, 2020

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
Copy link
Author

LordNex commented Oct 20, 2020 via email

@crserran
Copy link
Owner

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!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants