Doc



Configuration

This section allows you to control your configurations.
It is possible to import new ones by downloading predefined configurations from the website: http://jarvishome.fr
or to create a new one from scratch: Once uploaded a configuration can be enabled or disabled . If it is disabled, it will have no effects on your Jarvis@Home behavior.

Once a new predefined configuration is loaded, you must configure it a first time.
To do that, you simply have to open it and answer to the questions. Generaly, you have to set the name of your butler. For example: Jarvis, Nestor, Amandine, the name of your choice, then often you have to configure URLs which allow you to control your home automation. After anwsered to all questions, click on save, your configuration is ready.



Discussion

This section is the core of your Jarvis@Home, it defines how it will react.
A discussion can be started either by:

  • A "Trigger". It is a hotword that once detected will start the interactions analysis
  • An action inside a scénario.
  • By any sentence. In this case, all the interactions will be analyzed everytime a sentence is heard.

Every started discussion must be stopped by the action: "StopCurrentDiscussion". Else, a discussion started will never be ended.
Once a discussion is started, its interactions are analysed.

If the same "trigger" is present in multiple configurations, all the interactions of these configurations will belongs to the same discussion and then will be used by Jarvis@Home after hearing the "trigger".

To define a trigger, you should go to Sentence then create a recognition with the type:
In the predefined configurations, there is a predefined "Butler" recognition, with the value: "ButlerName". This value is, in fact, the title of a synonym where its value will be initialized at the first opening of the configuration.

Interaction

When a discussion is started, its interactions are analysed against every heared sentence. An interaction is a link between an event and an activity which can be either a Scenario, or a Speech
Every interaction can be enabled ou disabled . A disabled interaction will never been analysed. An event can be:

  • A recognition of a sentence defined in the section Sentence
  • A state change of the discussion or an event inside a discussion
    • Before Each Match: The given activity is executed before the one corresponding to the recognized interaction by Jarvis@Home
    • After Each Match: The given activity is executed after the one corresponding to the recognized interaction by Jarvis@Home
    • When Discussion Terminates: The given activity is executed when the discussion ends
    • When Discussion Starts: The given activity is executed when the discussion starts
    • When Sentence Received but nothing match: The given activity is executed when a sentence is recognized but correspond to any interaction
    • When No Sentence Received: The given activity is executed after a delai (in milli-seconds) if any sentence is heard
    • When All Matches Are Executed: The given activity is executed when all the corresponding interactions to the heard sentence are executed


Jarvis@Home try to recognize a maximum of possible interactions inside a discussion. Then, it is possible to say:
Jarvis, Open the lounge shutter and turn off the living room light => if you have these 2 interactions ("Open lounge shutter" et "turn off living room light"), the two will be executed.



Recognition

This section allows the sentence recognition configuration in Jarvis@Home.
It is organized into 3 sub-sections:


Sentence

A sentence is defined by a title and a sentences list which should be recognized by Jarvis@Home.
It is possible to give a type to a sentence:

  • : Define a trigger which could be used in the configuration of the discussion
  • : Set the sentence as a question (This type has no impact on Jarvis@Home, it could be used for a futur usage in a next version)
  • : Set the sentence as an answer (This type has no impact on Jarvis@Home, it could be used for a futur usage in a next version)

It is possible to give multiple sentences to the recognition engine, example:
  Open shutter bedroom
  Mount shutter bedroom

By configuring the synonyms and the cleaning, it will not be required to specify all the sentences to be recognized, example:
If we have in the Synonyms:

  • shutter, rolling shutter
  • Open, Mount

and in the cleaning: the, a

And you say:
Jarvis, could you mount the rolling shutter of the bedroom, please?

  1. Jarvis is detected inside the sentence, the discussion is started
  2. the words in red are removed by the cleaning
  3. mount and rolling shutter are replaced by their respective synonyms: open and shutter
  4. The interactions are searched inside the sentence: could you open shutter bedroom , please?
  5. open shutter bedroom is detected, the rest of the sentence is ignnored
  6. the activity linked to the open shutter will be executed

