Can't we create a custom node with more than one inputs



I tried to create a custom node with 2 inputs. Following is the part of my HTML file where I have given 2 inputs to this node.

<script type="text/javascript">
    category: 'myCategory',
    color: '#a6bbcf',
    defaults: {
    abc: {value:""},
    bcd: {value:""},  
    xyz: {value:""},
    pqr: {value:""}
    icon: "file.png",
    label: function() {

The installed node on Node-Red shows me zero inputs in this case. If I give change it to inputs:1, the installed node shows that input in the UI. What is the reason for this behavior? Is there any problem in my code?

Thank you



Short answer - no.
We don’t support multiple inputs, so the valid values are 0 or 1 only.



Maybe I'm missing something, or abusing node-red, but I use multiple inputs quite often in function nodes. Sure there is only a single wiring endpoint, but I can feed in as many inputs as I need and sort them out to take action based on message topic or message payload values. Combined with context set and get it works wonders for what I'm doing with node-red. The future persistent across restarts storage being talked about would add another level of versatility.

It seems natural to me to do the logic in a function node or in another task (like Python) with node-red doing the "plumbing" for the data flow and MQTT to tie the different processes together.



Correct. That is the model we support. You can wire many sources to the one input and use some property (like topic for example) to distinguish between incoming messages.