Z-Uno Sensor Binary and Fibaro HC2 not working properly

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
vlad27
Posts: 2
Joined: 04 Oct 2019 11:37

Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by vlad27 »

Hello. I want to make a 2 channel motion sensor by Z-Uno, but when I added Z-Uno to my controller I saw only 1 device, if I add directive “ZUNO_DISABLE(NO_MULTIBINARY_SWITCH0);” I saw 3 devices, but working only 1. Code generated by your online creator, with my serial “debugging”. In serial console I saw, how triggered one and second sensor, but on controller saw only one. I also tried to change parameter 12 to 1, but nothing happened.

Z-Uno bootloader version: 2.1.5
Security: none
Frequency: EU
Device included: yes
Device included securely by controller: no
Controller: Fibaro HC2 fw 4.560

Code:

Code: Select all

byte pin5SensorBinaryState;
byte pin6SensorBinaryState;

ZUNO_DISABLE(NO_MULTIBINARY_SWITCH0);

ZUNO_SETUP_CHANNELS(
  ZUNO_SENSOR_BINARY(ZUNO_SENSOR_BINARY_TYPE_GENERAL_PURPOSE, pin5SensorBinaryGetter),
  ZUNO_SENSOR_BINARY(ZUNO_SENSOR_BINARY_TYPE_GENERAL_PURPOSE, pin6SensorBinaryGetter)
);

void setup() {
  pinMode(5, INPUT);
  pin5SensorBinaryState = !digitalRead(5);

  pinMode(6, INPUT);
  pin6SensorBinaryState = !digitalRead(6);

  Serial.begin(9600);
}

void loop() {
  byte _pin5SensorBinaryState = digitalRead(5);
  if (pin5SensorBinaryState != _pin5SensorBinaryState) {
    pin5SensorBinaryState = _pin5SensorBinaryState;
    Serial.println("Input 1 triggered");
    zunoSendReport(1);
  }

  byte _pin6SensorBinaryState = digitalRead(6);
  if (pin6SensorBinaryState != _pin6SensorBinaryState) {
    pin6SensorBinaryState = _pin6SensorBinaryState;
    Serial.println("Input 2 triggered");
    zunoSendReport(2);
  }

  delay(20);
}

byte pin5SensorBinaryGetter() {
  return pin5SensorBinaryState;
}

byte pin6SensorBinaryGetter() {
  return pin6SensorBinaryState;
}

Compiler log:

Code: Select all

----------------------------------------------------------
                     FIRMWARE DATA                        
----------------------------------------------------------
	REVISION:02.15
	Z-WAVE FREQUENCY:EU
	ORIGINAL FW. CRC32: 66 C2 26 CC
	MAXIMUM CODE SIZE: 30 KB
	CURRENT  FW. CRC16: 4C A3
	RADIO CHANNELS: 02
----------------------------------------------------------
                     HARDWARE DATA                        
----------------------------------------------------------
	CALIBRATION
		MAIN:04 TX: 16 12
	DEVICE PUBLIC KEY:
		HEX: 5D EE 1C 38 24 37 EF 02 14 51 6F F7 11 84 1B 4E 42 2A 9B AC E8 93 87 A8 E7 E3 90 9B 1B C4 3E 24
		DEC: 24046-07224-09271-61186-05201-28663-04484-06990-16938-39852-59539-34728-59363-37019-07108-15908
----------------------------------------------------------
                     PRODUCTION DATA                      
----------------------------------------------------------
	YOUR ZUNO S/N: 05 13 06 B9 06 7C 21 08 13
----------------------------------------------------------
	PRODUCTION TIME:
		WEEK:5 YEAR:2019
	WORKSTATION:
		NUMBER:33 SEQUENCE:1660 
	HARDWARE:
		CHIP:1721 REVISION:2067

p0lyg0n1
Posts: 181
Joined: 04 Aug 2016 07:14

Re: Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by p0lyg0n1 »