Synonym

A synonym is defined by its title and by its words list.

It is possible to use the title as a synonyl in a sentence or in a trigger. Example in the predefined configurations with the title: ButlerName or RoomName.
Another example:
Open => open, opens, opening

A synonym can be mandatory or optional for the configuration.
For example the synonym: ButlerName or RoomName must be initialized for the correct working of the configuration.
For that, it must be marked as required: and not
The required synonyms with [default] mark will be asked at the next opening of the configuration.


Cleaning

This section lists all the words that should not have an impact on the sentence to recognize.
If we say: "Open the shutter in the bedroom" or "Open the shutter inside the bedroom" in, inside, the, a could be part of the cleaning to not impact the recognized sentences.



Speech

This section allows you to define what Jarvis@Home can say.
In order to make it more human, it is possible to define multiple sentences for the same answer. According to the attribute: or the sentence will be chosen randomly or in the sequence. It is possible to execute directly a speech from an http call, you just have to click on the icon close to each Speech.

Condition:
Before each speech list, there is a condition which can be set. It will be evaluated before the execution of the speech. It must contain a boolean expression. If it is not set, its value is: Default
The speech will be executed only if its condition is true.
For more details on the conditions refer to: Expression



Scenario

This section allows to define a list of actions to execute. It is possible to execute a scenario directly from an http call, you simply have to click on the icon close to each scenario.
Each action in a scenario can be enabled or disabled .

Condition:
Before each scenario, there is a condition that can be set, it will be evaluated just before the execution. It must contain a boolean expression. If it is not set, its value is: Default
The scenario will only be executed if its condition is true.
For more details on the conditions refer to: Expression
Available Actions:

  • Tasker
  • TTS
  • Screen On
  • Open Url
  • Change Volume
  • Voice Recognition Start
  • Voice Recognition Stop
  • Speech
  • Comment
  • Set State
  • Remove State
  • Kill
  • Start Discussion
  • Stop Current Discussion
  • Execute Scenario
  • Set Variable
  • Http Get
  • Http Post
  • Ok Goole



State

This section manage categories and states.
A category is defined by a set of states, and a type: Global or Local
If the category is defined to Global, then a scenario from antoher configuration will be able to change its value. It must be defined in this second configuration as Global too

A category has a default value, it can be changed by clicking on:
Example of category: Mood
with the state: Angry, Cheerfulness

These categories can be used in conditions to personalized scenarios and speeches.
When a state is assigned on a category, its previous state is removed. If the current state is removed, the default state will be used.



Variable

A variable can contain a constant or contain an expression. A variable can be: Global or Local
If the category is defined to Global, then a scenario from antoher configuration will be able to change its value. It must be defined in this second configuration as Global too
A variable can be required or optionnal in the configuration.
For example, variables defining the URLs must be set to have a correct configuration.
So they must be set as required: and not as
The required variables with [default] as a suffix will be asked at the next opening of the configuration.



Expression

An expression can use functions described in the section: API/Expression API.
By clicking on the section: Status, you will see the returned values of most of these functions.
An expression can use variables and/or boolean operator.
Expression examples:

  • Mood.Cheerfulness
    This expression can be used inside a condition. If the category "Mood" was defined on: "Cheerfulness", then its expression will return "True", else it will return "False"

  • system.ip() == "192.168.0.21"
    This condition will return "Vrai" if the IP adress of your mobile is 192.168.0.21, and will return "False" for any other value

  • system.ssid() == "MyWifi" ? "http://192.168.0.14" : "https://XXXXXXX.dns1.jeedom.com"
    This expression will evaluate the WIFI connection of your mobile and if it is connected on the SSID: "MyWifi", then the expression will return the value: http://192.168.0.14, else it will return: https://XXXXXXX.dns1.jeedom.com



