This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Filters for OpenPlotter Serial APP
#1
Lightbulb 
Hi!

Is there any possibility to include a feature to apply filters to the Serial app?
For example, I have a Chinese battery power manager that outputs the data via RS485 with a specific structure that is unreadable for SinalK, with some lines of code I can convert the information to something readable.

Now I´m doing this kind of thing using external hardware like Arduinos or esp that reads serial data and with some code, I translate it to Openplotter readable information (usually NMEA0183 or SignalK data) 

The idea is to use python files with a specific structure to perform the filter. These filter files are stored in a folder and the Serial App search for these files in that folder.
In data --> Filter --> Out data

This is an example of how I correct a GPS sentences of a Cobra Marine MRF77B Radio. The radio outputs the GPS data via NMEA0183 but there are mistakes in the sentences (yes, a commercial radio with bugs....) 

I use a Wemos D1 with micropython to do the filter. I'll not need extra hardware if the serial app can do this.


Attached Files Image(s)
       
Reply
#2
You could try node -red , don't connect the serial to signalk but straight into node red, a little javascript to fix the data then send to a signalk node .
Reply
#3
I like the idea of a place where small and specific pieces of code can be added but I am afraid openplotter-serial is not that place. This serial app is in charge of making stable the system assignment of serial interfaces (udev rules) and making easier some connections between applications and serial sources. There are not any script running in the background connecting to sources and parsing data from them, actually if we do that, some connections will be busy and signal k and other apps will not be able to connect to them.

Being said this, I see a new app here. A place where you can easily add small pieces of code (snippets) that you can choose to run at startup or run at some point using the actions of the openplotter-notifications app. For example in your case you just have to set the serial devices in openplotter-serial, add these serial devices to your script, your script to an specific folder and choose to run them at startup in this new app.

Of course node-red is always a good option for snippets.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)