This page last changed on Jan 27, 2016 by pierre2302.

I use the voice recognition ( Google sarah) with my razberry and URL supplied in the module OpenRemoteHelpers of zwave.me.

it works very well.

If that interests you I can supply you the plugins which it is necessary to install in Google sarah

Hi

That's interesting.

Is this something specific to the RaspberryPi and Z-Wave?

I'm running OR_Pro on Windows 7 Netbooks, with a mixture of HTTP commands and Velbus modules.

Or is this more to do with each Android device accessing OR commands?

Many thanks,

Stuart

Posted by mdar at Jan 27, 2016 20:47

The plugins I've done is specific to the Razberry.

But from the moment you have http command, you can use him. You will just have simply to create your plugins it is rather easy.

Sarah works on windows 7, 8 and 10 because it uses voice recognition microsoft.

I use sarah v3.16 with Windows 7 + kinnect v1

Here is a demo video in French : https://www.youtube.com/watch?v=Gskd8U0Nwt0

sorry for my English.

Posted by pierre2302 at Jan 27, 2016 21:15

thanks for posting, I use a Rapberry Pi and have HomeBridge installed on it, Siri does great voice control for me.

I won't be using this as I don't want to leave a PC on

Posted by glennl at Jan 28, 2016 00:05

Very nice application! Do you run Openremote on Pi as well, or is that on your Win7?

Posted by pz1 at Jan 28, 2016 08:54

OpenRemote is installed on my raspberry pi. there are only Sarah that is installed on win 7.

For those who do not want PC there is a possibility of installing Sarah on a key Intel compute stick

Posted by pierre2302 at Jan 28, 2016 13:08

here is a sample plugin that I use for my home automation.

file prop

 
{
  "modules" : { 
    "zway"  : {
      "description": "Sarah controle mon raspberry",
      "version"    : "1.0",
	  "zway_http": "http://192.168.1.100:8083/OpenRemote/"
    }
  }
}

file xml

<grammar version="1.0" xml:lang="fr-FR" mode="voice" root="rulezway" xmlns="http://www.w3.org/2001/06/grammar" tag-format="semantics/1.0">
  <rule id="rulezway" scope="public">
    <example>Sarah allume la chauffage</example>
	<example>Sarah quelle est la température du salon</example>
    <tag>out.action=new Object(); </tag>
	<tag>out.action._attributes.threashold = "0.10"; </tag>

	
    <item>Sarah</item>
		
	
    <one-of>
          <item>Allume<tag>out.action.ttsAction="allumé";out.action.module="SwitchBinaryOn";out.action._attributes.tts = "je m'en occupe";</tag></item>
          <item>Demarre<tag>out.action.ttsAction="demarré";out.action.module="SwitchBinaryOn";out.action._attributes.tts = "je m'en occupe";</tag></item>
	  <item>Ouvre<tag>out.action.ttsAction="ouvert";out.action.module="SwitchBinaryOn";out.action._attributes.tts = "je m'en occupe";</tag></item>
	  <item>Active<tag>out.action.ttsAction="activé";out.action.module="SwitchBinaryOn";out.action._attributes.tts = "je m'en occupe";</tag></item>
	  <item>Eteint<tag>out.action.ttsAction="eteint";out.action.module="SwitchBinaryOff";out.action._attributes.tts = "je m'en occupe";</tag></item>
	  <item>Arrete<tag>out.action.ttsAction="arrété";out.action.module="SwitchBinaryOff";out.action._attributes.tts = "je m'en occupe";</tag></item>
	  <item>Ferme<tag>out.action.ttsAction="fermé";out.action.module="SwitchBinaryOff";out.action._attributes.tts = "je m'en occupe";</tag></item>
	  <item>Désactive<tag>out.action.ttsAction="désactivé";out.action.module="SwitchBinaryOff";out.action._attributes.tts = "je m'en occupe";</tag></item>
	  <item>Coupe<tag>out.action.ttsAction="coupé";out.action.module="SwitchBinaryOff";out.action._attributes.tts = "je m'en occupe";</tag></item>
          <item>quel est la Température<tag>out.action.module="TemperatureLevel";out.action._attributes.tts = "j'analyse";</tag></item>
	  <item>quel est l'Humidité<tag>out.action.module="HumidityLevel";out.action._attributes.tts = "j'analyse";</tag></item>
	  <item>quel est la Luminosité<tag>out.action.module="LuminosityLevel";out.action._attributes.tts = "j'analyse";</tag></item>
	  <item>quel est Le status<tag>out.action.module="SwitchBinaryStatus";out.action._attributes.tts = "j'analyse";</tag></item>
	  <item>quel est L'état<tag>out.action.module="SensorBinaryStatus";out.action._attributes.tts = "j'analyse";</tag></item>
	  <item>quel est La consommation<tag>out.action.module="MeterLevel";out.action._attributes.tts = "j'analyse";</tag></item>
	  <item>quel est L'intensité<tag>out.action.module="SwitchMultilevelStatus";out.action._attributes.tts = "j'analyse";</tag></item>
	  <item>quel est le niveau<tag>out.action.module="BatteryLevel";out.action._attributes.tts = "j'analyse";</tag></item>
	</one-of>
	
	
	<item repeat="0-1" >
    <one-of>
	  <item>De la baterie du multisensor du salon<tag>out.action.ttsName="Multisensor du salon";out.action.id="3";</tag></item>
	  <item>De la baterie du multisensor de la chambre<tag>out.action.ttsName="Multisensor dde la chambre";out.action.id="15";</tag></item>
	  <item>De la baterie du multisensor de la salle de bain<tag>out.action.ttsName="Multisensor de la salle de bain";out.action.id="4";</tag></item>
          <item>La lumiere du salon<tag>out.action.ttsName="La lumiere du salon";out.action.id="2/0";</tag></item>
	  <item>Le chauffage de la chambre<tag>out.action.ttsName="Le chauffage de la chambre";out.action.id="5/0";</tag></item>
	  <item>Du salon<tag>out.action.ttsName="Du salon";out.action.id="3/0";</tag></item>
	  <item>De la chambre<tag>out.action.ttsName="De la chambre";out.action.id="6/0";</tag></item>
	  <item>De la salle de bain<tag>out.action.ttsName="De La salle de bain";out.action.id="4/0";</tag></item>

    </one-of>
    </item>
	
	
    <tag>out.action._attributes.uri="http://127.0.0.1:8080/sarah/zway";</tag>
  </rule>
