Problems using EasyVR shield to turn on a lamp

Hello! I am new to Arduino and my first project is to turn on a lamp with vocal commands using EasyVR Shield. I am using the newest Arduino Uno.

Basically, the design goes like this. I have the EasyVR Shield attached to the Arduino Uno, which is connected by a USB cable to my computer. This is connected to a PowerTail Switch (this is the exact one I’m using: http://www.powerswitchtail.com/Pages/default.aspx), which in turn is connected to the lamp and outlet.

I found a tutorial on how to do that here: http://jacksondolan.com/blag/2013/10/16/bringing-jarvis-home/

However, for some reason the lamp is simply not turning on. I know it recognizes my commands because I can see them in the serial monitor. I have attached my code and an image of the connections below in case my connections do not match my code, which I suspect is the problem. Most of the code is generated by the EasyVR Commander, and I have done as the link above says.

#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
  #include "SoftwareSerial.h"
  SoftwareSerial port(12,13);
#else // Arduino 0022 - use modified NewSoftSerial
  #include "WProgram.h"
  #include "NewSoftSerial.h"
  NewSoftSerial port(12,13);
#endif

#include "EasyVR.h"
EasyVR easyvr(port);

//Groups and Commands
enum Groups
{
  GROUP_0  = 0,
  GROUP_1  = 1,
};

enum Group0 
{
  G0_ARDUINO = 0,
};

enum Group1 
{
  G1_LAMP = 0,
  G1_GOODNIGHT = 1,
};


EasyVRBridge bridge;

int8_t group, idx;

const int powerPin = A0;
boolean powerOn = false;

void setup()
{
  // bridge mode?
  if (bridge.check())
  {
    cli();
    bridge.loop(0, 1, 12, 13);
  }
  // run normally
  Serial.begin(9600);
  port.begin(9600);

  if (!easyvr.detect())
  {
    Serial.println("EasyVR not detected!");
    for (;;);
  }

  easyvr.setPinOutput(EasyVR::IO1, LOW);
  Serial.println("EasyVR detected!");
  easyvr.setTimeout(5);
  easyvr.setLanguage(0);

  group = EasyVR::TRIGGER; //<-- start group (customize)
  
  pinMode(powerPin, OUTPUT);
  digitalWrite(powerPin, HIGH);
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
}

void action();

void loop()
{
  easyvr.setPinOutput(EasyVR::IO1, HIGH); // LED on (listening)

  Serial.print("Say a command in Group ");
  Serial.println(group);
  easyvr.recognizeCommand(group);

  do
  {
    // can do some processing while waiting for a spoken command
  }
  while (!easyvr.hasFinished());
  
  easyvr.setPinOutput(EasyVR::IO1, LOW); // LED off

  idx = easyvr.getWord();
  if (idx >= 0)
  {
    // built-in trigger (ROBOT)
    // group = GROUP_X; <-- jump to another group X
    return;
  }
  idx = easyvr.getCommand();
  if (idx >= 0)
  {
    // print debug message
    uint8_t train = 0;
    char name[32];
    Serial.print("Command: ");
    Serial.print(idx);
    if (easyvr.dumpCommand(group, idx, name, train))
    {
      Serial.print(" = ");
      Serial.println(name);
    }
    else
      Serial.println();
    easyvr.playSound(0, EasyVR::VOL_FULL);
    // perform some action
    action();
  }
  else // errors or timeout
  {
    if (easyvr.isTimeout())
      Serial.println("Timed out, try again...");
    int16_t err = easyvr.getError();
    if (err >= 0)
    {
      Serial.print("Error ");
      Serial.println(err, HEX);
    }
  }
}

void action()
{
    switch (group)
    {
    case GROUP_0:
      switch (idx)
      {
      case G0_ARDUINO:
        // write your action code here
        group = GROUP_1;
        // group = GROUP_X; <-- or jump to another group X for composite commands
        break;
      }
      break;
    case GROUP_1:
      switch (idx)
      {
      case G1_LAMP:
      /*Serial.println("In Light");
      powerOn = !powerOn;
      if (powerOn) {
        Serial.println("Power On");
        digitalWrite(powerPin, LOW);
        digitalWrite(13, HIGH);
      }
      else {
        Serial.println("Power Off");
        digitalWrite(powerPin, HIGH);
        digitalWrite(13, LOW);
      }
      */group = GROUP_1;
      digitalWrite(powerPin, LOW);
      digitalWrite(13, HIGH);
        // write your action code here
        // group = GROUP_X; <-- or jump to another group X for composite commands
        break;
      case G1_GOODNIGHT:
        group = GROUP_0
        ; 
        digitalWrite(13, LOW);/*
        digitalWrite(powerPin, HIGH);
        digitalWrite(13, LOW); */
        // write your action code here
        // group = GROUP_X; <-- or jump to another group X for composite commands
        break;
      }
      break;
    }
}

I have attached a picture of the wiring too. The first green wire is going to 5V (just in case the connection is covered up).

Thanks in advance for the help!

Hey -

I'm new to both of these as well, and have an interest in a similar project, did you ever figure out what was wrong?

http://forum.arduino.cc/index.php?topic=209913.msg1542874#msg1542874