Hi,
Seems you don't setup a multichannel association on Fibaro. You have to setup association destination to something like 1.x (for ex. 1.1) instead of 1. Check the association map on the controller.
ZUNO_DISABLE(NO_MULTIBINARY_SWITCH0); this disables only 2 switches in the 0 channel not the sensors. You don't need this line in your project.

Best regards,

Alex.

SerjioTT
Posts: 14
Joined: 14 Dec 2019 13:05

Re: Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by SerjioTT »

I also need to use MultiChannel with Zuno on HC2.
Could you please give more details how to setup MultiChannel instead ?
Should I configure it on Zuno side or HC2 side ?
Is it possible to define it in Zuno sketch ?

petergebruers
Posts: 248
Joined: 26 Jul 2015 17:29

Re: Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by petergebruers »

On your HC2 on the advanced page, navigate to the "associaton" button. Click that and you'll get a table view. See the S and M columns? S means single and M multi. Put a checkmark in the M column, it is as simple as that. If your Z-Uno is a sleeping node, wake it up to get the new setting.
If that does not help, exclude (delete) Z-Uno from HC2. Flash your sketch (again). Include (add) Z-Uno again. Set M column to get data from channels...

SerjioTT
Posts: 14
Joined: 14 Dec 2019 13:05

Re: Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by SerjioTT »

Thanks for you reply
I've done like this but no luck...
I noted that in the first including Zuno parent device in HC2 has S and M columns checked in the same time.
I unchecked the S column but only one Zuno sensor binary pin is blinking on HC2.
My sketch has 7 binary sensors.
Association mapping for parent Zuno device like on this screen (the same like for the rest Zuno nodes)
2019-12-23_23-54-55.png
2019-12-23_23-54-55.png (31.55 KiB) Viewed 3861 times

petergebruers
Posts: 248
Joined: 26 Jul 2015 17:29

Re: Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by petergebruers »

I don't have a "Sensor Binary" test sketch, but I do have this "Switch Binary" test sketch, I've extended it to handle 7 switches... Works for me after I remove both checkmarks, save, and then add M checkmark, save. Don't forget to exclude your Z-Uno, then flash sketch and re-include...
MultiChannelTestSwitchBinary.zip
(1.59 KiB) Downloaded 159 times
Edit: to be clear, in association window you'll see under group 1 (on the left) "Current (on device): 1(0)" that "1(0)" part is relevant.

SerjioTT
Posts: 14
Joined: 14 Dec 2019 13:05

Re: Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by SerjioTT »

Hi all,
The config with a number of Switch Binary works as expected.
But with Sensor Binary type I have a problem.
Now I have MultiChannel for all Zuno devices on HC2 and enabled (12=1) param 12 but no luck
Last edited by SerjioTT on 27 Dec 2019 23:23, edited 2 times in total.

petergebruers
Posts: 248
Joined: 26 Jul 2015 17:29

Re: Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by petergebruers »

Thank you for reporting back. If I find the time, I'll test with ZUNO_SENSOR_BINARY_MOTION or something similar

petergebruers
Posts: 248
Joined: 26 Jul 2015 17:29

Re: Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by petergebruers »

No issues with "Sensor Binary"... Works for me after I remove both checkmarks in S and M column, save, and then add M checkmark, save. Don't forget to exclude your Z-Uno, then flash sketch and re-include before trying my sample sketch... All seven (or eight if you count "root" sensor object) devices in my browser toggle every 7.5 seconds as expected.
MultiChannelTestSensorBinary.zip
(1.09 KiB) Downloaded 146 times

SerjioTT
Posts: 14
Joined: 14 Dec 2019 13:05

Re: Z-Uno Sensor Binary and Fibaro HC2 not working properly

Post by SerjioTT »

Thanks for your support!
Sorry I dont understand how do you define pins in the sketch ?
I mean which pin on Zuno will be for which input.
(I'm not so much experienced in Arduino)

Post Reply