How to install the MIOS Vera Plugin ?

The Vera plugin is totally optional and allows your to control some aspects of ImperiHome directly from your Vera system and scenes.

This is particularly useful for wall mounted tablets or screens dedicated to smart home control. Here is what you are able to control with it :

  • Change dashboard page
  • Launch voice recognition command
  • Say a text on the device using voice synthesis (TTS)

 

Here are the pre-requisites :

  • An android device with ImperiHome PRO installed
  • The android device has to be on the local network, and you have to know its IP address (which should be fixed)

 

Device configuration

It is recommended to set a fixed IP address for your android device, as the plugin will remember its IP address for further actions.

To get your current android IP Adress, got to your android settings, then "About", then "Status", you'll find your ip address here :

 

 

ImperiHome configuration

For the plugin to work, you have to enable the HTTP API on ImperiHome. For this, go into the Settings of the app, then "General Preferences", and enable the API HTTP Server as shown :

Then get back to ImperiHome but let it launched on your tablet.

 

Vera Plugin installation

Install the plugin like most plugins, from the MIOS App Portal :

  • Click on the "Apps" tab in Vera's web interface
  • Click on the "Install Apps" sub-tab
  • Search for the "ImperiHome" plugin
  • Click "Install"

The plugin will install, your Vera reload, and an ImperiHome device will be created in your "No-Room" room.

Reload your webpage (F5 with your browser)

You should see the new ImperiHome device :

 

Click on the wrench icon to open the configuration popup. Go into the "Advanced" tab and look down for the IP Address variable, and replace "unknown" by the IP address of your android device hosting ImperiHome. In UI5 :

For UI5 : Close the popup and click the red "Save" button in the upper right corner of your Vera UI. Wait for the vera to reload.

If you use UI7 firmware, the screen is located in the "Advanced" section of your device, and then in the "Variables" tab. It will look like the image below. After having filled the values, click outside the editable fields, wait a second and then reload luup engine (vera will 'reboot). 

When done, reload the UI in your browser again (F5). You should see the ImperiHome device in the Vera UI showing the model of your android device : that means all is okay !

 

How to use :

 

You can control ImperiHome from the device's Control tab :

 

But more useful : you can use these commands in your scenes :

 

LUUP Code

 

For those wanting to integrate luup code, here are sample code for the 3 actions :

luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "SayTTS", {Text = "text to say"}, DEVICEID);

luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "GotoDashPage", { PageIndex = "0" },DEVICEID);

luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "LaunchVoiceReco", 0,DEVICEID); 

 

Enjoy !

 

Have more questions? Submit a request

