Z-UNO

Posted on
Tue Oct 10, 2017 10:33 am
davinci offline

Re: Z-UNO

Thanks a lot for this information. Just ordered my module. :D

Regarding the floating point issue. Is this also caused by sending floating point or by calculating it in the sketch? If it is because of sending you could send integer values instead and divide by 100 or so in Indigo.

Posted on
Tue Oct 10, 2017 10:39 am
NewfD90 offline
Posts: 61
Joined: Mar 17, 2017

Re: Z-UNO

The way I understand it is floating point values are not sent. For a precision of one decimal place, I pass that value * 10 to the ZUNO routine.

From what I'm reading on the forums, it looks like it's possibly a stack issue in calculating floating values in the sketch. Not 100% sure though. I figured I'd wait until the latest release, and then re-do my code/device to report integer precision. In my case, the device is a bit difficult to get to...

Posted on
Wed Oct 11, 2017 10:57 am
davinci offline

Re: Z-UNO

I just wanted to say it works perfectly!

I have now a device sending two multilevel sensor data and additionally a dimmer for an LED strip.

Our imagination is the limit. :D

Really cool

Posted on
Thu Oct 12, 2017 7:31 am
NewfD90 offline
Posts: 61
Joined: Mar 17, 2017

Re: Z-UNO

Glad you got it running. Below is my sketch, and the info from Indigo about it.

Code: Select all
   Z-Wave                          Indigo Device "Spa Temperature" Z-Wave Properties:
Indigo Z-Wave Version: 2.0.68
Node ID: 30
Model: Multilevel Sensor (routing)
Model ID: 01100001
Manufacturer: Duwi
Manufacturer ID: 0115
Protocol Version: 4.38
Application Version: 2.10
Model Definition Version: 0
Library Type: 3
Class Name: Multilevel Sensor (routing)
Class Hierarchy: 04 : 21 : 01
Command Class Base: 31
Command Versions: 20v1 60v4 85v1 86v1 8Ev1 70v1 31v7 72v1 73v1 59v1 7Av1 5Av1 5Ev1
Encryption Status: Not Supported
Multi-Endpoint Types: 1:(21 : 01)
Multi-Endpoint Classes: 1:[31]
Multi-Instance Counts: - none -
Features: routing, beaming
Neighbors: 3, 5, 16
Associations: 1:[1]
Config Values: - none -


Code: Select all
/*
 * That is a Simple Sensor Multilevel example
 * It measures the value on the potentiometer
 * And sends report to the controller if changed
 */
 
// LED pin number
#define LED_PIN 13

// channel number
#define ZUNO_CHANNEL_NUMBER_ONE   1

// Last saved temperature value
word lastTemp;

// next macro sets up the Z-Uno channels
// you can read more on http://z-uno.z-wave.me/Reference/ZUNO_SENSOR_MULTILEVEL/
//ZUNO_SETUP_CHANNELS(ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getter));
ZUNO_SETUP_CHANNELS(
   ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE,
                          1,
                          SENSOR_MULTILEVEL_SIZE_TWO_BYTES,
                          SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL,
                          getter));

void setup()

  Serial.begin();
  pinMode(LED_PIN, OUTPUT); // setup pin as output
}

void loop()
{
  float Volts, Temp;
  word currentTemp;
  word adcVal;

 
  // read thermistor value and save it inside a variable
  adcVal = (word) analogRead(A3);

  Serial.print("ADC = ");
  Serial.println(adcVal); 
   
  Volts = ((float)adcVal/1024.0)*3.065;
  Serial.print("Volts = ");
  Serial.println(Volts); 
   
  Temp = (1-0.8*log((Volts*20000.0)/(55880.76*(3.065-Volts))))*52.0;

  // Fix Error above 100
  if (Temp > 99.6)
  {
    Temp += 1.0;
  }
  Serial.print("Temp = ");
  Serial.println(Temp); 
 
  currentTemp = (word)(Temp*10.0);
 
  // if the value is different then the previously measured one
  // save it and send a report
  if (currentTemp != lastTemp)
  {
    // save the value
    lastTemp = currentTemp;

    // send report to the controller
    zunoSendReport(ZUNO_CHANNEL_NUMBER_ONE); 
  }

  // Wait a sec
  delay(1000);
}

// function, which returns the previously saved potentiometer value
// this function runs only once the controller asks
word getter(void)
{
  return lastTemp;
}

Posted on
Thu Oct 12, 2017 10:46 am
davinci offline

Re: Z-UNO

Thanks a lot for sharing.

I'm still learning a lot. Right now I'm stuck at how I can make zunoSendReport for multiple sensors. It looks like it just sends channel one even if I use zunoSendReport(2).

Posted on
Thu Oct 12, 2017 11:09 am
NewfD90 offline
Posts: 61
Joined: Mar 17, 2017

Re: Z-UNO

I haven't done multiple channels, but it looks like you need multiple calls (one for each channel) to ZUNO_SENSOR_MULTILEVEL() within the ZUNO_SETUP_CHANNELS() call.

https://z-uno.z-wave.me/Reference/ZUNO_SETUP_CHANNELS/

BTW, the '1' in my ZUNO_SENSOR_MULTILEVEL() call defines the units as Fahrenheit. Being a European company, they don't have a #define for Fahrenheit, but Celsius was defined as a '0'. I took a chance and set it to '1', and that worked for Fahrenheit.

Posted on
Mon Oct 16, 2017 2:23 am
DrLove offline
Posts: 260
Joined: Dec 12, 2014
Location: Sweden

Re: Z-UNO

Anyone using the "Multicommand Enabled" mode? Does it work w/ Indigo?

http://z-uno.z-wave.me/Reference/Multicommand/

Best regards, L

Love Kull (yes it's my name)
Blog (in Swedish)
Sweden

Posted on
Sun Nov 12, 2017 11:16 am
davinci offline

Re: Z-UNO

Yes, MCA work.

Who is online

Users browsing this forum: No registered users and 3 guests

cron