Page 1 of 1

getter() called twice

Posted: 17 May 2019 23:56
by perjar
Dear Forum,

Is it normal that the getter function is called twice everytime, or am I doing something wrong?

My application is a power meter which sends readings to the controller every 2 minutes.

When it is time to send a new report, the sketch prints line 1 below and then calls the zunoSendReport() function.

In the getter() function, I have another print statement which prints line 2. But as you can see, the getter function is called twice, leading to line 3 being printed a few milliseconds later.

Code: Select all

1: 22:44:47.032 -> Sending power report. Power : 128
2: 22:44:47.032 -> Getter - Power - Reported value = 128
3: 22:44:47.063 -> Getter - Power - Reported value = 128
Is this as it should? If not, what am I dong wrong?
If yes, why?

Re: getter() called twice

Posted: 19 May 2019 15:29
by PoltoS
This is certainly because there is also a report from channel 0 (mapped to the channel 1). So this is ok.

2.1.5 will not create channels if it is not needed - this should help to remove duplicates. But in case of many channels of the same time this will still happen on channel #1, since it is mapped to channel 0.

Re: getter() called twice

Posted: 21 May 2019 02:46
by PoltoS
You can test 2.1.5 and read more about channels mapping in this new version

https://forum.z-wave.me/viewtopic.php?f ... 65&p=83074

Re: getter() called twice

Posted: 27 May 2019 15:11
by perjar
I can confirm that in 2.1.5 there is only one call to the getter() function which reduces the number of messages by 50% from this device. A very welcome change!