</grammar>

file JS

exports.action = function(data, callback, config, SARAH){
  // Retrieve config
    config = config.modules.zway;
    if (!config.zway_http){
      console.log("No link http found for ZWAY");
      callback({'tts' : 'La config est invalide'});
      return;
    }
	console.log('api :'+config.zway_http);
	var url = config.zway_http+data.module+'/'+data.id;
	var request = require('request');                                     
	request({ 'uri' : url }, function (err, response, body){
  
    if (err || response.statusCode != 200) {
      callback({'tts': "L'action a échoué"});
      return;
    }
	
	switch (data.module) {
	
	case 'BatteryLevel' :
			callback({'tts' : " la batterie du " + data.ttsName + " est a " + body + " pour cent " });
		break;
		
	case 'SwitchMultilevelStatus' :
			callback({'tts' : data.ttsName + " a une intensité de " + body + " pour cent " });
		break;
		
	case 'MeterLevel' :
			callback({'tts' : data.ttsName + " consomme " + body + " wate "});
		break;

	case 'SwitchBinaryOn' :
			callback({'tts' : data.ttsName + " est " + data.ttsAction });
		break;

	case 'SwitchBinaryOff' :
			callback({'tts' : data.ttsName + " est " + data.ttsAction });
		break;
		
		
        case 'SwitchBinaryStatus' :
		
		if (( body == '"on"' ) && ( data.ttsName == "La centrale d'alarme" ))
			callback({'tts' : data.ttsName + " est activé"  });
		
		else if (( body == '"off"' ) && ( data.ttsName == "La centrale d'alarme" ))
			callback({'tts' : data.ttsName + " est désactivé"  });
		
		else if (( body == '"on"' ) && ( data.ttsName != "La centrale d'alarme" ))
			callback({'tts' : data.ttsName + " est allumé"  });
		
		else (( body == '"off"' ) && ( data.ttsName != "La centrale d'alarme" ))
			callback({'tts' : data.ttsName + " est éteint"  });

		break;
		
		
        case 'SensorBinaryStatus' :
		
		if (( body == '"on"' ) && ( data.ttsName == "La centrale d'alarme" ))
			callback({'tts' : data.ttsName + " est activé"  });
		
		else if (( body == '"off"' ) && ( data.ttsName == "La centrale d'alarme" ))
			callback({'tts' : data.ttsName + " est désactivé"  });
		
		else if (( body == '"on"' ) && ( data.ttsName != "La centrale d'alarme" ))
			callback({'tts' : data.ttsName + " est allumé"  });
		
		else (( body == '"off"' ) && ( data.ttsName != "La centrale d'alarme" ))
			callback({'tts' : data.ttsName + " est éteint"  });

		break;
		
		
       case 'TemperatureLevel' :
			callback({'tts' : " La température " + data.ttsName + " est de " + body + " Degré "});
		break;
		
       case 'LuminosityLevel' :
			callback({'tts' : " La luminosité " + data.ttsName + " est de " + body + " Luxe "});
		break;
		
       case 'HumidityLevel' :
			callback({'tts' : " L'hygrométrie " + data.ttsName + " est de " + body + " pour cent "});
		break;
		
	}
	});
}
Posted by pierre2302 at Jan 28, 2016 13:38

Sarah is functional in English!

There is also possibility of making Sarah speak with an URL, has a practice with rules openremote (for example according to a status)

Posted by pierre2302 at Feb 11, 2016 19:41
Document generated by Confluence on Jun 05, 2016 09:32