Page 1 of 2

FLIRS ISSUE

Posted: 10 Sep 2016 19:06
by blooby
Hello,

My sketch is work on normal mode (ZUNO_SLEEPING_MODE_ALWAYS_AWAKE), but not in FLiRs mode (ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE)

Code: Select all

//motor A connected between A01 and A02
#define STBY 10
#define PWMA 12 //pwm seem don't work
#define AIN1 9
#define AIN2 11

// variable to store current relay state
byte lastSetValue;
byte var1;
byte var2;
byte state;
byte change;

ZUNO_SETUP_CHANNELS(ZUNO_SWITCH_BINARY(getter, setter));
// next macro sets up the sleeping mode
// device will wake up by user request and regulary listening for packets
//ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE);
// the setup routine runs once when you press reset:

void setup(){
 pinMode(STBY, OUTPUT);
 pinMode(PWMA, OUTPUT);
 pinMode(AIN1, OUTPUT);
 pinMode(AIN2, OUTPUT);
 state=0;
 change=0;
 var1=0;
 var2=0;
}

void loop(){
  if (change == 1) { 
    if (state == 0) {
      // Turn OFF
      digitalWrite(STBY, HIGH); //disable standby
      digitalWrite(AIN1, HIGH);
     digitalWrite(AIN2, LOW);
     //analogWrite(PWMA, 254);
      digitalWrite(PWMA, HIGH);
      //delay(150); 
     if (var1 > 200) {
      var1=0;
      var2=0;
      digitalWrite(STBY, LOW); //enable standby  
      change=0;
      // this function sends the device into sleep
      //zunoSendDeviceToSleep(); 
     }
     var1++;
    }
    else
    {
      // Turn ON
      digitalWrite(STBY, HIGH); //disable standby
      digitalWrite(AIN1, LOW);
      digitalWrite(AIN2, HIGH);
      //analogWrite(PWMA, 254);
      digitalWrite(PWMA, HIGH); 
      //delay(500); //go for 1 second
      if (var2 > 200) {
      var1=0;
      var2=0;
      digitalWrite(STBY, LOW); //enable standby 
      change=0;
      // this function sends the device into sleep
      //zunoSendDeviceToSleep(); 
      }
      var2++;
    }
  }
}
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
    state=1;
    change=1;
  } 
  else {            // if equals zero
    state=0;
    change=1;   
  }
  // save the new value in a variable
  lastSetValue = newValue;
}
Thanks for your help.

Re: FLIRS ISSUE

Posted: 12 Sep 2016 01:59
by PoltoS
Hello!

Unfortunatelly ZUNO_SWITCH_BINARY is not allowed in ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE mode due to Z-Wave certification. We are working with Z-Wave Alliance to officially allow it, meanwhile will add a parameter to disable this restriction.

Re: FLIRS ISSUE

Posted: 23 Sep 2016 22:30
by blooby
Thanks for your answer.
Do you have a delay ?
How can i upgrade it after your add this one ?

Re: FLIRS ISSUE

Posted: 24 Sep 2016 02:59
by PoltoS
Hello! This feature will become available in 2.0.7 - around mid/end of October. These weekends we will release 2.0.6

To upgrade you need to go to board manager, download updates (select newer version) and then use Burn bootloader menu item to upgrade your Z-Uno to the latest version

Re: FLIRS ISSUE

Posted: 30 Sep 2016 12:25
by affanalhakam
Hello...

I went to board manager, but i didn't find any newer version in the option, it shows 0.6.7 as the last version. Should I change the URL of additional board manager? If so, can you please share the URL? thank you in advance.

Re: FLIRS ISSUE

Posted: 30 Sep 2016 12:36
by affanalhakam

Re: FLIRS ISSUE

Posted: 26 Oct 2016 15:51
by wukong
PoltoS wrote:Hello! This feature will become available in 2.0.7 - around mid/end of October. These weekends we will release 2.0.6

To upgrade you need to go to board manager, download updates (select newer version) and then use Burn bootloader menu item to upgrade your Z-Uno to the latest version
Hi,

Is the feature to allow ZUNO_SWITCH_BINARY in ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE mode available already?

Thanks.

Re: FLIRS ISSUE

Posted: 12 Apr 2017 12:33
by blooby
Hello,

I try to make this sample working without success :
https://z-uno.z-wave.me/examples/FLiRSSimpleSwitch/

Code: Select all

// LED pin number
// 13 pin - user LED of Z-Uno board
#define LED_PIN 13

// Last saved LED value
byte currentLEDValue;

ZUNO_SETUP_CHANNELS(ZUNO_SWITCH_BINARY(getter, setter));
// next macro sets up the sleeping mode
// device will wake up by user request and regulary listening for packets
ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE);
// the setup routine runs once when you press reset:
void setup() {
  pinMode(LED_PIN, OUTPUT); // setup pin as output
}
// the loop routine runs over and over again forever:
void loop() {
  // this function sends the device into sleep
  zunoSendDeviceToSleep();
}
void setter(byte value) {
  // value is a variable, holding a "new value"
  // which came from the controller or other Z-Wave device
  if (value > 0) {               // if greater then zero
    digitalWrite (LED_PIN, HIGH); //turn the LED on (HIGH is the voltage level)
  } else {                         // if equals zero
    digitalWrite(LED_PIN, LOW);   //turn the LED off by making the voltage LOW
  }
  // we'll save our value for the situation, when the controller will ask us about it
  currentLEDValue = value;
}

byte getter() {
  return currentLEDValue;
}
Somebody use FLIRS mode ?

Re: FLIRS ISSUE

Posted: 13 May 2017 11:54
by PoltoS
We will fix FLiRS by mid June or earlier.

Re: FLIRS ISSUE

Posted: 03 Sep 2017 00:28
by PoltoS
Z-Uno software 2.1.0 is released with support for FLiRS capable channels: Siren and Valve control