CANbus payload filtering

Hi, how can I filter CANbus messages based on message ID and byte im interested in to be displayed (1 of 8). thats what I'm getting as sample message. it has its ID and 8 bytes of data.

If you want to make sense of the buffer returned, you might want to try buffer-parser node.

I'm interested in buffer element but from one canid only one of many canID's received

Is all the data in one message or are you getting multiple messages and need to select first the message and then the property from the message?
If multiple messages then you can use a Switch node to select just the one you want by testing the identifying data in the message.

If you view the 8th video in the "node-red essentials" playlist, at about the 1:10 mark, you will see where Nick hovers over the debug message and copies the path to an item.

that is essentially what you need to do to get the path to the value you are interested in.

Once you have that, paste it into a switch node & use the == and compare it to the value of interest.

Then ONLY messages matching that will pass through.

If you are unsure what any of that means, then I recommend you watch the full playlist - they are really short & very informative / full of tips to help you grasp node-red really quickly.

1 Like

I'm getting multiple messages all with diff canid's and I'm interested in just one canID messages then one or few bytes fom this canid message buffer so I need to filter on canid level first then select data to be monitored from buffer

I believe that @Steve-Mcl's post should help you with that.

Thats what both @colin and I said do.

Thanks both @Steve-Mcl and @Colin, below works for me, good starting point. Hope to get some usefull data from my EV car.

I don't know exactly what you have put in the switch nodes, but usually you can use one switch with multiple outputs rather than a bank of nodes.

@Colin yeah noticed that you can add conditions, I'll try with it but as starting point it works for me so happy with that.