New 2.1.5 release

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Miklux
Posts: 31
Joined: 01 Oct 2018 17:02

Re: New 2.1.5 release

Post by Miklux »

Hi samsonbox,
thank you for your reply.

In general I don't know how the dynamic approach works.
I haven't tried this approach yet, but now, thanks to you, I will be able to test it and publish the results.

Thank you so much.

In some minutes I hope to publish the results :D
Miklux
Posts: 31
Joined: 01 Oct 2018 17:02

Re: New 2.1.5 release

Post by Miklux »

Hi again!

I'm trying the dynamic approach but still something is not right...

This is my code:

Code: Select all

#define MAP_TO_ZEROCHANNEL 0x80

ZUNO_ENABLE(WITH_CC_SENSOR_MULTILEVEL);
ZUNO_DYNAMIC_CHANNELS(3);

unsigned int counterIngressi = 0;
unsigned int counterUscite = 0;
unsigned int counterPresenze = 0;

void setup() {
  // DEFINIZIONE DELLA GESTIONE DINAMICA DEI CANALI
  ZUNO_START_CONFIG();
  ZUNO_SET_ZWCHANNEL(1| MAP_TO_ZEROCHANNEL); // <- this channel will be provided via 1 & 0 channels
  ZUNO_ADD_CHANNEL(ZUNO_SENSOR_MULTILEVEL_CHANNEL_NUMBER, ZUNO_SENSOR_MULTILEVEL_TYPE_GENERAL_PURPOSE_VALUE, SENSOR_MULTILEVEL_PROPERTIES_COMBINER( SENSOR_MULTILEVEL_SCALE_LOCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS));
  ZUNO_SET_ZWCHANNEL(2);
  ZUNO_ADD_CHANNEL(ZUNO_SENSOR_MULTILEVEL_CHANNEL_NUMBER, ZUNO_SENSOR_MULTILEVEL_TYPE_GENERAL_PURPOSE_VALUE, SENSOR_MULTILEVEL_PROPERTIES_COMBINER( SENSOR_MULTILEVEL_SCALE_LOCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS));
  ZUNO_SET_ZWCHANNEL(3);
  ZUNO_ADD_CHANNEL(ZUNO_SENSOR_MULTILEVEL_CHANNEL_NUMBER, ZUNO_SENSOR_MULTILEVEL_TYPE_GENERAL_PURPOSE_VALUE, SENSOR_MULTILEVEL_PROPERTIES_COMBINER( SENSOR_MULTILEVEL_SCALE_LOCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS));
  ZUNO_COMMIT_CONFIG();
  //....
  Serial.begin(115200);
  counterIngressi = 0;
  counterUscite = 0;
  counterPresenze = 0;

  pinMode(20, OUTPUT);      // sets the digital pin as output
  
}

void loop() {
  g_channels_data[0].dwParam = counterIngressi;
  g_channels_data[1].dwParam = counterUscite;
  g_channels_data[2].dwParam = counterPresenze;

  bool inNetwork = zunoInNetwork();
  if(inNetwork==1) Serial.println("Device in network");
  else Serial.println("Device not in network");

  
  if (Serial.available() > 0) {
    // read the incoming byte:
    counterIngressi = Serial.parseInt();
    counterUscite = Serial.parseInt();
    counterPresenze = Serial.parseInt();
    if(Serial.read()=='\n') {
      digitalWrite(20,HIGH);
      delay(500);
      digitalWrite(20,LOW);  
      Serial.println(counterIngressi);
      Serial.println(counterUscite);
      Serial.println(counterPresenze);
      }
    }

    delay(1000);
  
}


word getterIngressi() {
  return counterIngressi;
}

word getterUscite() {
  return counterUscite;
}

word getterPresenze() {
  return counterPresenze;
}
When I associate the device to my Widom gateway I can't see the 3 channels on the gateway interface...
I really don't understand how this approach could works.

Maybe I need to add something like zunoSendReport() ?
Thank you in advance for your help
rkv
Posts: 4
Joined: 15 Jul 2019 13:13

Re: New 2.1.5 release

Post by rkv »

samsonbox wrote:
16 Jul 2019 22:55
I have a problem with the

Code: Select all

ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE); 
with the loop I call

Code: Select all

  zunoSetBeamCountWU(10);
  zunoSendDeviceToSleep();
but the device does not wake up any more. The Battery and wake_up command class is also missing on the contoller side. But in react on any commands.
This is works fine in 2.1.5 update. Try to exclude your zuno and then include. If it won't work try other zuno.
Also wake_up command class can be only in always sleeping device.

Here are the interview results for your code.
Attachments
flirs.png
flirs.png (40.45 KiB) Viewed 11836 times
Last edited by rkv on 19 Jul 2019 14:21, edited 1 time in total.
rishamee
Posts: 20
Joined: 24 Aug 2018 18:56

Re: New 2.1.5 release

Post by rishamee »

I had the same problem. Including the Z-Uno in normal (operation) mode instead of including in rescue mode solved it.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: New 2.1.5 release

Post by PoltoS »

Sure, in rescue mode the Z-Uno is not running your sketch
samsonbox
Posts: 16
Joined: 06 Sep 2016 22:42

Re: New 2.1.5 release

Post by samsonbox »

This is works fine in 2.1.5 update. Try to exclude your zuno and then include. If it won't work try other zuno.
Also wake_up command class can be only in always sleeping device.
Nowit works fine. But first i had to perform a "Erase NVM: All" once during one upload. It seems like the Device holds some data in the NVM, thant causes this stange behaviour. So what is essentially stored in the "User Space"- and "System Space" NVM?
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: New 2.1.5 release

Post by PoltoS »

A lot of specific Z-Wave data including your network info and internal SDK configurations. After upgrade from old versions sometimes you need to erase it
Cyberax
Posts: 13
Joined: 15 Apr 2019 10:00

Re: New 2.1.5 release

Post by Cyberax »

Well, now I'm able to upload sketches at least in 50% of cases.

However, ZUNO_DISABLE(SERVICE_LEDS) doesn't work anymore. Still have this damned blinking green LED
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: New 2.1.5 release

Post by PoltoS »

Please try to re-install the package (delete Z-Uno folders/files in stageing and package)
Cyberax
Posts: 13
Joined: 15 Apr 2019 10:00

Re: New 2.1.5 release

Post by Cyberax »

Still blinking, even with an empty sketch:

Code: Select all

ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE);
ZUNO_SETUP_DEBUG_MODE(DEBUG_ON);
ZUNO_DYNAMIC_CHANNELS(32);

ZUNO_ENABLE(WITH_CC_SWITCH_MULTILEVEL);
ZUNO_DISABLE(SERVICE_LEDS);

void setup() {
}

void loop() {
}
I'm using the USA frequency and no security.
Post Reply