Z-Uno and debuging?

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Ispep
Posts: 1
Joined: 26 Apr 2016 15:40
Location: Sweden
Contact:

Z-Uno and debuging?

Post by Ispep »

Hello

I just got access to a Z-Uno and have uploaded an example sketch to verify blink (worked OK) but when I tried the (http://z-uno.z-wave.me/examples/SimpleSwitch/) It won´t start the led on my board when sending commands from Vera with UI7. I excluded and reincluded the device but it still not able to enable the led on pin 13.

I tried to add the default Serial.begin but got this error:
SimpelSwitch:13: error: too many parameters
too many parameters

Is it possible to add serial debug information from it to know what information I’m processing in my code later?
I have not been able to test in on my Z-stick or telldus Znet lite
regards Ispep
Anything can be automated!
Home automation blog: http://www.automatiserar.se
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Z-Uno and debuging?

Post by michap »

Hi,

please attach the full sketch, so that it could be checked.
And please add information what firmware you are running (like 0.6.2)

Best regards
Michael
Quikdav
Posts: 9
Joined: 08 Sep 2016 22:06

Re: Z-Uno and debuging?

Post by Quikdav »

Hi

same for me. How can we check data we are processing. I use a Grove light sensor and I would like to check if it works with Certified 10 Channels Sketch

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

Re: Z-Uno and debuging?

Post by michap »

Hi,

you can insert a simple Serial.println and check on debug window.

If you need help - send me your sketch via PM -I will insert it for you.
You can see then every value before sending.

Or do you want to debug something else?

Michael
Quikdav
Posts: 9
Joined: 08 Sep 2016 22:06

Re: Z-Uno and debuging?

Post by Quikdav »

thanks for the reply... yes I just want to check the value from the sensor (to konow if it is compatible first and if I get date from it)... So I add the command but now I have an other issue.. I can't upload the sketch. Everything seems to be ok for the port, I selected it but it is written "Disable on COM5" on the IDE...

My port is not stable, I have to wake up the zuno to get it when it disappear... any idea why

thanks
Quikdav
Posts: 9
Joined: 08 Sep 2016 22:06

Re: Z-Uno and debuging?

Post by Quikdav »

So I added following code within Certified 10 Channels Sketch. When I open the console from arduino IDE, I don't have anything !!!

// Luminosity
Serial.println("valeur: ");
Serial.println(analogRead(LumiPin));

currentLumiValue = (byte)(100 - analogRead(LumiPin)*25/256);
if ((currentLumiValue > (lastLumiValue + 5)) || (currentLumiValue < (lastLumiValue - 5))) {
lastLumiValue = currentLumiValue;
zunoSendReport(8);
}
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Z-Uno and debuging?

Post by michap »

Hi,

I think you are using Arduino 1.6.5 - as far as I know it is the latest stable version for Z-Uno.

1) please use latest firmware, update to 2.05 (latest C++ release candidate)
-> remove stable URL in Arduino IDE settings and put this instead:
http://z-uno.z-wave.me/files/z-uno/test ... index.json

in older versions not all features implemented

2) add in
void setup() {
....
Serial.begin();
}

Then you can check the debug output.

HINT:
Before uploading new sketch close the serial output window.
In other case the COM port may be not available more after uploading new sketch.
If this happen ("lost " COM), close the windows, press reset button on Z-Uno, check on Arduino the Port and reopen the window.

It's a good idea to add any delay into the loop using the Serial.print.

Additional - my experience is to comment out at first any "zunoSendReport()" before values are stable.
So you can check all the process before ;)

I hope it helps.

Michael
Quikdav
Posts: 9
Joined: 08 Sep 2016 22:06

Re: Z-Uno and debuging?

Post by Quikdav »

Thanks a lot for all these informations. Hope it will works. You'are right for all my versions ;-)
I spent 3 hours yesterday with port issues. Very frustrating :-(
I will follow your recommendations this week end and will inform you about the result...
Quikdav
Posts: 9
Joined: 08 Sep 2016 22:06

Re: Z-Uno and debuging?

Post by Quikdav »

Very good news, everything is working fine now.. I installed again arduino IDE to be sure USB drivers were well installed

Then I upgrade to 2.05. I was in 0.67 !!! I understood available and proposed versions depend on the url you suggested, right ?
The serial output window is fine too, I can see values from my sensor.

I have a HC2 from fibaro so I have my device for luminance. I just have to understand why value is not always updated when it changes. I used certified code from ZUNO so when % of luminance change from 5%, I should send a report to the controller. The command is executed (I put a serial.print for checking). Maybe the controller is not able to receive too many requests from the board. Do you use a delay after sending report on each channel ?

Thanks
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Z-Uno and debuging?

Post by PoltoS »

As mentioned in the reference of zuneSendReport(), it is not allowed to send reports more often than every 30 seconds. This is Z-Wave Plus restriction. We think about making a config param to bypass this limitation to allow people more intuitive and reactive reports.
Post Reply