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: 30
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: 52
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

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

Re: Scene control not working

Post by perjar » 24 May 2018 15:38

@schmidmi:
Tell me, how did you solve it?
For me it's only working intermittantly.

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

Re: Scene control not working

Post by schmidmi » 25 May 2018 17:55

Hi perjar,

the problem was not on side of the Z-UNO.
send the SceneActivation with an association to group 1 :

zunoSendToGroupScene(1, persID);
The parameter persID is just a value which can be read in the scene.

But this is not all you have to do for getting the thing working with a HC2.
You have to route the SceneActivation also in the HC2.
In your HC2 you have to go to the property page of the included Z-UNO module. There you choose the tab "Advanced".
Within this tab push the button "Associations".

Important is to set the Association for single commands ("S") to the HC2.

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

Re: Scene control not working

Post by perjar » 15 Jun 2018 17:58

Still not working for me despite setting "S" instead of "M" in the associations settings.

My zuno sketch defines 10 scenes (0-9) but when I try to program a block scene in HC2 there is only one scene-id to choose from. Actually, "Scene id" in zuno translates to "KeyId" in a HC2 block scene. And to confuse things even more, it is called "sceneActivation" in the LUA code. Not very logical if you ask me.


The strange thing is that it is scene 1 that appears in the list. Why not scene 0 which is the first one? And sometimes when I include the zuno I get all 10 scenes in the drop-down, from KeyId 0 to 9.

Compare this to another device I have (Fibaro Dimmer) which also sends scene commands. For this device however, there is no drop down with predefined scenes, I have to type in the scene number myself. In this example I am triggering the block scene when scene id 26 is sent from the dimmer.
scenes.png
scenes.png (81.95 KiB) Viewed 605 times

Post Reply