Scene control not working

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
RobertL.
Posts: 13
Joined: 29 Nov 2017 18:24

Scene control not working

Post by RobertL. » 07 Dec 2017 16:50

I'm trying to setup a scene controller with my Z-UNO

When I included the zuno on my smartThings controller, it is paired as a Window/Door sensor !!
I tried pairing after reset and after rescue mode, nothing changes.
When I activate the buttons, nothing appears in the smartThings log.
When I press the service button, this is was I get in the log:

4ee70845-f3fe-4c3f-9a60-5e3b8eb5299f 8:30:09 AM: debug parsed 'zw device: 80, command: 3003, payload: 00 01 ' to [name:contact, value:closed, descriptionText:Z-Wave Door/Window Sensor is closed, isStateChange:false, displayed:false, linkText:Z-Wave Door/Window Sensor]

WHAT AM I DOING WRONG?

My sketch:

//Z-UNO Scene control
#define BTN_PIN1 9
#define BTN_PIN2 10
#define CONTROL_GROUP 1
#define LED_PIN 13

ZUNO_SETUP_ASSOCIATIONS(ZUNO_ASSOCIATION_GROUP_SCENE_CONTROL);

ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE);

byte lastValue1 = HIGH;
byte lastValue2 = HIGH;

void setup()
{
pinMode(BTN_PIN1, INPUT_PULLUP);
pinMode(BTN_PIN2, INPUT_PULLUP);
pinMode(LED_PIN, OUTPUT);
}

void loop()
{
byte currentValue1 = digitalRead(BTN_PIN1);
byte currentValue2 = digitalRead(BTN_PIN2);
if (currentValue1 == HIGH && currentValue2 == HIGH)
{
digitalWrite(LED_PIN, LOW);
}

// Button 1
if (currentValue1 != lastValue1)
{
lastValue1 = currentValue1;
if (lastValue1 == LOW)
{
digitalWrite(LED_PIN, HIGH);
zunoSendToGroupScene(CONTROL_GROUP, 1); // if button pressed - activate scene 1
}
}

// Button 2
if (currentValue2 != lastValue2)
{
lastValue2 = currentValue2;
if (lastValue2 == LOW)
{
digitalWrite(LED_PIN, HIGH);
zunoSendToGroupScene(CONTROL_GROUP, 2); // if button pressed - activate scene 2
}
}
}

perjar
Posts: 13
Joined: 08 Apr 2018 18:02

Re: Scene control not working

Post by perjar » 28 Apr 2018 18:16

I have a Fibaro HC2 as controller. Perhaps it works in a similar way.
For scenes to be picked up by the HC2 I need to first associate the scene group with the controller. So, in your example with CONTROL_GROUP_1, I would have to associate group 2 with the controller itself and then I will be able to capture the scenes.

In the case of HC2, the defined scene numbers will also be selectable in drop down menus when building "block scenes" in HC2.

schmidmi
Posts: 50
Joined: 01 Dec 2016 16:45
Location: Germany (Karlsruhe)

Re: Scene control not working

Post by schmidmi » 18 May 2018 09:07

@perjar:
Hi,
I tried to get the scene activation working together with my HC2, but failed.
Do you have an example, how you were successful?

Update: Problem solved! It's working :D

Post Reply