Reboot board

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Reboot board

Post by PoltoS »

@leriks, @michap, please provide us a minimalistic sketch to reproduce it. We can not catch it.
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Reboot board

Post by michap »

I just try to reproduce it - but reproduce failed...

Any idea what is the difference between reset and power off/on for the Z-Uno?
(I have another issue and want to understand the difference)

Michael
leriks
Posts: 10
Joined: 28 Nov 2016 10:43

Re: Reboot board

Post by leriks »

If I press reset button the device still hangs. But rebooting via power removal makes the hang stop.
Johnep
Posts: 2
Joined: 06 Jan 2017 02:42

Pins 19-22

Post by Johnep »

Hi, after a very frustrating two days I have also found digital pins 19 to 22 reset after being set. It looks like they are reset to 0 when the Fibaro HC2-L checks the value after the pin being set. So far pins 8 through 12 do not suffer this issue.
Also I note if my scope probe (hi Z) is connected to pin 21 then Z-Wave communication is disrupted!!!


Is there a list of known 'bugs' anywhere to prevent people wasting a lot of time trying to figure out what is wrong with their code?
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Reboot board

Post by PoltoS »

Yes, it is a known one. Located and solved in our lab. The fix will be available in 2.0.8 pretty soon
leriks
Posts: 10
Joined: 28 Nov 2016 10:43

Re: Reboot board

Post by leriks »

Hello i have now checked Zuno behavior for a number of days.
It works but 10 times every 24 hours it hangs and i have to reeboot.
This is done via a external ZWave switch. '
It would be better to do this with code.
Belove is the code that i running on Zuno card

******************************
//*********************************************
//CONSTANTS D
//*********************************************
// User LED pin number (not used)
// 13 pin - user LED of Z-Uno board, White LED
#define LED_PIN 13
// Potentiometer pin number, gray cable
#define PHOTO_PIN 1 //1,2,3 checked for hang values 405,406,407
// channel number
#define ZUNO_CHANNEL_NUMBER_ONE 1
// value used to wait in loop
#define WAIT_TIME_VALUE 30000
#define WAIT_TIME_ERROR 360000
// min value analogread
#define LOW_VALUE 1
// max value analogread
#define HIGH_VALUE 1023
// report value for freezing
#define FREEZE_VALUE 99
//*********************************************
//Global variables
//*********************************************
// last photoresistorvalue
word lastphotovalue = 2;
// last reporteds zwavevalue
word lastreportedluxvalue = 3;
// error number
byte founderrors = 0;
//*********************************************
//Setup Z-UNO channels
//*********************************************
ZUNO_SETUP_CHANNELS(
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_LUMINANCE,
SENSOR_MULTILEVEL_SCALE_LUX,
SENSOR_MULTILEVEL_SIZE_TWO_BYTES,
SENSOR_MULTILEVEL_PRECISION_ZERO_DECIMALS,
getterlight)
);
//*********************************************
// Setup z-uno sleeping mode
//*********************************************
//ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_SLEEPING);
//ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE);
ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE);
//*********************************************
//*********************************************
// Code start
//*********************************************
// the setup routine runs once when you press reset:
void setup()
{
pinMode(LED_PIN, OUTPUT); // setup pin as output
pinMode(PHOTO_PIN, INPUT); // setup photoresistor pin as input
digitalWrite(LED_PIN, LOW); // set LED on card off
}
//*********************************************
// the loop routine runs over and over again forever:
void loop()
{
// read photoresistor value (light) and save it inside a variable
lastphotovalue = readphotovalue();
if ((lastphotovalue > 403) && (lastphotovalue < 408 )) // value = 404,405,406,407
{
//os.execute( 'reboot' )
founderrors++;
if (founderrors > 3 ) // hanging report FREE_VALUE (99)
{
founderrors = 0;
lastphotovalue = FREEZE_VALUE;
zunoSendReport(ZUNO_CHANNEL_NUMBER_ONE);
delay(WAIT_TIME_ERROR);
}
else
{
founderrors++;
}
blinkled(2000, 2);
}
else
{
if (lastreportedluxvalue != lastphotovalue)
{
// send report to the controller if new value
zunoSendReport(ZUNO_CHANNEL_NUMBER_ONE);
blinkled(500, 2);
}
// wait
delay(WAIT_TIME_VALUE);
blinkled(1000, 6);
// loop again
}
}
//*********************************************
// Z-Wave Code start
//*********************************************
word getterlight(void)
{
// Set lastreportedluxvalue to lastphotovalue
lastreportedluxvalue = lastphotovalue;
return lastreportedluxvalue;
}
//*********************************************
//*********************************************
// Personal subroutines start
//*********************************************
int readphotovalue()
{
int Result;
// read photo value
Result = analogRead(PHOTO_PIN);
return Result;
}

void blinkled(int blinktime, int times)
{
/*
for (int i=1; i <= times; i++)
{
digitalWrite(LED_PIN, HIGH); // set LED on card on
delay(blinktime);
digitalWrite(LED_PIN, LOW); // set LED on card off
delay(blinktime);
}
*/
}
//*********************************************
*************************************************
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Reboot board

Post by PoltoS »

Please wait for 2.0.8 to repeat your test. If the problem will persist, we will dig in it.
leriks
Posts: 10
Joined: 28 Nov 2016 10:43

Re: Reboot board

Post by leriks »

When does that appeare?
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Reboot board

Post by PoltoS »

leriks
Posts: 10
Joined: 28 Nov 2016 10:43

Re: Reboot board

Post by leriks »

I have recompiled to 2.0.8 and the problem is still there. Around 4-6 times every day the Zuno has to be rebooted.
Post Reply