2018-11-07, 03:31 PM
Hello all, long overwhelming message coming up.. Hopefully Node-Red is my way out
(If you feel like TL-DR, the important questions are in bold)
So in the past few weeks, I have read so many websites about concepts, communication protocols, documentation and I still don't understand 90% of what people are talking about on this forum, or what OP does "exactly".. I don't get it, I'm a software engineer and I feel stupid haha! Everybody seems to understand perfectly what spaghetti all these protocols and terms build togheter: MQTT, i2C, NMEA0183, NME2000, 1W, SPI, Signal K, Serial, GPIO, kplex. They all seem interconnected but I fail to see the big picture, where all the data passes by, even with the documentation workflow image, plus many of the pages about the things I don't understand like MQTT and SPI are empty in both old and new docs.
So anyways, I managed to make our analog oil pressure sensors work with an Arduino Uno board I had lying around and send it over I2C to OpenPlotter, until I realized that you can only add sensors that were pre-configured in OpenPlotter, not custom sensors. So I cloned the OP repo and searched in the code where that list was to configure my own I2C sensor in the files (add_i2c.py, openplotter.py, the .pypilot/RTIMULib files) until I realized that thers's no way the devs wanted it to be that complicated.
Then I read this thread about someone trying to send data via I2C from Arduino Uno to RPi with the same problem as mine:
http://forum.openmarine.net/showthread.p...hlight=i2c
And most people seem to say that Node-Red is the solution (I avoided it until now since I thought it was a programming language for kids like scracth hahaha). Is there a way however to send the I2C data to Node-Red somehow? If I can get the oil pressure on a dashboard there, AND other I2C (like the BMP180) sensors to all display there without having to use the Signal K instruments panel, it would be awesome! If there's an obvious solution to only use Node-red for everything, please point me in the right direction and I'll do my homework and read the docs, as long as I stop going in circles!
I've seen amazing Code-Red dashboard in the forums like these:
http://forum.openmarine.net/showthread.php?tid=1087
And this one (Unfortunately using MQTT that I don't undersand):
http://www.ybw.com/forums/showthread.php...d-node-red
and now I really want to use it, I got some great tutorial videos and links so I'll go read this tomorrow.
In the meantime, can someone also answer these questions please:
-Is it possible to send I2C data to Node-Red? I liked i2C because I can just connect the Arduino Uno to SCL and SDA, without needing a level shifter or resistance + no need for a USB hub (as I can't get one now far from a decent town). Not sure if I'm supposed to use something like this:
https://github.com/SignalK/node-red-embedded
-Am I supposed to send the i2C sensor data over NMEA using the generator somehow? It seems like it's only pre-generated sentences with specific sensors, nothing custom.
-Can OpenCPN display other data than NMEA? For example i2C, Serial or GPIO sensors, I guess by using plugins like "Dashboard"?
Thanks for reading all this and enduring my confusing post XD I feel like I can't see the easy way out in front of me, just like this picture XD
(If you feel like TL-DR, the important questions are in bold)
So in the past few weeks, I have read so many websites about concepts, communication protocols, documentation and I still don't understand 90% of what people are talking about on this forum, or what OP does "exactly".. I don't get it, I'm a software engineer and I feel stupid haha! Everybody seems to understand perfectly what spaghetti all these protocols and terms build togheter: MQTT, i2C, NMEA0183, NME2000, 1W, SPI, Signal K, Serial, GPIO, kplex. They all seem interconnected but I fail to see the big picture, where all the data passes by, even with the documentation workflow image, plus many of the pages about the things I don't understand like MQTT and SPI are empty in both old and new docs.
So anyways, I managed to make our analog oil pressure sensors work with an Arduino Uno board I had lying around and send it over I2C to OpenPlotter, until I realized that you can only add sensors that were pre-configured in OpenPlotter, not custom sensors. So I cloned the OP repo and searched in the code where that list was to configure my own I2C sensor in the files (add_i2c.py, openplotter.py, the .pypilot/RTIMULib files) until I realized that thers's no way the devs wanted it to be that complicated.
Then I read this thread about someone trying to send data via I2C from Arduino Uno to RPi with the same problem as mine:
http://forum.openmarine.net/showthread.p...hlight=i2c
And most people seem to say that Node-Red is the solution (I avoided it until now since I thought it was a programming language for kids like scracth hahaha). Is there a way however to send the I2C data to Node-Red somehow? If I can get the oil pressure on a dashboard there, AND other I2C (like the BMP180) sensors to all display there without having to use the Signal K instruments panel, it would be awesome! If there's an obvious solution to only use Node-red for everything, please point me in the right direction and I'll do my homework and read the docs, as long as I stop going in circles!
I've seen amazing Code-Red dashboard in the forums like these:
http://forum.openmarine.net/showthread.php?tid=1087
And this one (Unfortunately using MQTT that I don't undersand):
http://www.ybw.com/forums/showthread.php...d-node-red
and now I really want to use it, I got some great tutorial videos and links so I'll go read this tomorrow.
In the meantime, can someone also answer these questions please:
-Is it possible to send I2C data to Node-Red? I liked i2C because I can just connect the Arduino Uno to SCL and SDA, without needing a level shifter or resistance + no need for a USB hub (as I can't get one now far from a decent town). Not sure if I'm supposed to use something like this:
https://github.com/SignalK/node-red-embedded
-Am I supposed to send the i2C sensor data over NMEA using the generator somehow? It seems like it's only pre-generated sentences with specific sensors, nothing custom.
-Can OpenCPN display other data than NMEA? For example i2C, Serial or GPIO sensors, I guess by using plugins like "Dashboard"?
Thanks for reading all this and enduring my confusing post XD I feel like I can't see the easy way out in front of me, just like this picture XD