[Uibuilder] Send data the msg.payload

Hey everyone i want to send data(counterBtn) to msg.payload

this.counterBtn = this.counterBtn + 1

        uibuilder.onChange( {

            'payload': {

                'type': 'counterBtn',

                'btnCount': this.counterBtn,

                'message': this.inputText,

                'inputChkBox': this.inputChkBox

            }

        } )

uibuilder.onChange() is for receipt of data from Node-RED to the browser. Further, that function has 2 parameters, the first being the event name, the event msg is triggered when a new standard msg is received from node-RED, the 2nd parameter is a function that is called when a msg event is triggered.

As per the documentation, the function you want is uibuilder.send(msgtosend).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.