Standard Firmata - Node-RED

Alright, so I'm stuck on a detail and don't know where to look for solutions.

Details: I'm using Node-RED on a Raspberry pi to communicate with an Arduino Uno that has the Standard Firmata sketch on it - all it working fine.

However here is my problem, and I'm not sure where to go next:

I want to read sensor data that is connected to the Arduino. Namely a ACS758 current sensor or any Hall effect current sensor, I'll need to connect two of them.

So, I can access the analog pins on the Arduino just fine. But, I need something that will translate the data and I'm not sure how to do that. normally, I would just upload a sensor library onto the the arduino and access it with some kind of code. But, I cant really do that now.

I know this isn't specifically a Arduino question, it's more of a node-RED question... but I thought that maybe there could be some kind of modification to the Firmata code that could be done to communicate that data as well. Unfortunately, I'm kinda new to arduino, so that's why i came here for help.

But, I need something that will translate the data a

Translate it how?

Well, my thinking is that node-RED can't convert or read the raw signal on the analog pin that the current sensor would connect to, right? I mean I can't just make a node that displays the data on that particular pin- the data would be too volatile and would need to be smoothed. So, somehow I have to embed a sketch (like this one: https://github.com/openenergymonitor/EmonLib/blob/master/examples/current_only/current_only.ino) into the firmat sketch, right? Or am I way off on that???? Or should I try to compile some kind of johnny five function in node -RED that can read the data.

Or am I going about this all wrong? Would I need to have a separate arduino for each sensor, have those arduinos "smooth" the data then output an anolog single to one of the input pins of the arduino running the firmata sketch?

Sorry, I'm definitely a noob...

You can send the result of your Arduino A/D conversion to the pi by using shiftOut() function in your Arduino code. This will put the bits one by one on an arduino pin that can be read by the pi. Not familiar with the Rpi or node red so you will have to figure out that end of things.

I mean I can't just make a node that displays the data on that particular pin- the data would be too volatile and would need to be smoothed.

Again, I'll ask why? You've lobotomized the Arduino by installing the Standard Firmata sketch. That means that the application that is talking to the Arduino needs to do ALL of the thinking.

If you don't want that application to do any thinking, you're screwed.

What sampling rate do you need? are you measuring AC or DC? if DC, how quick it changes?

DC, it wont change very often. It's for a tiny house so changes with occur over minutes.

So, I guess im trying to figure out if the firmata code can be modified to translate the data itself before exporting the data. I do not believe a rpi or node-RED will be able to perform those functions becouse of how volatile the initial data will be.

You can read analog input with Firmata. There is some setting for the sampling time. I guess it returns average.