commit b96550646ed3cfafc6f55d9fa07de6a139961acc
Author: Elisa <isabel.aparicio@gobex.es>
Date:   Mon Jan 16 13:23:46 2017 +0100

    Codigo fuente de placa Siatic

diff --git a/placaSiatic/1.0-0/main.cpp b/placaSiatic/1.0-0/main.cpp
new file mode 100644
index 0000000..2bbe806
--- /dev/null
+++ b/placaSiatic/1.0-0/main.cpp
@@ -0,0 +1,200 @@
+#include <QCoreApplication>
+#include "redrelaylibrary.h"
+#include "relayportdefinitions.h"
+#include <QFile>
+#include <QDebug>
+#include <QThread>
+
+
+RedRelayLibrary *redRelayDevice;
+void cierraCorrientePuntoAcceso()
+{
+    redRelayDevice->SetRelayState(OFF, (RelayPort) WIFI_PORT);
+    QThread::msleep(1000);
+
+
+}
+void abreCorrientePuntoAcceso()
+{
+    redRelayDevice->SetRelayState(ON, (RelayPort) WIFI_PORT);
+    QThread::msleep(1000);
+
+
+}
+
+void reiniciaCorrientePuntoAcceso()
+{
+    redRelayDevice->SetRelayState(OFF, (RelayPort) WIFI_PORT);
+    QThread::msleep(2000);
+    redRelayDevice->SetRelayState(ON, (RelayPort) WIFI_PORT);
+    QThread::msleep(1000);
+}
+
+void cierraCorrienteProyector()
+{
+    redRelayDevice->SetRelayState(OFF, (RelayPort) PROJECTOR_PORT);
+    QThread::msleep(1000);
+
+
+}
+void abreCorrienteProyector()
+{
+    redRelayDevice->SetRelayState(ON, (RelayPort) PROJECTOR_PORT);
+    QThread::msleep(1000);
+
+
+}
+
+void reiniciaCorrienteProyector()
+{
+    redRelayDevice->SetRelayState(OFF, (RelayPort) PROJECTOR_PORT);
+    QThread::msleep(2000);
+    redRelayDevice->SetRelayState(ON, (RelayPort) PROJECTOR_PORT);
+    QThread::msleep(1000);
+}
+
+void cierraCorrienteSonido()
+{
+    redRelayDevice->SetRelayState(OFF, (RelayPort) SOUND_PORT);
+    QThread::msleep(1000);
+
+
+}
+void abreCorrienteSonido()
+{
+    redRelayDevice->SetRelayState(ON, (RelayPort) SOUND_PORT);
+    QThread::msleep(1000);
+
+
+}
+
+void reiniciaCorrienteSonido()
+{
+    redRelayDevice->SetRelayState(OFF, (RelayPort) SOUND_PORT);
+    QThread::msleep(2000);
+    redRelayDevice->SetRelayState(ON, (RelayPort) SOUND_PORT);
+    QThread::msleep(1000);
+}
+
+void cierraCorrienteMotor()
+{
+    redRelayDevice->SetRelayState(OFF, (RelayPort) MOTOR_PORT);
+    QThread::msleep(200);
+    redRelayDevice->SetRelayState(OFF, (RelayPort) MOTOR_UP_PORT);
+    QThread::msleep(200);
+    redRelayDevice->SetRelayState(OFF, (RelayPort) MOTOR_DOWN_PORT);
+    QThread::msleep(200);
+
+
+}
+void abreCorrienteMotor()
+{
+    redRelayDevice->SetRelayState(ON, (RelayPort) MOTOR_PORT);
+    QThread::msleep(200);
+    redRelayDevice->SetRelayState(ON, (RelayPort) MOTOR_UP_PORT);
+    QThread::msleep(200);
+    redRelayDevice->SetRelayState(ON, (RelayPort) MOTOR_DOWN_PORT);
+    QThread::msleep(200);
+
+
+}
+
+void reiniciaCorrienteMotor()
+{
+    cierraCorrienteMotor();
+    QThread::msleep(1000);
+    abreCorrienteMotor();
+    QThread::msleep(1000);
+
+}
+
+int main(int argc, char *argv[])
+{
+
+    QCoreApplication a(argc, argv);
+    QString textoParmaetros="Nombre o número de parámetros incorrectos. Los parámetros deben ser sonido up|down|reboot, motor up|down|reboot, pa up|down|reboot o proyector up|down|reboot";
+    QString usuario =getenv("USER");
+    if (usuario != "root"){
+        qDebug() <<"Sólo el root puede usar la aplicación";
+        return 1;
+    }
+    QStringList args = a.arguments();
+
+    if (args.count() != 3)
+    {
+        qDebug() <<textoParmaetros;
+        return 1;
+    }
+    redRelayDevice = new RedRelayLibrary();
+     if (! redRelayDevice->ConnectRelay()){
+        qDebug() <<"Error al conectar con la placa del siatic";
+        delete redRelayDevice;
+        return -1;
+    }
+    QString dispositivo= argv[1];
+    QString accion= argv[2];
+    if (dispositivo =="pa"){
+        if (accion=="up"){
+            qDebug() <<"Abriendo la corriente eléctrica punto acceso";
+            abreCorrientePuntoAcceso();
+        }else if(accion=="down"){
+            qDebug() <<"Cerrando la corriente eléctrica punto acceso";
+            cierraCorrientePuntoAcceso();
+        }else if(accion=="reboot"){
+            qDebug() <<"reinciando punto acceso";
+            reiniciaCorrientePuntoAcceso();
+        } else {
+            qDebug() << textoParmaetros;
+            return 1;
+        }
+    }else if (dispositivo =="sonido"){
+        if (accion=="up"){
+            qDebug() <<"Abriendo la corriente eléctrica sonido";
+            abreCorrienteSonido();
+        }else if(accion=="down"){
+            qDebug() <<"Cerrando la corriente eléctrica sonido";
+            cierraCorrienteSonido();
+        }else if(accion=="reboot"){
+            qDebug() <<"reinciando sonido";
+            reiniciaCorrienteSonido();
+        } else {
+            qDebug() << textoParmaetros;
+        }
+    }else if (dispositivo =="motor"){
+        if (accion=="up"){
+            qDebug() <<"Abriendo la corriente eléctrica motor";
+            abreCorrienteMotor();
+        }else if(accion=="down"){
+            qDebug() <<"Cerrando la corriente eléctrica motor";
+            cierraCorrienteMotor();
+        }else if(accion=="reboot"){
+            qDebug() <<"reinciando motor";
+            reiniciaCorrienteMotor();
+        } else {
+            qDebug() << textoParmaetros;
+        }
+    }else if (dispositivo =="proyector"){
+        if (accion=="up"){
+            qDebug() <<"Abriendo la corriente eléctrica proyectro";
+            abreCorrienteProyector();
+        }else if(accion=="down"){
+            qDebug() <<"Cerrando la corriente eléctrica proyector";
+            cierraCorrienteProyector();
+        }else if(accion=="reboot"){
+            qDebug() <<"reinciando proyector";
+            reiniciaCorrienteProyector();
+        } else {
+            qDebug() << textoParmaetros;
+            return 1;
+        }
+    }else {
+        qDebug() <<textoParmaetros;
+        return 1;
+    }
+
+
+    delete redRelayDevice;
+    return 0;
+
+}
+
diff --git a/placaSiatic/1.0-0/placasiatic.pro b/placaSiatic/1.0-0/placasiatic.pro
new file mode 100644
index 0000000..ee6fc24
--- /dev/null
+++ b/placaSiatic/1.0-0/placasiatic.pro
@@ -0,0 +1,20 @@
+QT += core
+QT -= gui
+
+TARGET = placasiatic
+CONFIG += console
+CONFIG -= app_bundle
+
+TEMPLATE = app
+
+SOURCES += main.cpp \
+    redrelaylibrary.cpp
+
+HEADERS += \
+    redrelaylibrary.h \
+    relayportdefinitions.h
+
+!win32 {
+    LIBS += /usr/lib/x86_64-linux-gnu/libhidapi-hidraw.so
+    LIBS += -lssh
+}
diff --git a/placaSiatic/1.0-0/placasiatic.pro.user b/placaSiatic/1.0-0/placasiatic.pro.user
new file mode 100644
index 0000000..954cb63
--- /dev/null
+++ b/placaSiatic/1.0-0/placasiatic.pro.user
@@ -0,0 +1,336 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 4.1.0, 2016-11-16T16:45:12. -->
+<qtcreator>
+ <data>
+  <variable>EnvironmentId</variable>
+  <value type="QByteArray">{c6084a3b-bc98-4d99-b942-ea3c2cb5bab4}</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.ActiveTarget</variable>
+  <value type="int">0</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.EditorSettings</variable>
+  <valuemap type="QVariantMap">
+   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
+   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
+   <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
+    <value type="QString" key="language">Cpp</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
+    </valuemap>
+   </valuemap>
+   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
+    <value type="QString" key="language">QmlJS</value>
+    <valuemap type="QVariantMap" key="value">
+     <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
+    </valuemap>
+   </valuemap>
+   <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
+   <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
+   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
+   <value type="int" key="EditorConfiguration.IndentSize">4</value>
+   <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
+   <value type="int" key="EditorConfiguration.MarginColumn">80</value>
+   <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
+   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
+   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
+   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+   <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
+   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
+   <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
+   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
+   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
+   <value type="int" key="EditorConfiguration.TabSize">8</value>
+   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
+   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
+   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
+   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
+   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
+   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.PluginSettings</variable>
+  <valuemap type="QVariantMap"/>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Target.0</variable>
+  <valuemap type="QVariantMap">
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.2.1 GCC 64bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.2.1 GCC 64bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.521.gcc_64.essentials_kit</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
+   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/root/Escritorio/build-placasiatic-Desktop_Qt_5_2_1_GCC_64bit-Debug</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
+     </valuemap>
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+       <value type="QString">-w</value>
+       <value type="QString">-r</value>
+      </valuelist>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+       <value type="QString">-w</value>
+       <value type="QString">-r</value>
+      </valuelist>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/root/Escritorio/build-placasiatic-Desktop_Qt_5_2_1_GCC_64bit-Release</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
+     </valuemap>
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+       <value type="QString">-w</value>
+       <value type="QString">-r</value>
+      </valuelist>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+       <value type="QString">-w</value>
+       <value type="QString">-r</value>
+      </valuelist>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/root/Escritorio/build-placasiatic-Desktop_Qt_5_2_1_GCC_64bit-Profile</value>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
+      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
+      <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
+     </valuemap>
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+       <value type="QString">-w</value>
+       <value type="QString">-r</value>
+      </valuelist>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+    </valuemap>
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
+      <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
+       <value type="QString">-w</value>
+       <value type="QString">-r</value>
+      </valuelist>
+      <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
+      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
+     </valuemap>
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
+    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
+    </valuemap>
+    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
+    <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
+    <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
+    <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
+    <value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
+    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
+    <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
+    <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
+    <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
+    <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
+    <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
+    <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
+    <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
+    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
+    <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
+    <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
+    <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
+     <value type="int">0</value>
+     <value type="int">1</value>
+     <value type="int">2</value>
+     <value type="int">3</value>
+     <value type="int">4</value>
+     <value type="int">5</value>
+     <value type="int">6</value>
+     <value type="int">7</value>
+     <value type="int">8</value>
+     <value type="int">9</value>
+     <value type="int">10</value>
+     <value type="int">11</value>
+     <value type="int">12</value>
+     <value type="int">13</value>
+     <value type="int">14</value>
+    </valuelist>
+    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
+    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">placasiatic</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/root/Escritorio/placasiatic/placasiatic.pro</value>
+    <value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">placasiatic.pro</value>
+    <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
+    <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/root/Escritorio/build-placasiatic-Desktop_Qt_5_2_1_GCC_64bit-Release</value>
+    <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
+    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+  </valuemap>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.TargetCount</variable>
+  <value type="int">1</value>
+ </data>
+ <data>
+  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+  <value type="int">18</value>
+ </data>
+ <data>
+  <variable>Version</variable>
+  <value type="int">18</value>
+ </data>
+</qtcreator>
diff --git a/placaSiatic/1.0-0/redrelaylibrary.cpp b/placaSiatic/1.0-0/redrelaylibrary.cpp
new file mode 100755
index 0000000..6db0088
--- /dev/null
+++ b/placaSiatic/1.0-0/redrelaylibrary.cpp
@@ -0,0 +1,35 @@
+#include "redrelaylibrary.h"
+
+bool RedRelayLibrary::ConnectRelay(){
+    hid_device_info *info = hid_enumerate(0x16c0, 0x05df);
+    if (info == NULL) return false;
+    dev = hid_open_path(info->path);
+    return dev != NULL;
+}
+
+void RedRelayLibrary::SetRelayState(RelayState State, RelayPort Port){
+    // Simple as send the specific feature to the relay...
+    char package[] = { 0x00,State,Port+1,0x00,0x00,0x00,0x00,0x00,0x00 };
+#ifndef _WIN32
+    hid_write(dev, (unsigned char*) &package, sizeof(package));
+#else
+    hid_send_feature_report(dev, (unsigned char*) &package, sizeof(package));
+#endif
+}
+
+RelayState RedRelayLibrary::GetRelayState(RelayPort Port)
+{
+    unsigned char buffer[10];
+    memset(&buffer, 0, 10);
+    hid_get_feature_report(dev, (unsigned char*) buffer, 9);
+    // We get the relay state with a bitset
+    unsigned char state = buffer[8];
+    std::bitset<CHAR_BIT> b(state);
+    b = b.flip();
+    return b[Port] == 1 ? ON : OFF;
+}
+
+void RedRelayLibrary::DisconnectRelay(){
+    hid_close(dev);
+}
+
diff --git a/placaSiatic/1.0-0/redrelaylibrary.h b/placaSiatic/1.0-0/redrelaylibrary.h
new file mode 100755
index 0000000..62cc57b
--- /dev/null
+++ b/placaSiatic/1.0-0/redrelaylibrary.h
@@ -0,0 +1,75 @@
+/*
+ * RedRelayLibrary
+ * A  C++ Library using HIDAPI to control
+ * generic VUSB relay devices
+ *
+ * @author: Alejandro Antúnez Reino, SODITEC S.L
+*/
+
+#ifndef REDRELAYLIBRARY_H
+#define REDRELAYLIBRARY_H
+#include <hidapi/hidapi.h>
+#include <string.h>
+#include <bitset>
+#include <limits.h>
+
+enum RelayState {
+    ON = 0xFD,
+    OFF = 0xFF
+};
+
+enum RelayPort {
+    PORT_ONE,
+    PORT_TWO,
+    PORT_THREE,
+    PORT_FOUR,
+    PORT_FIVE,
+    PORT_SIX,
+    PORT_SEVEN,
+    PORT_EIGHT
+};
+
+class RedRelayLibrary
+{
+private:
+    hid_device *dev;
+
+public:
+
+    ///
+    /// \brief Primary class constructor
+    ///
+
+    RedRelayLibrary(){};
+
+    ///
+    /// \brief Connects to the relay
+    /// \return Returns if the the operation succeded or not
+    ///
+
+    bool ConnectRelay();
+
+    ///
+    /// \brief Set a relay port state
+    /// \param State of the relay
+    /// \param Port to set the state
+    ///
+
+    void SetRelayState(RelayState State, RelayPort Port);
+
+    ///
+    /// \brief Gets the relay state
+    /// \param Port to get the state
+    /// \return
+    ///
+
+    RelayState GetRelayState(RelayPort Port);
+
+    ///
+    /// \brief Disconnects the relay and dispose it
+    ///
+
+    void DisconnectRelay();
+};
+
+#endif // REDRELAYLIBRARY_H
diff --git a/placaSiatic/1.0-0/relayportdefinitions.h b/placaSiatic/1.0-0/relayportdefinitions.h
new file mode 100644
index 0000000..430dd14
--- /dev/null
+++ b/placaSiatic/1.0-0/relayportdefinitions.h
@@ -0,0 +1,15 @@
+#ifndef RELAYPORTDEFINITIONS
+#define RELAYPORTDEFINITIONS
+
+#endif // RELAYPORTDEFINITIONS
+
+#define WIFI_PORT 0
+
+// This one is not used anymore.
+#define PROJECTOR_PORT 1
+#define SOUND_PORT 2
+#define MOTOR_PORT 3
+#define MOTOR_UP_PORT 4
+#define MOTOR_DOWN_PORT 5
+
+// Ports 1, 6 and 7 on the relay are not used!
