I just wanted to post this for anybody looking for Alexa TTS without using a Raspberry Pi.
The catch is that you will need a SmartThings hub.
Thanks to: @JDRoberts , @krlaframboise , @ogiewon and @cwwilson08
Requirements:
- A SmartThings hub on the same network as Hubitat. I found you need the hub, cloud to cloud won't work.
- @cwwilson08 's virtual motion sensor driver with a switch that drives the motion (could probably be done with contact as well).
- Other Hub SmartThings Integration 2.0 Application running on Hubitat with real time integration configured for motion sensors.
- An Alexa device that supports Routines.
Sources:
Requirement 2: @cwwilson08 's driver
metadata {
definition (name: "Virtual motion with Switch", namespace: "cw", author: "cwwilson08") {
capability "Sensor"
capability "Motion Sensor"
capability "Switch"
}
}
def on() {
sendEvent(name: "motion", value: "active")
sendEvent(name: "switch", value: "on")
runIn(12, off)
}
def off() {
sendEvent(name: "motion", value: "inactive")
sendEvent(name: "switch", value: "off")
}
def installed() {
}
Requirement 3:
@krlaframboise 's Other Hub SmartThings Integration 2.0 Application
Thanks to @ogiewon for helping me configure this.
Update 1: @krlaframboise updated other hub ST Integration to include an Alexa Trigger. Kind of the same thing but more user friendly. Sweet!
Requirment 4:
Here is a screenshot of one of my configured Alexa routines. Pretty self explanatory.
Research:
Big thanks to @JDRoberts for an older SmartThings post where he mentions that SmartThings Alexa Skill now supports triggering Routines from a door contact or motion sensor. Here's that post:
Why is that important? Because Routines being fired can result in Alexa Saying something.
So my goal became triggering virtual motion sensors in SmartThings to trigger Routines where Alexa will say pre-configured things.
So how do we talk to SmartThings?
I found that Other Hub SmartThings Integration fit my needs for creating devices in SmartThings that I could write to in real time. See Requirement 3.
I'm not sure if this next step can be avoided by forwarding just a virtual switch to SmartThings and switching it to an Other Hub Virtual Motion Sensor. I will try with my next Alexa Phrase.
So at the time I felt I needed a virtual motion sensor with a switch to drive it showing motion or not. @cwwilson08 was kind enough to share a driver. See Requirement 2.
So now that everything is assembled lest talk about data flow.
Data Flow:
So I've probably left something out and this isn't the best format for tutorials, so please let me know if something doesn't make sense and I'll clarify and update the original post.
Hope people find this useful.
As @ogiewon pointed out, once the Hubitat skill is updated or the other Alexa TTS efforts make a breakthrough this might be useless.