Z-Uno control relay

Hello everyone!

I'm trying to control a Relay over the protocol Z-Wave. So far, I manage to control the embed LED on the Z-Uno board.

So I edited my code in order to control my relay (SRD-05VDC):

// pin number, where relay is connected
#define RELAY_PIN 14
#define LED_PIN 13

// variable to store current relay state
byte lastSetValue;
byte currenLEDValue;


void setup() {
  pinMode(RELAY_PIN, OUTPUT); // set up relay pin as output
  pinMode(LED_PIN, OUTPUT); // set up led pin as output

void loop() {
  // loop is empty, because all the control comes over the Z-Wave

byte getter() {
  return lastSetValue;

void setter(byte newValue) {
  // newValue is a variable, holding a "value"
  // which came from the controller or other Z-Wave device
  if (newValue > 0) { // if greater then zero
    digitalWrite(RELAY_PIN, HIGH); //turn relay on
    digitalWrite(LED_PIN, HIGH); // turn LED on
  } else {            // if equals zero
    digitalWrite(RELAY_PIN, LOW);  //turn relay off
    digitalWrite(LED_PIN, LOW); // trun LED off

  // save the new value in a variable
  lastSetValue = newValue;
  currenLEDValue = newValue;

Currently, my led is turning on/off when i'm asking it to do so. However, the pin connected to the relay (14), which is supposed to behave the same way, is not working. It seems to staying at 5v.

I tried to control my relay with the ground/5v power pin of my Z-Uno and it worked perfectly. I also tried to connect my relay directly on the LED pin (13), nothing worked.

I really lost, I don't know what to looking for. I can't figure out why the pin 13 is behaving differently as the LED it is supposed to be connected to...

Please HELP ME...