node-red-contrib-ui-led icon indicating copy to clipboard operation
node-red-contrib-ui-led copied to clipboard

ui-led is grey with msg.responseBuffer or msg.input

Open Daini opened this issue 4 years ago • 4 comments
trafficstars

Describe the bug

Dear maintainer, message objects of node-red-contrib-modbus v5.14.0 can contain attributes like msg.responseBuffer and msg.input besides the msg.payload. I have to delete this attributes with a change node first, before ui-led accepts a color change. The issue is described and discussed in https://discourse.nodered.org/t/ui-leds-grey-after-update/45634

Expected behavior Other properties than msg.payload shoudn't affect ui-led.

Versions

  • node-red-contrib-ui-led: v0.4.9
  • node-red: v1.3.4
  • node-red-dashboard: 2.29.0

Platform

  • OS: Raspberry Pi OS Buster
  • Browser: firefox 78.10.0esr (64-bit), chromium 90.0.4430.93

Daini avatar May 15 '21 08:05 Daini

Hey @Daini ! Thank you for the bug report! Catching up on the thread I want to clarify, what type is the payload coming into LED as? Is it an array? When I sit down I can double check but I'm quite sure at the moment LED does not manually accept array values and it definitely doesn't by default (by default it looks for true or false)

yoiang avatar May 15 '21 15:05 yoiang

Hi @yoiang

this is a troublesome object:

{"topic":"polling","payload":false,"responseBuffer":{"data":[true,false,true,false,false,false,false,false],"buffer":[5]},"input":{"topic":"polling","from":"","payload":{"unitid":"","fc":2,"address":"0","quantity":"1","messageId":"609e8ff3e92e3c5ab46f7952"},"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1},"sendingNodeId":"2ce4e912.835a5e","_msgid":"59261441.27dddc"}

This is a manual inject that works: {"_msgid":"403eb9eb.161f58","payload":false,"topic":"polling"}

Daini avatar May 16 '21 08:05 Daini

Let me take some time to reproduce this, LED only looks at the payload field and it looks perfectly ok so I understand your confusion!

yoiang avatar May 16 '21 14:05 yoiang

Came here with the same issue, coming from the same node (node-red-contrib-modbus)

nated0g avatar Jul 22 '21 07:07 nated0g