You will find more details on the syntax here: syntaxe



Settings

Device Name

This parameter allows you to name your mobile or tablet. This name will be displayed close to the title of the Javis@Home page. This allows you, if you have multiple mobiles with Jarvis@Home you will always know on which one you are connected.

Start Settings

This parameter allows you to define a scenario from a configuration that will be executed on the Jarvis@Home start. For example, by setting the "Start" scénario from the configuration "Jarvis", when Jarvis@Home will start, the screen will be on, the homepage of your home automation will be displayed

HTTP Settings

This parameter allows you to define the timeout of an HTTP query. If the delay is over, an error message will be played.

Security

The HTTP API Key is a key allowing to secure the HTTP call to jarvis@Home. This key must be used for all HTTP calls.

State Notification

This allows you to define an URL with the pattern: #VOICE_STATE# This pattern will be replaced by a value describing the state of the voice recognition of Jarvis@Home. When the voice recognition is active. This url will be called frequently (every 30 seconds). If after 30 seconds there was no HTTP call, there was certainly a problem.

If you are using jeedom:
The url must look like:
http://IP_JEEDOM/core/api/jeeApi.php?apikey=XXXXXXXXXXXXXXXXXXXX&type=virtual&id=***VIRTUAL_ID***&value=#VOICE_STATE#

You have to install the widget from the market in the section: Audio/Vidéo
Its name: dashboard.info.numeric.JarvisHome
Then create a virtual like:



then apply the Jarvis@Home widget (available on the market) to this virtual
Then take the virtual Id (on the screenshot, it is the 5772) and replace ***VIRTUAL_ID*** by the id inside the application url.



Tips to migrate from the version 1 to the version 2


To execute jeedom interactions

It is no more recommended to use the jeedom interactions but use the new configurations directly.
There are samples to manage stores & alarm.
These configurations offer more possibilities, and will be faster in their executions.


  1. Download the configuration "Jarvis v1"
  2. Start the application then go to the config url. (It is recommended to use a desktop computer for an easier navigation)
  3. Select the file to download, then upload the configuration into the Jarvis@Home application
  4. Open the "Jarvis v1" configuration
  5. Fill the requested variables
  6. Click on "Save" to validate your variables
  7. The configuration has changed, so save it by clicking the red floppy
  8. In the Settings (at top right), you can define a scenario to launch at the application start. For example, to launch a web page

Migrate the http api

To do some TTS, the url has changed, here is the new format:
http://XXX.XXX.XXX.XXX:8181/jarvis?action=execute&type=TTS&data={"text":"Hello","volume":"100"}&jKey=ea9vn7q43nkekifnfkecf5rp80
The parameter jKey can be get from the Settings, in the Security tab.


Migrate the option: "Not Always listening"

To get the same result, you have to download and install the configuration: Ecoute Non Permanente (See the download section (in french))


Migrate the option "Listening the command after the start"

To get the same result, you have to select the page: "Discussion" and update the trigger of the discussion
Then change the value to: "Any Sentence", that means all the sentences will be analysed, even if the hotword is not in the sentence.


Migrate the urls (1 local and 1 remote)

For that, you can use variables and expressions.
When you define an url, set:
     system.ssid() == "YOUR_SSID" ? "http://YOUR_LOCAL_IP/pathOfYourAction.html" : "https://YOur_REMOTE_IP/pathOfYourAction.html"
You can even create a general configuration, which will contain a global variable defining the correct IP address according to your Wifi connection.
Example:
     global variable: HTTP_SERVER
     value: system.ssid() == "YOUR_SSID" ? "http://YOUR_LOCAL_IP" : "https://YOUR_REMOTE_IP"

Then you will be able to use this global variable "HTTP_SERVER" in all your URLs from any configurations.
Usage example:
     HTTP_SERVER + "/pathOfYourAction.html"


Send the state of the application through HTTP

See the Settings section.