Zuno 2 - Meter electric scales issue

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
niky94547
Posts: 15
Joined: 31 May 2019 10:51

Zuno 2 - Meter electric scales issue

Post by niky94547 »

Hello ZWaveMe team,

Could you please advice, facing an issue on Meter Electric channel with PowerFactor scale. After inclusion, interview not pass and no value comes from that channel.

Checked other scaling KHW, KVAH and Pulsecount are OK, but on Amps, Volts and PowerFactor issue observed.

Tested on 3.0.9 beta and with new 3.0.10. Please find below details and minimized code to reproduce the issue:

More info:

Z-Uno2 bootloader version:3.0.10 (release version)
Security:S2
Frequency:EU
Device included:yes
Device included securely by controller:yes
Controller:RaZberry7 - 7.28 / Z-Way - 4.0.2 [/list]


Code: /minimized one channel only/

Code: Select all

ZUNO_SETUP_CHANNELS(
 ZUNO_METER(
   ZUNO_METER_TYPE_ELECTRIC,
   METER_RESET_DISABLE, 
   ZUNO_METER_ELECTRIC_SCALE_POWERFACTOR,
   METER_SIZE_TWO_BYTES,
   METER_PRECISION_TWO_DECIMALS,
   getterPowerFactor,
   resetterPowerFactor
  )
)

word PowerFactor = 0;

void setup() {
     PowerFactor = 1;
}

void loop() {
}

word getterPowerFactor() {
     return PowerFactor;
}

void resetterPowerFactor(byte value) {
}
Compilier Log:

Code: Select all

FIRMWARE
          
VERSION:		03.10
BUILD_SEQUENCE:		00001842
BUILD_DATETIME:		2023-01-17T17:38:12(MSK)
SUPPORTED_HWREV:	0704
          
LIMITS
          
CODE:	178176 Bytes
RAM:	16384 Bytes
          
HARDWARE
          
CHIP_UID:	 84 2E 14 FF FE 6A 28 08
PROD_TIME:	 2021-07-07T20:41:25(MSK)
PROD_SN:	 213
LOCK:		 DBG_LOCKED

ZWay - img1
ZWay - img2

Thanks,
amatilda
Posts: 58
Joined: 26 Sep 2021 22:09

Re: Zuno 2 - Meter electric scales issue

Post by amatilda »

Hello. Thank you for writing - there is a small error in the code.

To fix it, you need in the file hardware\arduino\zunoG2\cores\ZWSupport\ZWCCMeter.h on line 85 replace:

Code: Select all

#define GET_SCALE2(params) ((params & 0x04) << 7)
on

Code: Select all

#define GET_SCALE2(params) ((params & 0x04) << 5)
niky94547
Posts: 15
Joined: 31 May 2019 10:51

Re: Zuno 2 - Meter electric scales issue

Post by niky94547 »

Hello,

Thanks a lot for prompt reply and support. Tested PF scale, it's ok.

Br,
niky94547
Posts: 15
Joined: 31 May 2019 10:51

Re: Zuno 2 - Meter electric scales issue

Post by niky94547 »

Hello,

I've continued with more tests on our exact configuration and sending reports below:

1. On S2 inclusion all seems ok - interview on 100%, meter scales, channel configuration and reports are ok.

ZWay-1
ZWay-2

2. But on unsecured inclusion there’s a confusion:

- No configuration on meter endpoints, root meter device receive value, but not the endpoints. There is no reset on KWh scale.
- Also when we use ZUNO_DISABLE (MODERN_MULTICHANNEL_S2_ALWAYS) macro, channels appearance in Z-Way changed (in both modes unsecure and s2 inclusion too). Duplication on root device and endpoint for Sensor Multilevel and Meter occurred.

ZWay-3
ZWay-4


Do you had advice on this, intentions are to have backward compatibility on unsecured inclusion and same appearance on channels configuration without duplication.

