Ok the way you have your flow laid out, every message will be going to all four of the 'Valve' function nodes. So if data is for valve 6 + 7, it will also go to 'Valve 1 + 3' and if it doesn't contain msg.Valve30pen, you will get the error.
I'm surprised you haven hit more with all the function nodes.
What does the data look like coning out of the link node? You might be able to add a switch
node to direct each msg to the right function
node.
p.s. when posting flows/code on a message, in order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```
)
```
code goes here
```
You can edit and correct your post by clicking the pencil icon.
See this post for more details - How to share code or flow json
So use back-tics. You used the single quote mark but I corrected it in your post.