23 Comments

  • 0
    Avatar
    Mikael Andersson

    wher is the plugin download link?

  • 0
    Avatar
    PITP2

    Encore un super développement :-)
    Est il possible de faire dire la valeur d'une variable dans le TTS ?

  • 0
    Avatar
    Thibault

    @Mikael : The plugin is installable directly from the mios app store : http://apps.mios.com/plugin.php?id=5606

    @PITP2 : C'est possible mais il faut construire le texte soi-même avec un peu de code LUA puis ensuite appeler le plugin en lui donnant le texte complet. Pour le moment il n'y a pas plus simple à priori.

  • 0
    Avatar
    FABRE Christian

    Bonjour
    Plugin très intéressant mais j'ai quelques soucis à l'installation
    J'ai suivi le guide d'installation
    ma tablette est bien reconnu car le plugin affiche le device "CT1002 (WA) - ImperiHome v2.0.10"
    C'est une tablette Carrefour CT1002 sous Android 4.0.3
    Dans l'onglet Setting pas d'affichage des variables
    Dans l'onglet Advanced : CommFailure = 1
    Bien entendu les actions dans l'onglet Control ne fonctionnent pas

  • 0
    Avatar
    PITP2

    Bonjour,
    jai eu un problème similaire au début après reboot de la tablette tout était ok
    Autre point à vérifier est l'adresse ip. Si vous etes en DHCP elle a peut etre changée

  • 0
    Avatar
    FABRE Christian

    Merci de ton retour
    J'ai redemarré ma tablette plusieurs fois
    mon adresse IP est fixe et le plugin la trouve bien puisqu'il affiche le device CT1002 qui est ma tablette
    demain je vais essayer de changer le port qui est par defaut 8080

  • 0
    Avatar
    PITP2

    @Thibault et pour tout le monde

    un code lua qui fonctionne pour envoyer depuis une Scene le message avec une variable

    Petit bemol => Les décimales ne sont correctement dites. Le point étant prononcé "a"
    il faudrait arrondir la variable mais je n'ai pas trouvé la syntaxe lua pour le faire. Round(variable) ne fonctionne pas.

    local Temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 148)

    local Texte = "http://192.168.0.XX:8080/api/rest/speech/tts?text=la%20température%20extérieure%20est%20de%20" .. Temp .. "%20degrés"

    luup.inet.wget(Texte)
    return true

  • 0
    Avatar
    FABRE Christian

    Après plusieurs démarrage de la tablette et reload de UI5, j'ai réussi à faire fonctionner les commandes de l'onglet Control
    Demain j'essaie de commander au travers de scenes
    Merci ...

  • 0
    Avatar
    PITP2

    J'ai résolu mon probleme pour les nombres avec des décimales
    Le code suivant fonctionne bien chez moi

    local Temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 148)

    string.gsub(Temp, ",", ".")
    local Texte = "http://192.168.0.XX:8080/api/rest/speech/tts?text=la%20température%20extérieure%20est%20de%20" .. Temp .. "%20degrés"

    luup.inet.wget(Texte)
    return true

  • 0
    Avatar
    juju78y

    Bonjour, ou sinon il y a également plus simple pour le code LUA
    Allez dans la partie "APPS", puis "develop APPS" et enfin "Edit startup LUA"

    collez y ce code :

    function Parler(qui, dit)
    luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "SayTTS", {Text = dit}, DeviceID(qui))
    end

    function DeviceID(name)
    if(name == "Tablette")then
    return 10
    elseif(name == "Telephone")then
    return 12
    end

    end

    où 10 et 12 correspond à l'ID du device virtuel de imperihome

    dans vos scenes il ne vous reste plus qu'à écrire ceci :

    ============

    Parler("Tablette", "ceci n'est qu'un test sur le tablette")

    Parler("Telephone", "ceci n'est qu'un test sur le telephone")

    encore bravo pour cette application / plugin, que j'ai acheté au bout de quelques jours de test. je suis juste maintenant impatient qu'il soit mis à jour pour ma vera sous UI6. je sais que c'est en cours...
    Bonne journée
    Julien

  • 0
    Avatar
    Michal Borkowski

    Hi. It is looking that this is working fine with UI7 - but I have one issue - I have alerts "Can't Detect Device" - how to get rid of this alert in UI7.
    It is looking it works - all other options are fine and I can see my devices...

    Thanks in advance for solution.

  • 0
    Avatar
    Nathaniel E

    Michal,

    I'm having the same issue, "Can't Detect Device." Did you find a solution?

  • 0
    Avatar
    basia

    Alex

    Don't work with iu7, I have alerts "Can't Detect Device", and no voice return with luup code.
    I hope someome soon find the problem .

    Ne marche pas sur iu7 , tablette reconnu mais affiche can detect divice, et pas de retour vocal en luup juste avec le test.
    j espere que le probleme sera un jour résolu

  • 0
    Avatar
    Thibault

    @basia & others : the v1.1 of the plugin has been published and approved by MIOS. It should fix plugin behaviour on UI7.

  • 0
    Avatar
    Mobyo

    Bonjour,

    Je possède la Vera Edge (UI7) et le plugin ne m'affiche aucun device Imperihome quand je crée une scène. Par exemple, je définis un ping pour le trigger et au moment de choisir une action associée à ce trigger, il n'y a aucune possibilité de choisir le device Imperihome. Est-ce normal ? Merci d'avance pour votre réponse.

  • 0
    Avatar
    krusemarks

    Hi, I just installed the plugin on UI7 (1.7.1707), and was able to send a TTS command to my imperihome android tablet from the UI7 web interface.  However, I do not see the Imperihome Device I created showing up as a device in the Device Action Menu when configuring a scene.  This is preventing me from initiating a voice announcement when the scene is triggered.  Thanks for your investigation.  

     

    UPDATE: I was able to find the Imperihome device in the 'advanced editor' portion of the Vera UI7 scene configuration UI.  So it is available, the main configuration menus are just not working.

    Edited by krusemarks
  • 0
    Avatar
    Ilias Bennani

    Hello.

    I do run this plugin on two Android-devices just to monitor movements etc and it works fine. 

    My problem is that I can not get this to work on my Vera Edge running UI7. When I have installed the app I get this error message on the top of my browser window;

    ImperiHome Plugin : Set IP Address for ImperiHome device

    I have set the correct IP and restarted LUA as well as my browser window. I have also set a static IP on the Android device. The IP as well as the port numbers are stored correctly, when I go into that setting from an other device, the IP is there. 

    I do also run an IP-cam on the same Androoid-device (on another port) and that works fine. 

    So, why can't my Vera Edge (UI7) find my device? 
    What else is there that I can do?

     

  • 0
    Avatar
    Carlos Robles

    It works perfectly for me using a veraplus and a galaxy tablet

    What I would like to know is how to control the volume I was able to intercept the request the browser is sending but I dont know how to translate it to LUA

    GET /port_3480/data_request?id=lu_action&output_format=json&DeviceNum=30&serviceId=urn:imperihome-com:serviceId:ImperiHomeDevice1&action=SayTTS&Text=Test&Volume=100 HTTP/1.1

    I would like to set the volume in the LUA code to 50

    Thanks.

     

     

  • 0
    Avatar
    Carlos Robles

    I figured it out, so if you want to control volume as well use this:

     

    luup.call_action("urn:imperihome-com:serviceId:ImperiHomeDevice1", "SayTTS", {Text = "Test", Volume = 80},30);

  • 0
    Avatar
    Dave Kaars

    Hi

    Do you get the same functionality on the iOS version of the app?

    Thanks

  • 0
    Avatar
    Thibault

    Dave : Control API used by the plugin is, for now, only available on the Android version of the app.

  • 0
    Avatar
    yarden gabay

    TTs is not working for me.

    I am able to switch dashboard page and to lunch the speech recognization from the scenes but TTS is not working? how can I fix it?

    Using vera edge and I have ImperiHome PRO

    Edited by yarden gabay
  • 0
    Avatar
    Calinburza

    Is there going to be a new vera plugin with play custom sound support, anytime soon ?

Please sign in to leave a comment.
Powered by Zendesk