I have a ADS1115 hooked up - the node (blue dot) reads the correct voltage, 3.297v...but the debug outputs a 13 digit number - which I appear unable to alter by any mathematical or script means - Am I being stupid and missing something obvious?? I'm pushing this payload into a signalK-send-pathvalue node (all of which works OK). Any help would be greatly appreciated.
What node are you using to read the information? Full name please I.e. node-red-contribute-?/?/?
This is the one!
can you show us this (screenshot)
What have you tried and more importantly, what are you trying to achieve?
I have attached SS of problem..
I'm attempting to insert battery voltage data onto a signalk server aboard
that long number is the timestamp you inject.
If you click the number in the debug you will see they are actual date-time values.
Change your debug to show complete message.
then screenshot the output (expand all properties)
Making a bit more sense now..thanks. I need the the voltage to be the payload for signalK (requiring a topic & payload).
use a change node to move the desired value from its current place to msg.payload.
There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.
Quick version - use the copy path button that appears when you hover over the item you want in the debug output & use a
CHANGE node to copy it to msg.payload.
Many thanks for your time & patience tonight...I will study the docs more closely and hopefully get my head around this. Age is catching up with me!
If you are struggling to get a feel for node-red, I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.
It’s catching up on all of us (how could I have 7 grandkids???)
Had a good day on this...loads of reading (brain overheated a bit)..but thanks to your knowledgeable guidance now understand the principles a lot more...and managed to get the thing functioning!...
Made a lot of progress, but alas have another not-understanding, would appreciate some guidance:
Node Red gauge is oscillating between FSD & near 0 (ADS1115). Is there a way to avoid/dampen this?
How about a switch node to check the value and only pass something above a certain number?
But the real question should be why are you getting the 0? I would create a test flow that was just working with the node reading the ADS1115 and displaying the value. Then look at the interval you are getting the readings.
- What is the device sending the readings?
- Is the device the sending the data going into a sleep mode and not waiting long enough before sending a reading?
The node is of a ADS1115....the instruction of which indicate the inject in connected 'in series' ....maybe causing a read delay.
Let me backup.
- is the ADS1115 attached directly to the raspberry pie?
- how many samples per second have you set
- how often is the flow being triggered.
Look in chip ads1115 manual:
Single-ended signal measurements, where VAINN = 0 V and VAINP = 0 V to +FS, only use
the positive code range from 0000h to 7FFFh. However, because of device offset, the
ADS111x can still output negative codes in case VAINP is close to 0 V.
Be sure to tag the nodes author with a
if you looking for a help
for me it would be
I've pushed a update that formats the msg payload to a more user friendly object. I think it will break quite a few users filters for sorting out the voltage.
On Single-ended mode set value to 0 if value< 0.
Solved....Many thanks all for valuable advice.
Rookie error (Copy & Pasting nodes)...has 2 signalk-send-pathvalue nodes wired to the the same topic, one from a MCP3008 the other from the ADS1115 i.e. both on the same gauge via the signalk server,