Below provide simplified code with our exact SETUP_CHANNELS, in order to reproduce behavior:

Code: Select all

ZUNO_DISABLE (MODERN_MULTICHANNEL_S2_ALWAYS);                // S2 stays in NIF/multichannel list if device included unsecurely.

ZUNO_SETUP_CHANNELS(

 ZUNO_SWITCH_BINARY(getterSwitch, setterSwitch),
 ZUNO_SWITCH_BINARY(getterSwitch, setterSwitch),

 ZUNO_SENSOR_MULTILEVEL(
  ZUNO_SENSOR_MULTILEVEL_TYPE_VOLTAGE, 
  SENSOR_MULTILEVEL_SCALE_VOLT, 
  SENSOR_MULTILEVEL_SIZE_TWO_BYTES, 
  SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, 
  getterSensor
  ),
 ZUNO_SENSOR_MULTILEVEL(
  ZUNO_SENSOR_MULTILEVEL_TYPE_FREQUENCY, 
  SENSOR_MULTILEVEL_SCALE_HERTZ, 
  SENSOR_MULTILEVEL_SIZE_TWO_BYTES, 
  SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, 
  getterSensor
  ),
 ZUNO_SENSOR_MULTILEVEL(
  ZUNO_SENSOR_MULTILEVEL_TYPE_CURRENT, 
  SENSOR_MULTILEVEL_SCALE_AMPERE, 
  SENSOR_MULTILEVEL_SIZE_TWO_BYTES, 
  SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, 
  getterSensor
  ),
  
 ZUNO_METER(
  ZUNO_METER_TYPE_ELECTRIC,
  METER_RESET_DISABLE,
  ZUNO_METER_ELECTRIC_SCALE_WATTS,
  METER_SIZE_TWO_BYTES,
  METER_PRECISION_ZERO_DECIMALS,
  getterSensor,
  resetterSensor
  ),
 ZUNO_METER(
  ZUNO_METER_TYPE_ELECTRIC,
  METER_RESET_DISABLE, 
  ZUNO_METER_ELECTRIC_SCALE_POWERFACTOR,
  METER_SIZE_TWO_BYTES,
  METER_PRECISION_TWO_DECIMALS,
  getterSensor,
  resetterSensor
  ),
 ZUNO_METER(
  ZUNO_METER_TYPE_ELECTRIC, 
  METER_RESET_ENABLE, 
  ZUNO_METER_ELECTRIC_SCALE_KWH, 
  METER_SIZE_TWO_BYTES, 
  METER_PRECISION_TWO_DECIMALS, 
  getterSensor,
  resetterSensor
  )
    );

bool swValue = 0;
word chValue = 0;

void setup() {
  
chValue = 1;

}

void loop() {

}

void setterSwitch(byte value) {
 swValue = value; 
}

byte getterSwitch(void) {
 return swValue;
}

word getterSensor(void){
 return chValue;
}

void resetterSensor(byte value){
 chValue = 0;
}
Thanks a lot for the support.
Br,
niky94547
Posts: 15
Joined: 31 May 2019 10:51

Re: Zuno 2 - Meter electric scales issue

Post by niky94547 »

amatilda wrote:
18 Mar 2023 13:54
Hello. Thank you for writing - there is a small error in the code.

To fix it, you need in the file hardware\arduino\zunoG2\cores\ZWSupport\ZWCCMeter.h on line 85 replace:

Code: Select all

#define GET_SCALE2(params) ((params & 0x04) << 7)
on

Code: Select all

#define GET_SCALE2(params) ((params & 0x04) << 5)
Hello Amatilda,

I've continue with debug on Metter Electric. Applying the above fix, resolved getter issue, but zunoSendReport not updating the value. It's valid for Amps, Volts and PowerFactor scales. On Zniffer, channel report arrived but value in Z-way not updating. Only via getter triggering. The KWH, KVAH, Watts and Pulsecount scales are ok (getter and unsolicited reports). Testing on S2 inslusion...

