Z-Wave-Me / Z-Uno-Core

Core files for Z-Uno support in Arduino IDE 1.6.5
21 stars 12 forks source link

[2.0.6] sleeping mode with 18B20 #97

Closed michapr closed 7 years ago

michapr commented 8 years ago

Please provide any sample for users for sleeping mode

As sample a temp sensor reporting every 10 minutes or/and a temp sensor reporting if values was chaged by 1°C

Reading documentation it is not clear for me how it can work ;)

Thanks!

PoltoS commented 8 years ago

This page describes it http://z-uno.z-wave.me/Reference/zunoSendDeviceToSleep/

michapr commented 8 years ago

This page describes it http://z-uno.z-wave.me/Reference/zunoSendDeviceToSleep/

OK, this page is online again, and something is described here. But anyway...

Z-Uno will wake up after wakeup period (set up via Wakeup Command Class)

Is this the final solution? Or will it be changed using the future config parameters? Most devices have a setup option for (as sample) checking temperature measure interval - independent of the wakeup time of device. Would be nice if Wakeup Command Class is configurable via Arduino code (I think it is, only do not know how ;) ....)

michapr commented 8 years ago

Additional: Could you please publish a simple sample (DS18B20 sensor) in sleeping mode? My first try was not successful, so I think it could be helpful for other users too ;) (didn't got Temperature values, but "default backup value" ;) ) Thanks!

michapr commented 8 years ago

I found out how it can work - but any small optimization in lib would be nice ;) Even not sure - is this the correct way...

void setup() { DS18B20Sensor ds1820(&ow); Serial.begin(); Serial.println("start"); } ` void loop() { delay(20); // obtaining readings from the sensor ds18b20 temp=getTempds18b20(); // send data to channel delay(20); zunoSendReport(1); zunoSendDeviceToSleep(); }`

michapr commented 8 years ago

Sleeping mode with 18B20 is not working. Send first value and never wake up. Yes, I have modified the wakeup time to 240seconds ;)

Normal sleeping mode (without sensor, but fixed value) is working fine. Can you please recheck?

Additional - you are sure that you have icluded the right measure time of 18B20 in library ? It takes up to 750ms, depending on resolution.

Attached the sketch. (why it does not acccept *.zip?...)

zUno_18b20_sleep.txt

PoltoS commented 8 years ago

Related to https://forum.z-wave.me/viewtopic.php?f=3427&t=23876

michapr commented 8 years ago

will be solved (both - invalid first value and "hanging sleep" if you modify the OneWire.cpp as described in forum (link above)

Please close if modification was done.

PoltoS commented 7 years ago

Fixed