Problem with ASSOCIATION

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Problem with ASSOCIATION

Post by A.Harrenberg »

Hi,

i am struggling with two problems for ASSOCIATION at the moment.

I exetended the simple_switch example to have an association group added and whenever the state is changed i use e.g.

Code: Select all

zunoSendToGroupSetValueCommand(CONTROL_GROUP_1, 0xff);
to get the basic set command send out for that association group.

Problem #1: I included the controller and a wall plug in the association group (User Group 1), but nothing happens, I can not see any message arriving at my controller and the wall plug is also not reacting. I attached the sketch as a zip file, maybe you can have a look and I am overlooking a very basic thing here...

Problem #2: During testing I excluded the device, made some minor change to the sketch and uploaded it. Then I included the device again in my network and read out the information for the ASSOCIATION class like number of groups, names and associated nodes. There I noticed that even after excluding and including, the controller and the wall plug was still reported as associated nodes. I think there this is a bug as during an exclude all these information should be discarded.

Best regards,
Andreas.

P.S.: Why aren't *.ino files not allowed as an attachment?
Attachments
SimpleSwitch_ah1.zip
(969 Bytes) Downloaded 240 times
fhem.de - ZWave development support
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Problem with ASSOCIATION

Post by PoltoS »

Looking into https://github.com/Z-Wave-Me/Z-Uno-Core ... initions.h I see this:
#define CTRL_GROUP_1 1
#define CTRL_GROUP_2 2
#define CTRL_GROUP_3 3
#define CTRL_GROUP_4 4
#define CTRL_GROUP_5 5

May be the example is a bit old and we need to fix it. Please confirm that it works after changing 2 to 1. Also are you using 2.x.x or 0.x.x version?
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: Problem with ASSOCIATION

Post by A.Harrenberg »

Hi PoltoS,

ich changed the define to "1" but it still not working. And I can confirm that the association still was also there after another exclude/include.

I am using the 2.x.x (I hope, at least I changed the definition to:
http://z-uno.z-wave.me/files/z-uno/test ... index.json

Later this night I will have some more time to test. I will do a full reset of the Z-Uno and try again, maybe I screwed something up during my testing so far...

You might also want to update/change the description of the association:
http://z-uno.z-wave.me/Reference/ZUNO_S ... OCIATIONS/
There it is mentioned that control group 1 is in fact 2, which get me to put a 2 there.

Thnx,
Andreas.
fhem.de - ZWave development support
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: Problem with ASSOCIATION

Post by A.Harrenberg »

Hi PoltoS,

I tried several times to exclude and re-programm the Z-Uno with different other sketches and had a lot of very wierd behavior. Sometimes the Z-Uno was included with a wrong type, e.g. I programmed a mulitlevel_switch and a binary_switch was reported. Or I just added two more association groups and all of a sudden only lifeline was reported instead of lifeline plus 3 more...

But all the time, IF a 2nd association group was reported, the old associations from the last include where still in the report.

I now switched back to 0.x.x version by using http://z-uno.z-wave.me/files/z-uno/pack ... index.json, recompiled the sketch and included it. It reported all the association groups, still with the old association, but did not work either. I then removed the associations and created them again and now it works. I definitely tried this also with the 2.x.x version and it did not help there.

So there might be a tricky problem in the upcoming release...

I just noticed another strange thing... I excluded and included the Z-Uno again, associations were still there, not working, removing the associations and re-creating them like before, but not working.

Just pressed the reset button and now it works...

I did not pay attention to it until now, but I realized earlier that if I include the device and then try to exclude it directly after, it will not react to the tripple click and I have to do a reset before it will react on the tripple click.

I can try it again tomorrow with the 2.x.x if pressing the reset button will change the behavior there.

If I can try something that helps you identifying the root cause of that strange behavior, please let me know.

Best regards,
Andreas.
fhem.de - ZWave development support
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: Problem with ASSOCIATION

Post by A.Harrenberg »

Hi PoltoS,

i changed back to the beta 2.x.x and repeated the above steps.

There is still some very odd behavior, it seems that most of the time my changed sketches are not correctly uploaded to the Z-Uno and/or the changes to the association groups are not accepted.

I extended the number of association groups to 4 to see a difference and after excluding, uploading the changed sketch and including again, there were still only 3 groups. I exclued the device then, did a full-reset on the Z-Uno (hold service button 5 seconds, then releasing and tripple clicking it) and uploaded the sketch again. After that there were 4 groups and after clicking reset the association is now working without setting the association again.

I also noticed a few CAN-msg during the interview following the inclusion, I will have a look at what is happening here but I doubt that this causes trouble as the messages are repeated and it only happens during a few of the inclusions. Most of the inclusion succeed without CAN-msg and still suffer from this odd behavior...

For me I see several problems:
a.) The information about the associated nodes are existing even after exclusion and reprogramming the Z-Uno
b.) There seems to be an issue with upload new sketches on my setup
c.) Due to the above behavior I am not sure if the exclusion process is really working inside the Z-Uno, I receive the confirmation msg from the controller, and have never encountered such problems with other devices, so I don't think that this is related to the controller or fhem installation I am using. After exclusion the Z-Uno is no longer in the nodelist of the controller.

I just excluded the device and tried sending messages to the old nodeID and at least the Z-Uno is not reacting/answering on these messages. So at least the communication is stopped after the exclusion.

Am I missing some basic point when uploading? I make the changes to the code, save the sketch, connect the Z-Uno and press upload... I get no error messages, I get the progress bars and at the end the Z-Uno is resetted. I then disconnect the Z-Uno from the computer and connect it just to USB-Power.

I will have a look at the serial debug and add some debuging printout (e.g. print out a version number to see if the new sketch is programmed or not). Hopefully this will help understanding the situation...

Best regards,
Andreas.
fhem.de - ZWave development support
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: Problem with ASSOCIATION (almost everything solved)

Post by A.Harrenberg »

Hello PoltoS,

most of the mystery is now solved...

First of all my upgrade to 2.0.5 was somehow corrupt / not successfull, after checking there was still 0.6.7 reported and i got strange error messages when trying to build a sketch with serial communication for debugging.

After re-installing and a new uprade to 2.0.5 these error messages were gone and I could get the sketch to work after several resets, but there was still a lot of strange things ongoing like loosing the serial connection everytime I changed the state of the binary switch and after a few changes the device would still react but won't send out ACK messages.

I then tested everything on my laptop and is was working good, the only apparent difference was that I installed the USB-driver on my desktop computer but not on my laptop. So installed the the driver on my laptop and it still works good... After some further testing I found that the problem is related to my USB-Hub! If I use a direct USB port on my desktop computer it works, using this (or another) USB-Hub I get severe problems...

Now even the problem with the nodes staying in the association after exclude is gone, but there is still one issue:
After include I add the wall plug to the association group but the wall plug is not reacting. I realized that during this time also the red LED is blinking fast. If I press the reset button then the red LED stops blinking at all and only the green LED is blinking slowly. In this state everything seems to work fine!

Sorry for all this mess, but I had not expected that (most of the problems) are caused by my USB-Hub. It is powered and so far I didn't had problems with it and I also programmed some Arduinos with it without any problems so far.

You might want to put a warning about using USB-Hubs in the troubleshooting page to prevent other finding this very strange behavior.

Now I can go back to test the communication with security, because originally I wanted to test that the association from a secured device to a non-secured device is working...

Best regards,
Andreas.
fhem.de - ZWave development support
Post Reply