Hope not bothering too much with my writings :) As we force our project based on Zuno2, trying to post all observed issues. So we could continue further with the device.

Thanks a lot for your support,
Best regards,
niky94547
Posts: 15
Joined: 31 May 2019 10:51

Re: Zuno 2 - Meter electric scales issue

Post by niky94547 »

Hi,

For your reference, here is debug console post. Scale is Meter_Amps

after zunoSendReport: (not updating value on Z-way UI)

Code: Select all


REPORT CH:0 TYPE:5
 >>> (971478) ENQUEUED PACKAGE:  SRC_ID:15.0 DST_ID:1.0 KEY:FF OPTS:25 DATA:32 02 01 0A 00 22 00 00 
CommandQueue Size:1
*** QCH:2
971492*** GROUP:1 I:0 PKG
*** NODE ID:1 channel:1

 >>> (971498) OUTGOING PACKAGE:  SRC_ID:15.0 DST_ID:1.0 KEY:1 OPTS:25 DATA:32 02 01 0A 00 22 00 00 

 

after Getter: (updating value on Z-way UI)


Code: Select all


1056086INCOMING   SRC_ID:1.0 DST_ID:8192.0 KEY:1 OPTS:0 DATA:32 01 28 
N_CH=1
CHANNEL WAS  FOUND:0
DATA TEST:
 >>> (1056098) ENQUEUED PACKAGE:  SRC_ID:15.0 DST_ID:1.0 KEY:1 OPTS:25 DATA:32 02 A1 0A 00 24 00 00 
CommandQueue Size:1
*** QCH:0

 >>> (1056112) OUTGOING PACKAGE:  SRC_ID:15.0 DST_ID:1.0 KEY:1 OPTS:25 DATA:32 02 A1 0A 00 24 00 00 

 
Thanks,
Br,
User avatar
PoltoS
Posts: 7562
Joined: 26 Jan 2011 19:36

Re: Zuno 2 - Meter electric scales issue

Post by PoltoS »

We found a bug in Z-Way that made some features of Meter not available in the last channel. This will be released soon.
niom
Posts: 5
Joined: 24 May 2023 10:37

Re: Zuno 2 - Meter electric scales issue

Post by niom »

Might be related to this issue.

If I setup 4 channels like this

Code: Select all

ZUNO_SETUP_CHANNELS(

 ZUNO_SWITCH_BINARY(getterSwitch, setterSwitch),
 ZUNO_SENSOR_BINARY(ZUNO_SENSOR_BINARY_WATER, floodSensor),
  
 ZUNO_METER(ZUNO_METER_TYPE_WATER, METER_RESET_ENABLE, ZUNO_METER_WATER_SCALE_METERS3, METER_SIZE_FOUR_BYTES, METER_PRECISION_THREE_DECIMALS, getterCold, resetterCold),
                    ZUNO_METER(ZUNO_METER_TYPE_WATER, METER_RESET_ENABLE, ZUNO_METER_WATER_SCALE_METERS3, METER_SIZE_FOUR_BYTES, METER_PRECISION_THREE_DECIMALS, getterHot, resetterHot)
    );
So the order is binary_switch, binary_sensor, water_meter1, water_meter2. And in this order if I include it in HC3 it inludes it but leaves it in "not configured" state.

If I change order of these channels to water_meter1,water_meter2, binary_sensor, binary_switch. It includes Z-UNO and configures it correctly.


Seems that this is a ZUNO_METERs macro problem.
User avatar
PoltoS
Posts: 7562
Joined: 26 Jan 2011 19:36

Re: Zuno 2 - Meter electric scales issue

Post by PoltoS »

Should not be related. I think it is not a Z-Uno bug, but a HC3 bug. @amatilda, please check
niom
Posts: 5
Joined: 24 May 2023 10:37

Re: Zuno 2 - Meter electric scales issue

Post by niom »

@PoltoS,
Willing to help if needed
Post Reply