Announcement: The Alexa Skills Community Is Moving To Stack Overflow

For improved usability and experience, Alexa skills related forum support will be transitioned to Stack Overflow. Effective January 10, 2024, the Amazon Developer Forums will no longer be available. For continued Alexa skills support you can reach out to us on Stack Overflow or via Contact Us.

question

Surender Singh avatar image
Surender Singh asked

Motion sensor not triggering smart home skills (smart home skill also includes custom skill)

My Idea is

1. Motion sensor reports to Alexa (via hub) when motion detected.

2. Now I want to trigger smart home skill to make an announcement through Alexa Device.

Example: Main gate sensor detected motion and Alexa announced in the room that "Main gate has been open...".

I have checked below announcement of motion sensor's published API

https://developer.amazon.com/blogs/alexa/post/bda9d70c-2f0d-454d-9939-2eb82868cf35/announcing-contact-and-motion-sensor-apis-and-integration-into-alexa-routines-adding-new-home-automation-features-for-customers-and-new-opportunities-for-smart-home-developers


But didn't any information regarding making announcements from Smart Home skills on sensor state changes. First question is if announcements are possible from the Smart Home Skills and if yes then please give me some more details in order to create my Smart home Skills with announcements.


Many Thanks


alexa skills kitalexa voice servicealexa smart homealexa for business
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sean gracey avatar image
sean gracey answered

I have been playing with this and have been able to use my contact and motion sensors to trigger routines in the skill I'm developing. For me they show up under "When this happens->Device". And I have been playing with having Alexa say something when my Garage door is open.

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Surender Singh avatar image Surender Singh commented ·

Thanks for responding, please give brief details to trigger routines base on sensor.

0 Likes 0 ·
sean gracey avatar image
sean gracey answered

To enable your skill to publish events to the event gateway it is a large code change, for myself I had to setup an oauth2 client, authenticate with the gateway, and redo all my messaging in the skill to enable the local client to send message back to my cloud server, and eventually the messages to the event gateway. And on top of that rewrite my local client to support event message pushes.

Amazon, did a great job of already documenting this, thru the pages linked from that page. For me, coding this took about a month with a lot a new components required in my skill.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jimmy Jones avatar image
Jimmy Jones answered

Yes can someone post a good example of how to trigger a routine based on an event from a sensor?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.