Makert API and Smart App Installs

I've mostly completed setup of my Hubitat and using HSM for security monitoring. Some next steps will be further automation within the home, but something I can grow with and doesn't need completed straight away.

But one thing I would really like is to get my echo devices to also be TTS. I've seen or been recommended various programs such as Node Red and Echo Speaks. Diving into them and visiting their web pages, I was quickly humbled of not knowing how these get setup for function. Searching Youtube there isn't much in regards to Hubitat videos about this, and even this forum produced more [Release] threads than guides (If I missed something please point me in the right direction).

So, how and where to get started. Just assume I don't know much at all.

If you just want to trigger standard custom phrases (e.g. You're not trying to do anything fancy like multiple random phrases or using rule machine variables), then the easiest and most reliable way is to just setup Alexa Routines to speak your custom phrase when a motion or contact sensor is closed.

You can also use this custom code (see below) to create a virtual device and then when it's turned on via a Simple Automation rule or a Rule Machine rule, it will make Alexa think a motion or contact sensor (you choose which one when building the Alexa routine - both work, but I always use motion) and it will speak your custom phrase on your Amazon Echo. Credit goes to @cwwilson08 for the original code.

How to install and setup the Hubitat Amazon Echo Skill

How to install custom driver code

metadata {
	definition (name: "Virtual motion/contact with switch", namespace: "logname", author: "smarthomeprimer") {
		capability "Sensor"
		capability "Motion Sensor"
        capability "Contact Sensor"
        capability "Switch"
	}   
}

def on() {
    sendEvent(name: "motion", value: "active")
    sendEvent(name: "contact", value: "open")
    sendEvent(name: "switch", value: "on")
    runIn(12, off)
}

def off() {
    sendEvent(name: "motion", value: "inactive")
    sendEvent(name: "contact", value: "closed")
    sendEvent(name: "switch", value: "off")
}

def installed() {
}
2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.