From 2286a21bac721328947f52750ae3a1c1d141b49c Mon Sep 17 00:00:00 2001 From: Watteco <87481956+Watteco@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:12:11 +0200 Subject: [PATCH] Update ino-sensor.js (#827) modify the decoding of multibinaryinput Co-authored-by: Jaime Trinidad <81958808+Jaime-Trinidad@users.noreply.github.com> --- vendor/nke-watteco/ino-sensor.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vendor/nke-watteco/ino-sensor.js b/vendor/nke-watteco/ino-sensor.js index bd7fc71f0d..a2b0d9838b 100644 --- a/vendor/nke-watteco/ino-sensor.js +++ b/vendor/nke-watteco/ino-sensor.js @@ -863,7 +863,16 @@ function Decoder(bytes, port) { // multibinary input present value if ( (clusterdID === 0x8005 ) & (attributID === 0x0000)) { - tab.push({label:stdData = "State"+(decoded.zclheader.endpoint+1), value:stdData = (((bytes[index+1]&0x01) === 0x01)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State1", value:stdData = (((bytes[index+1]&0x01) === 0x01)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State2", value:stdData = (((bytes[index+1]&0x02) === 0x02)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State3", value:stdData = (((bytes[index+1]&0x04) === 0x04)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State4", value:stdData = (((bytes[index+1]&0x08) === 0x08)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State5", value:stdData = (((bytes[index+1]&0x10) === 0x10)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State6", value:stdData = (((bytes[index+1]&0x20) === 0x20)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State7", value:stdData = (((bytes[index+1]&0x40) === 0x40)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State8", value:stdData = (((bytes[index+1]&0x80) === 0x80)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State9", value:stdData = (((bytes[index]&0x01) === 0x01)?1:0), date:stdData = lDate}); + tab.push({label:stdData = "State10", value:stdData = (((bytes[index]&0x02) === 0x02)?1:0), date:stdData = lDate}); } //binary input counter