Z-Uno with battery

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
ggoetz56
Posts: 17
Joined: 26 Oct 2016 10:39

Z-Uno with battery

Post by ggoetz56 »

Hi,
my z-uno with DHT22 (humidity-device based on demo sketch)) works well- but not long.
After 2 days, with 1200mAh Lipo the battery is deep discharged, with no information.

So my question is how to use ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE (flirs). I read (I hope so) all available board- information, but I'm not quite sure if i understand.

How can I communicate with the board (ie. upload a sketch) when it is in sleep mode.
Will I be able to wakeup the board by pressing a button(s)
How can I change the report-intervals (cant' believe only in steps of 240 seconds).
How do I get information about the Battery (should be reported, but not in my case, deep discharging will kill then soon).

Anyone with experience on battery driven z-uno?

Thanks for information
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Z-Uno with battery

Post by michap »

Hi,

can not answer to all questions, but will try to give some hints...

For battery sensor use sleeping device (not FLIRS).
FLIRS will be used for "listening" devices like sirene.

You can wake-up the Z-Uno using the service button

Report interval can be changed using the gateway and set the wake-up interval (do not forget to wake-up the Z-Uno after setting it ;) ...)
Yes, as far as I know the interval can be changed in 240 second steps only.

Battery stats will be reported - I have seen it in my log.
What controller you are using?

In any case - you should remember that while all measuring process the device will take from 5V 30mA.
ifusing a 1200mAh LiPo you have about 1000mAh -> 33hours.
You were using Sleeping mode before?
If no sleeping mode - battery status will not be reported (as far as I know), because of in such a case the device is main powered - in normal case.

Michael
ggoetz56
Posts: 17
Joined: 26 Oct 2016 10:39

Re: Z-Uno with battery

Post by ggoetz56 »

Hi Michael,
first of all thank you.

My controller is a Fibaro HomeCenter2. Devices powerd by battery show a little Icon. So I will try ZUNO_SLEEPING_MODE_SLEEPING and include it again to see it.

How can I set the wake-up interval, as far as I understood in a kind of "ini-file" or is it a set-command.

Delay() won't help saving batterypower?

Since battery-powered sensors are usual, is there a "how to set up battery device with z-uno"? I'm afraid to send my z-uno to a coma not only to sleep-mode.
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Z-Uno with battery

Post by michap »

Set the wakeup via the Gateway - there should be such a parameter.
It is not configurable via sketch.

Delay() can not help to save battery, because of the processor does not sleep, but make delay cycles only.

Maybe I will make a sample for battery powered Z-Uno in next days ;)

Michael
ggoetz56
Posts: 17
Joined: 26 Oct 2016 10:39

Re: Z-Uno with battery

Post by ggoetz56 »

michap wrote:Set the wakeup via the Gateway - there should be such a parameter.
It is not configurable via sketch.
I hope I got it. But i'm still confused about the 240 sec.

But the main issue is "coma-state". I defined wakeup interval 240 sec. But nothing will be reported whether to serial monitor nor to Home Center, except the battery -status.

Code: Select all

// add library
#include "ZUNO_DHT.h"
// pin connection
#define DHTPIN1 11  // first sensor
#define DHTPIN2 12  // second sensor

DHT dht1(DHTPIN1, DHT22);  //
DHT dht2(DHTPIN2, DHT22);

int humidity1;      // here we will store the humidity of first sensor
float temperature1;   // here we will store the temperature of first sensor  (float for decimals)
int humidity2;      // here we will store the humidity of second sensor
float temperature2;   // here we will store the temperature of second sensor  (float for decimals)

// set up channels
ZUNO_SETUP_CHANNELS(
  ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature1),
  ZUNO_SENSOR_MULTILEVEL_HUMIDITY(getterHumidity1),
  ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature2),
  ZUNO_SENSOR_MULTILEVEL_HUMIDITY(getterHumidity2)
);
ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_SLEEPING); // setzt den sleeping mode

void setup() {
  dht1.begin();
  dht2.begin();
  Serial.begin();
  Serial.println("start");
}

void loop() {
  // obtaining readings from the sensor DHT
  humidity1 = dht1.readHumidity();
  temperature1 = dht1.readTemperature();
  humidity2 = dht2.readHumidity();
  temperature2 = dht2.readTemperature();
  Serial.print("Humidity1 = ");
  Serial.print(humidity1);
  Serial.println(" %  ");
  Serial.print("Humidity2 = ");
  Serial.print(humidity2);
  Serial.println(" %  ");
  Serial.print("Temperature1 = ");
  Serial.print(temperature1);
  Serial.println(" *C");
  Serial.print("Temperature2 = ");
  Serial.print(temperature2);
  Serial.println(" *C");
  // send data to channels
  zunoSendReport(1);
  zunoSendReport(2);
  zunoSendReport(3);
  zunoSendReport(4);
  // send every 30 second
  delay(30000);
 zunoSendDeviceToSleep();

}

byte getterTemperature1() {
  return temperature1;
}

byte getterHumidity1() {
  return humidity1;
}
byte getterTemperature2() {
  return temperature2;
}

byte getterHumidity2() {
  return humidity2;
 }
  
Attachments
Konf-en.PNG
Konf-en.PNG (14.08 KiB) Viewed 9691 times
DHT22.PNG
DHT22.PNG (296.57 KiB) Viewed 9691 times
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Z-Uno with battery

Post by michap »

If I remember right the USB serial monitor wil not work, because of while sleeping it is disabled, you should close it.
And after wake-up it will report only once to the "inactive" serial monitor.

About HC2, have not tested in this time - maybe somebody else can test it?

Michael
mdietinger@gmail.com
Posts: 39
Joined: 12 Aug 2016 12:08

Re: Z-Uno with battery

Post by mdietinger@gmail.com »

Gerhard,

if you get batterie report it looks like polling works.
Maybe you need to put a delay in before you poll DHT22 to allow power to stabilize before retrieving the measurements.
eg. delay(1000); at the beginning of Void Loop()

As well you should remove delay(30000); at the end of the loop as it prevents Z-UNO to go to sleep. (Additional power drain)

You should be able to see the reports in the Event panel.
ggoetz56
Posts: 17
Joined: 26 Oct 2016 10:39

Re: Z-Uno with battery

Post by ggoetz56 »

Hi Markus,
the issue is that z-uno won't wakeup anyway. I call this coma-mode.
In coma-mode you even can't loadup a sketch. You have to reset the board. Without delay coma starts at once and so on. You have to reset the board to factory default. 30 sec delay enables me to communicate with the board i.e. loading up a new sketch.

Any hints why wake-up interval don't work?
The wake-up should also be performed when pressing Service-button- correct? Green Led is´on for abut 30 sec but there is no report to Homecenter.

So at the moment I can't use battery, but i have to.

I will start a new threat, asking if someone can explain what sleepmode realy does.

p.s. I like your HYT221-Sketch using I2C-Bus. After resolving battery problem I will have a look at it.
mdietinger@gmail.com
Posts: 39
Joined: 12 Aug 2016 12:08

Re: Z-Uno with battery

Post by mdietinger@gmail.com »

OK, playing with sleep mode is another thing I will do this weekend :-)
Will let you know if I get it to work.
mdietinger@gmail.com
Posts: 39
Joined: 12 Aug 2016 12:08

Re: Z-Uno with battery

Post by mdietinger@gmail.com »

Gerhard,

just to be on save side: Did you remove your device in HC2 and add it again?
The settings are only transfered during learning.

regards,

markus
Post Reply