In the node fuction I have : "msg.topic="SELECT connected FROM BootNotification WHERE CP_id='CP_1'. To take the string from the database.
In msg.payload I can see the string that I get from database in an array. However, the led doesn´t change the color according the value of the string.
Someone can help me??
ok, according to the config page, the LED node expects msg.payload to be "connected" or "disconnected" BUT as you can see, the debug output of the database is an array with 1 element that is an object with a property of connected that holds the value.
So, use the "copy path" button (appears when you hover over item of interest) to grab the actual path of connected and use a change node to move/copy the value into msg.payload
I.E. database node >> change node >> LED node
change node* Set msg.payload to the value of msg.<copied path>