Google Home vs Amazon Echo

I use the Amazon control binding, so far I like it but my wife is ready to hang me.:rofl: I have motion sensors placed around the house and use Alexa TTS to speak a message when motion has been triggered. Check out the post here to see what’s currently available for the binding. Installing the binding is fairly easy just follow the links tutorial. Also the link has several examples to get you started.

Example rule for my garage using Alexa TTS

var Timer stopMotionTimer = null
var Timer startMotionTimer = null
var Timer startLightTimer = null
val int timeoutMinutes = 60
rule "Detect Motion when Garage is Open"
when
    Item Esp_Easy_Motion changed from OFF 
then
    if(Proxy_Motion.state == ON && stopMotionTimer === null && ESP_Easy_Door.state == OFF){  // Door open = OFF
        Echo_Plus_TTS.sendCommand('Alert, garage movement!')
            stopMotionTimer = createTimer(now.plusSeconds(15)) [|
                stopMotionTimer = null
            ]
    }
end

rule "Auto ON Garage Motion Detection after One Hour when Garage is Open"
when
    Item Proxy_Motion changed from ON to OFF
then
    if(startMotionTimer === null && Proxy_Motion.state == OFF){
        Echo_Plus_TTS.sendCommand('The garage motion suspended for one hour')
            startMotionTimer = createTimer(now.plusMinutes(60)) [|
                Proxy_Motion.sendCommand(ON)
                Echo_Plus_TTS.sendCommand('Garage motion is now on')
                startMotionTimer = null
            ]  
    }
end
rule "Garage Light Detection"
when
    Item Esp_Garage_Lightlevel received update
then
    val Val_Light = Esp_Garage_Lightlevel.state as Number 
    if(Val_Light >= 650 && ESP_Easy_Door.state == ON && startLightTimer === null){
        startLightTimer = createTimer(now.plusSeconds(190)) [|
            Echo_Plus_TTS.sendCommand('The garage door is closed, and light has been left on')
            Proxy_Lightlevel.postUpdate(ON)
            startLightTimer = null
        ]
    }
    if(Val_Light <= 500){
        Proxy_Lightlevel.postUpdate(OFF)
    }
end

Another rule for playing around with an Altek (used to change the temp) and temp. This one got me in trouble.:smile: Note, I censored some of the Alexa comments.

rule "Test Switch with Alexa"
when
    Member of gTemp changed
then
	var testName = triggeringItem.name
	var state = triggeringItem.state as Number
	var new_state = "UNKOWN"

    logInfo("This light:", testName + triggeringItem.state )
    switch true { 
        case state < 71  : new_state = "My xxxxx, are hard, a bit to Cold, dont you think"
        case state >= 78 : new_state = "Its too xxxxx, Hot, time to get naked"
		case state < 78 && state >= 76  : new_state = "Its still hot in here, and I don't mean, the good kind, either"
		case state < 75 && state >= 74 : new_state = "Slow, but getting cooler"
		case state < 73 && state >= 72 : new_state = "This is perfect weather, for procreation, don't you think"
    }
	if(triggeringItem.state != new_state){
		Echo_Plus_TTS.sendCommand("The" + testName + "has an update," + new_state ) 
	}
end

I can’t speak for Google Home but if you have an echo try it out.

Hope this helps.

2 Likes