alarmo icon indicating copy to clipboard operation
alarmo copied to clipboard

Alex Media Player Integration

Open wiredwiz opened this issue 2 years ago • 9 comments

When creating notifications, please provide a way to provide the extra optional data that an integration like "Alexa Media Player" requires to text to talk.

I Use the Alexa Media Player integration to be able to monitor my Echos as well as send them messages to announce (as I suspect very many do). If you use the "notify.alexa_media_bedroom_echo" service, it requires you to supply extra data "type: tty", otherwise the message never gets read. Currently I see no way to supply this in the Alarmo notifications. I currently have built general HA automations to accomplish this goal. The YAML that gets generated in the automation notifications I built looks like this:

service: notify.alexa_media_bedroom_echo
data:
  message: Alarm system armed
  data:
    type: tts

If we could do this from within Alarmo, it would save the writing of much more complicated automations outside of it. My proposal would be to add an extra optional "data" field that the user could use to supply the extra data flags to a service that needs it. Forgive me since I'm very new to HA, so I'm unsure if this is a common construct among notify service providers. If the "data" construct is more specific to the Alexa integration, perhaps provide a more general information box so the user could specify "data:" or any other type that might be needed by a random notify integration.

wiredwiz avatar May 20 '22 14:05 wiredwiz

I did realize that I can achieve this within Alarmo by editing the YAML directly, but I do still think it would be a good change, though I realize it is likely very low priority compared to other needs.

wiredwiz avatar May 22 '22 22:05 wiredwiz

I don't see a way to change Alarmo for this, since the parameters:

  data:
    type: tts

is specific to your device only.

From Alarmo's side its not possible (as far as I know) to determine the type of the device and adjust the service data for it. So it will be required for you to enter all parameters which are alexa specific.

nielsfaber avatar Jun 03 '22 10:06 nielsfaber

What I was envisioning was like the existing visual editor for service calls in the automations. They have a "Data" checkbox with a freeform text area to type in the parameters. Then it simply formats the text from this into the data section of the YAML. I wish I knew Python and hass better so I could assist with pull requests, but sadly my programming skills lie elsewhere.

wiredwiz avatar Jun 09 '22 20:06 wiredwiz

Could you please share how you edited the Alarmo YAML directly, I always get the error 'NoneType' object is not subscriptable

keith1831 avatar Jun 10 '22 00:06 keith1831

Here is the YAML for my bedroom amazon echo message upon arming

service: notify.alexa_media_bedroom_echo
service_data:
  message: Alarm set to {{arm_mode}}
  data:
    type: tts
  title: ''

wiredwiz avatar Jun 10 '22 00:06 wiredwiz

obviously you will want to replace the service value with your echo entity.

wiredwiz avatar Jun 10 '22 00:06 wiredwiz

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jul 10 '22 00:07 github-actions[bot]

Is there a way of adding a echo message repeat to Alarmo ? Also would like to see support for Alexa adding to this

Doghousestaffs avatar Jul 16 '22 14:07 Doghousestaffs

Here is the YAML for my bedroom amazon echo message upon arming

service: notify.alexa_media_bedroom_echo service_data: message: Alarm set to {{arm_mode}} data: type: tts title: ''

Thank you wiredwiz, I needed quotes around the message but it's working fine now.

service: notify.alexa_media_living service_data: message: 'The alarm could not be armed right now, due to: {{open_sensors}}.' data: type: tts title: ''

keith1831 avatar Jul 17 '22 00:07 keith1831

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Aug 16 '22 00:08 github-actions[bot]