Scene control not working
Posted: 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
}
}
}
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
}
}
}