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
Anyone datalogging?
#11
(2017-11-15, 04:49 PM)shark24 Wrote: @paddy
Lucky you with your boat still in the water. My little lady is already out of her element. In Germany we call it "high and dry" Big Grin
I've tried highcharts before and it didn't let me down but I've only used it for small projects with very simple graphs. Keep on playing and let the ideas come to you Smile

@tocan
Dear tocan it's so hard to get the meaning of some of your statements because you are jumping from subject to subject. Even when I try to translate it back to German - I really can't wrap my head around your thoughts. My English isn't great either but I'm trying to stick to the topic and write my thoughts down one by one.

Ich versuche es jetzt mal auf Deutsch zu beschreiben. Du kannst es dann übersetzen.
Es ist klar, daß der Raspberry begrenzte Resourcen besitzt. Also gehe ich den Weg die resourcenhungrigen Dinge auszulagern. Datenbank auf nen Webserver hilft mir wenig wenn ich kein Internet habe. Die Influx und Grafana frist nicht so viel wenn keine Zugriffe darauf sind. Der Weg für mich im Moment ist solche Dinge wenn ich auf dem Boot auf Fahrt bin Datenbank speichern von Bildern also alles mit Hilfe des Android Smartphones zu bewerkstelligen. Also alles was Resourcen frißt aufs Smartphone Kartenmaterial etc. Durch den Signal K Server und Canboat den Server für das Boot bereitzustellen. Das gelingt mir wenn ich genügend Batterie auf dem Smartphone habe, die eben In dem Phone das ich da für meinen Bedarf geholt habe drinn ist. Bei meiner Tour letztes Jahr und kleiner Powerbank hat das gerade mal für 3 - 4 Stunden gereicht. Wenn Du im Hafen bist gleichst du halt gerade mal schnell die Daten ab, da Du ja nicht rund um die Uhr auswertest. So etwas geht mit Cronjob am einfachsten. Ich hole also keine Bilder aus dem Internet etc. Ich habe alles auf dem Smartphone. Um das umzusetzen also Daten etc von einem auf dem Smartphone installierten Server bekomme ich das Ganze auch entsprechend flüssig hin. Und jetzt geht es nur noch um die Usability. Wann hast Du Openplotter das letzte mal bei schwere See bedient? Die triffst mit der Maus oder per Touchscreen einfach nicht das was Du schnell benötigst  Hier see ich so etwas wie ein Steuerungsball System wo ich nur einmal klicken muss und selbst mit meinen Glupschfingern das entsprechende treffe. Du berührst den Bildschirm und schon popt ein Menü großflächig ins Bild das nach Auswahl auch wieder verschwindet. Robust und Absturzsicher. Ja klar Geht dem Raspbery die Puste aus, aus welchem Grund auch immer habe ich bei schwerer See bestimmt nicht die Muse das zu fixen. Und da hast Du eben sofort das Smartphone. Also mein Konzept ist eben Datenloggen auf dem Raspberry Pi und den Rest eben auf dezentrale Server wie eben den HPX oder ähniches und ein entsprechendes Protokoll nutzen. Die medizinischen Datenmengen mit denen wir das damals gemacht haben sind um einiges riesiger. Gerade wenn es um MRT geht. Da fallen mal schnell einige Terrabyte an.

Was ich so mal grob als Ziel ins Auge gefaßt habe. Alle paar Meter mit der Panorama Kamera automatisiert ein Bild knipsen. Um zumindest das Datenmaterial/Bildmaterial zu haben um es für Openseamap zur Verfügung zu stellen. Was ich gut fand, daß ich das in die Diskussion geworfen habe für die Cam und 7 Tage später gab es eine neue Firmware, die die Geodaten mit Zeitstempel in die Bildrohdaten einbindet. Google hat bei Openstreetview Den Wasserstraßenverkehr Quasi außer acht gelassen. Die Donau runter gibt es jede Menge an Stellen an denen die angeblichen Bojen nicht an der Stelle liegen an der sie liegen sollten und Nummer 1 ist immer noch das Auge und das Fernglas. Mit den Tiles kann ich außerdem auch Layer drüber lagern. 

Zusammenfassend: Der Raspi mit Openplotter reicht mir nicht für Binnen und dafür ist er nicht gemacht. Die Usability bei Openplotter sollte eventuell Schwerpunkt sein. Optisch wie auch in der Workflow Beschreibung. Ob ich den Raspi mit Sensoren ergänze oder Die massenhaft vorhandenen Sensoren aus dem Smartphone nutze ist mir persönlich egal. Auch die Datenbank. Daß ich bei der Übersetzung mit Daniela hier wenig gemacht habe insbesondere den rumänischen Part liegt daran daß wir eben im Moment für das Chinesen Smartphone deren Android/Miui 9 Interface mit übersetzt haben. Das Phone sollte morgen hier ankommen. Und dann geht es weg von der Theorie. Ansonsten benutze ich bislang als modernstes Gerät das Galaxy S5 und im täglichen Gebrauch immer noch das Iphone 3 GS. Ja lacht nur. Dass ich mir ein Phone neu gekauft habe zum ersten mal in meinem Leben sagt schon einiges aus.

http://wiki.openstreetmap.org/wiki/Android

Volle Auswahl. Die Panorama Cam hat erst mal eine 128 GB SD bekommen und würde für 14 Stunden Video reichen. Im Moment läüft mein Webserver für die Tocan Seite weiter mit nur 1 GB RAM und 40 GB Platte. Aber für meine Datensammelei wird zumindest zum Upload ein KimSufi Server mit 16 GB Ram und 2 TB Platte gebucht. 

Datenlogger mit Timebased Datenbank absolut sinnvoll. Und hier eben keine kleine MYSQL. Wenn OpenPlotter und der Raspberry Dinge von der Leistung nicht hergeben dann sollte man halt über ein ADD ON System nachdenken mit Apibeschreibung. Ich finde der Nutzen der durch jeden einzelnen Bootsbesitzer entstehen könnte durch Erfassen und Verteilen von gewonnen Daten könnte immens sein. Es dürfte relativ einfach sein solche Dinge umzusetzen. Und man kann so etwas automatisieren. Wenn ich aber lieber nur meins ist meins und bleibt auch da denke, dann kaufe ich mir lieber einen fertigen Plotter und gebe 500-1000 Euro aus und hole mir alle 4 Jahre nen neuen Plotter. Die reine Datenmenge ist lächerlich von der Größe. Das ist was für den Raspberry. Die optische Aufbereitung der Daten und das zusammensetzen kann aber muß man nicht den Raspberry machen lassen. Ein leistungsfähiges Android mit Snapdragon 625 kann so etwas viel besser und ist auch möglich wenn in Openplotter die Schnittstellen geschaffen werden nach außen. Wer das Video nur 2 Minuten ansieht dem wird es nicht klar was ich meine. Der China Launcher zum Androit ist jedenfalls nicht ohne. Das Androit läßt sich in 2 komplett getrennte Mobiles in einem einzigen Gerät Splitten. Auch alle Applikationen. Ich kann also den VNC-Viewer 2 mal starten. Zum Beispiel rechts die Navigation und links zum Beispiel der Größe angepasst die Daten von Motor und Batterie.

Nach einer eventuellen Übersetzung versteht man es vielleicht etwas besser. Der einzige Nachteil den ich jetzt sehe bei meiner Lösung ist dass das Phone nicht wasserdicht ist aber besser geschützt als das original Display des Raspberry pi auf jeden Fall. Fällt dieser aus habe ich auf jeden Fall genügend sofort zur Verfügung stehende Alternativen. Die Antworten kamen so schnell, dass ich mich frage warum ich das Video verlinkt habe. Zum groben Verständnis wäre das erforderlich.

Hintergrund Xiaomi ist die einzige Firma die offiziell den eigenen Source freigegeben hat sowohl für Android wie auch für Das OS. Beides ist ja seit Android 7.x getrennt. Es gibt auch tools zum Rooten und entsprechene Beschreibungen. Der Hintergrund ist folgender. Deren eigenes OS greift tief in das System ein und sie unterstützen das Bauen von eigenen ROMs, da die Anpassungen auf die verschiedenen alle halbe Jahr auf den Markt geworfenen Smartphones entsprechend nicht zeitnah umgesetzt werden könnten. Und was ist beim End of Live des Supports? Es gibt jetzt schon einige Alternativ Roms. Da die Treiberanpassung beim kochen eines eigenen Roms wegfällt sehe ich hier eine Zukunft.

Es bleibt Dir also frei auf dem Android einen LAMP Server zu installieren, den Du i ein Chroot neben deinem Stock Android laufen läßt. Genauso wie influx oder Grafana. Wie sowas gemacht wird? http://danielpetty.com/android-lamp-linux/

Worauf ich hinaus will ist langfristig in Openplotter eine Art Addon system zu schaffen um den Raspberry pi das machen zu lassen was er kann und auch besser kann als alles andere. PS. den Lamp gibt es auch für iOS

Jetzt mal fröhliches überfliegen der Infos und wie bringst du es in Englisch den anderen bei. Soweit ich weiß habe ich hier noch nie in Deutsch gepostet. Aber dieser Teil ist mir wichtig und ich denke es hat auch Substanz.
Reply
#12
(2017-11-15, 04:49 PM)shark24 Wrote: @paddy
Lucky you with your boat still in the water. My little lady is already out of her element. In Germany we call it "high and dry" Big Grin
I've tried highcharts before and it didn't let me down but I've only used it for small projects with very simple graphs. Keep on playing and let the ideas come to you Smile

........
I need OpenPlotter as an bulletproof system that helps me to sail safe. I need it for navigation, collecting all necessary data for it and giving me a pool of information which I can view via a monitor or smartphone/tablet. I want a software that helps me to deal with my N2k network and doesn't cost a fortune. I want opensource, low cost, low power, DIY possibilities and again most important a stable system because I wont use any plotter next to OpenPlotter.

Graphs and all the other shiny stuff are a great gimmick but when they interfere with the main functions of OpenPlotter it's very bad.
Grafana and InfluxDB aren't made for the Pi and they slow down the system heavily.
OpenPlotter isn't FHEM. It's not for home automation, it's for the sea.

Thanks, I'm actually just starting a major refit down in Portugal so living up a ladder for a while yet....but still on the boat so can play with electronics/software in the evenings.  
I think Sailoog has such a good vision of openplotter, it is in very safe hands guiding it into the future as a solid reliable ailing platform Cool 

Making a start on some kind of plotting now - little baby steps Smile https://www.w3schools.com/js/default.asp

If anything useful comes about I'll put it up on github then people who actually can program can help.

Thanks
Reply
#13
I'm still answering in English because to me opensource means a communication that is free for everyone as well.

No I'm not translating your post. I have neither the time nor the will to do this.

You are basically saying: "My Pi can't handle all the task so I'm getting a smartphone to run my servers." Your best argument is: "It's the first smartphone I've ever bought! My everyday Phone is still an Iphone 3GS, this must mean something - right?"  No, it doesn't mean anything. If I want to run a server I wont run it on a cellphone. If my computer can't handle its tasks, then I'll get a faster computer. In another paragraph you write you want the pi for the data collection and your smartphone for the analysis. You are right this is a good way to go. Great news: openplotter is working like that already. Connect your smartphone to the access point, open up node-red in your phone's browser and let the javascript engine do the job. Do you need to invest time in good node-red flows for that? Absolutely!

Then there is this stuff about controlling openplotter at rough sea. Openplotter is not depending on a touchscreen or mouse like you connote. "Your" idea the track ball has been around for the last 30 years. If you want to use it with openplotter - buy one and hook it up to your pi. Besides that no one is touching the openplotter application in rough sea because its just for setting up stuff. If you want big buttons to handle openplotter functions create em in the dashboard of your choice e.g. node-red-dashboard and click em with your trackball or on your smartphone or where ever you like.

I'm familiar with fMRT data analysis and I know the data Volume, still I don't see the link to raspberry pi and the openplotter project.

Saving pictures in databases is from my point of view in most cases, bad practice.

Further more you write about rivers, river charts and the use of the raspberry pi inland.
I happened to sail more than 1500km in the last seven years on rivers. You are upset that some buoys on the Donau were missing although they were shown in charts? Buoys in river charts are completely useless unless they mark a constant hazard like a rock. Rivers change daily and buoys are moved on a regular basis. The only good reasons you need river charts are for infrastructure at the riversides and for keeping track of your route. On most of the big rivers, that are used by industrial vessels, you can't just take a break in the middle of nowhere, you need a harbor. To my knowledge there are no charts available (for Rhine or Donau) holding this information but there are great books.
You said the pi is useless inland? Well i used it for keeping track of my journey but besides that I've used my eyes for navigation, books for guidance and my smartphone to find the good places to eat. I din't use openplotter back then but it could have helped to monitor my engine, etc. you know the stuff it is supposed to do. So I don't see why a pi is useless inland just because the river charts are bad.

So in the end there are a lot of "no"s:

No I don't think InfluxDB and Grafana should come with openplotter. If you want them install em by yourself
No I don't want to run LAMP on my smartphone. A cellphone isn't the best server from my perspective.
No I don't think rpi/openplotter is useless inland.
No I'm not watching your 45 min marketing video. Nevertheless I think I can decide whether I want to run a server on a phone or not. By the way - are you getting paid for the translation job of the phone company?
Reply
#14
Bye the way not paid for shure. And install a server on a smartphone is one way. For me with the data I use now influx works. The only thing I do not know how to solve is the connection to signal k.

I do not say pi is useless but the plotter part with opencpn. For charts I use mainly verbergen paper charts. And OSM. Behind Budapest there are not enough water petrol stations. Also the Marina situation is more difficult. And this means you need to walk with 2 20l (Kanister) to take Diesel. And this is the key point to find the most close stations to the river. And in such areas Internet is also not obligate. It's a main part of around 500 km.

Gesendet von meinem SM-G900F mit Tapatalk

The trackball I mean no hardware. I mean you touch screen somewhere on display and get a menu with big areas to touch and that you can free define in front.

Gesendet von meinem SM-G900F mit Tapatalk
Reply
#15
Question is data logging and this not for a little time. and if he does go for sensors not just for a week or so on his testing and developement database special the logging of IOT data like sensors for a later review and sort things out he should compare in general why and what he is doing in comparison influxdb and mysql.

I hope this article helps to understand:

https://db-engines.com/de/blog_post/71

i think for the moment i leave a bit the sql sector shark did told his needs are mainly to have at a time a special information and time periods are not interesting for him. I am with data logging more interest in time periods to analyse. I think if you log a long time and keep the actual data in a array and look than in reviews for a time period say one or 2 years you will see how is the performance. For checking and lookig for servers i long time use nagios. I see in influx and grafana for our needs more advantages. If he will use Telegraph as collector on a third pc than he will see that mysql or the light version needs much more resources over the time.
Reply
#16
(2017-11-16, 09:01 PM)tocan Wrote: I do not say pi is useless but the plotter part with opencpn. For charts I use mainly verbergen paper charts. And OSM. Behind Budapest there are not enough water petrol stations. Also the Marina situation is more difficult. And this means you need to walk with 2 20l (Kanister) to take Diesel. And this is the key point to find the most close stations to the river. And in such areas Internet is also not obligate. It's a main part of around 500 km.
Yes I am aware of the problem with the gas station. That's why I've already recommended you in another thread to get the free osm maps on your phone. I guess its easier to carry your phone with you than your pi when you need to find the way. I always took a portable dolly with me so I wouldn't have to carry the fuel. Thanks to the navigator app I always found the way to the gas station and back to my boat even without internet.

(2017-11-16, 09:01 PM)tocan Wrote: The trackball I mean no hardware.  I mean you touch screen somewhere  on display and get a menu with big areas to touch and that you can free define in front.
Ok I've misunderstood you there. For node red dashboard you can create such a menu with the template node.

tocan Wrote:Question is data logging and this not for a little time. and if he does go for sensors not just for a week or so on his testing and developement database special the logging of IOT data like sensors for a later review and sort things out he should compare in general why and what he is doing in comparison influxdb and mysql.

I hope this article helps to understand:

https://db-engines.com/de/blog_post/71

i think for the moment i leave a bit the sql sector shark did told his needs are mainly to have at a time a special information and time periods are not interesting for him. I am with data logging more interest in time periods to analyse. I think if you log a long time and keep the actual data in a array and look than in reviews for a time period say one or 2 years you will see how is the performance. For checking and lookig for servers i long time use nagios. I see in influx and grafana for our needs more advantages. If he will use Telegraph as collector on a third pc than he will see that mysql or the light version needs much more resources over the time.
I'm aware of the concept of time series databases. Our boats aren't exactly like the Queen Mary 2 so we won't produce terabytes of data. From my point of view most of the databases you can run on the pi like mysql, influxdb, etc. are slowing down the system. That's why I prefer rather logging data to a file/sqlite than having a database server in the background bothering my cpu. Certainly the data queries will take longer but my pi isn't kept busy constantly. I don't know why you would need two years of sensor data on your pi and why you need a good performance for the data analysis. And even if you want time series data of a long range for a graph it'll be one slow select query and that's it. The select query takes 80 instead of 10 milliseconds - pardon my French but I don't give a rat's ***. I won't sacrifice over all system performance for two or three slow queries it takes to get the  some data from bigger ranged time series.   
If you want to use openplotter and the pi for real time data analysis of big time series maybe you got the wrong software and hardware.
Reply
#17
(2017-11-17, 01:23 PM)shark24 Wrote: I'm aware of the concept of time series databases. Our boats aren't exactly like the Queen Mary 2 so we won't produce terabytes of data. From my point of view most of the databases you can run on the pi like mysql, influxdb, etc. are slowing down the system. That's why I prefer rather logging data to a file/sqlite than having a database server in the background bothering my cpu. Certainly the data queries will take longer but my pi isn't kept busy constantly. I don't know why you would need two years of sensor data on your pi and why you need a good performance for the data analysis. And even if you want time series data of a long range for a graph it'll be one slow select query and that's it. The select query takes 80 instead of 10 milliseconds - pardon my French but I don't give a rat's ***. I won't sacrifice over all system performance for two or three slow queries it takes to get the  some data from bigger ranged time series.   
If you want to use openplotter and the pi for real time data analysis of big time series maybe you got the wrong software and hardware.
Very much agree with all of that. I played around with RRDtools for a while, which worked OK but was a bit clunky to work with. Sqlite does all that is needed taking little CPU time. Handy having it as just one file as well, you can copy across to a faster machine easily to back up or do some more intensive plotting/sql. I've had one running pretty much constantly since about august recording once a minute, file is around 22Meg.
Reply
#18
There are 2 things of use. Openplotter to use when i am on tour. And because the lack of chart information special for petrol stations and other things i for shure have OSM on the smartphone and did put the Video just for to show what i did bought for it. Instead of display. Next step because also here the most requests via PM is that people whish the sensors and the switch in a more easy way. And i did experiment for this reason with Alexa and Sonoff. It works fine with raspberry and is something easy to manage also for beginners but usability is not what i am looking for. I decide nothing to produce for alexa with the pi unless its running. But since 3 months i am aware all runs without any hardware and just with a browser.

So in fact for just a few coins i get switches and also Sensors to use with alexa. I can ask in general is there any water in the bilge and alexa can tell me how much. And than i can start from home to switsch on the bilge pump 3000 km away. Its just an example and relies just to yours phantasies what you like to do with it. But its simple and easy to install for everyone.

For Gyro and other data i plan to use the Openseamap Logger what cost just 30 Euros , is nmea compatible. Here i log data all the year. So i have with time the database i can share. Including the Water depth data all over the year. In fact it means the time openplotter have nearly nothing to do can be used and i do not see any problem to do such. Also Openplotter will not die on tour unless you use datalocking. Also i did look arround in the upcoming skills in Alexa and there are a lot of usefull marine skills available in english but not in german.

https://www.amazon.com/chadioo-Sailing-G...B01JYPXSFU

For the tech geecks like you maybee something like this. What i do with the games i play e.g. with alexa i try to give just ideas.

https://www.hackster.io/ufuk-arslan/alexaboat-7f1a7e Example include Rasberry as well. But whatever we discuss now is not sorted out.
Its my answer also to the yesterdays question to find an intrance to MQTT and node red. Ready made and documented things and easy to build up.

(2017-11-17, 02:09 PM)PaddyB Wrote:
(2017-11-17, 01:23 PM)shark24 Wrote: I'm aware of the concept of time series databases. Our boats aren't exactly like the Queen Mary 2 so we won't produce terabytes of data. From my point of view most of the databases you can run on the pi like mysql, influxdb, etc. are slowing down the system. That's why I prefer rather logging data to a file/sqlite than having a database server in the background bothering my cpu. Certainly the data queries will take longer but my pi isn't kept busy constantly. I don't know why you would need two years of sensor data on your pi and why you need a good performance for the data analysis. And even if you want time series data of a long range for a graph it'll be one slow select query and that's it. The select query takes 80 instead of 10 milliseconds - pardon my French but I don't give a rat's ***. I won't sacrifice over all system performance for two or three slow queries it takes to get the  some data from bigger ranged time series.   
If you want to use openplotter and the pi for real time data analysis of big time series maybe you got the wrong software and hardware.
Very much agree with all of that. I played around with RRDtools for a while, which worked OK but was a bit clunky to work with. Sqlite does all that is needed taking little CPU time. Handy having it as just one file as well, you can copy across to a faster machine easily to back up or do some more intensive plotting/sql. I've had one running pretty much constantly since about august recording once a minute, file is around 22Meg.
Its nice you found yours solution but i am no more interest in sql database logging. That this is working i did publish in my blog . What i am interesting for is something you did drop for. i am interesting in a step by step guide of yours influx db logging with grafana  including the connection to  Signal K. There is no reason i think to hide what you did drop. Exact this work i am interesting for.
Reply
#19
(2017-11-17, 02:35 PM)tocan Wrote: Its nice you found yours solution but i am no more interest in sql database logging. That this is working i did publish in my blog . What i am interesting for is something you did drop for. i am interesting in a step by step guide of yours influx db logging with grafana  including the connection to  Signal K. There is no reason i think to hide what you did drop. Exact this work i am interesting for.

Grafa was populated through node-red. 
Similar to this for sqlite -



Code:
[
   {
       "id": "67b79641.1fad68",
       "type": "websocket in",
       "z": "749e8283.293f4c",
       "name": "SignalK input",
       "server": "fc1b2b62.0b63a8",
       "client": "",
       "x": 90,
       "y": 120,
       "wires": [
           [
               "20af45d9.7fe30a",
               "abc25a09.833898"
           ]
       ]
   },
   {
       "id": "abc25a09.833898",
       "type": "switch",
       "z": "749e8283.293f4c",
       "name": "Is it nav data?",
       "property": "msg.payload.updates.source.sentence",
       "propertyType": "jsonata",
       "rules": [
           {
               "t": "eq",
               "v": "RMC",
               "vt": "str"
           }
       ],
       "checkall": "false",
       "outputs": 1,
       "x": 500,
       "y": 60,
       "wires": [
           [
               "4c17ab8.141a354"
           ]
       ]
   },
   {
       "id": "4c17ab8.141a354",
       "type": "change",
       "z": "749e8283.293f4c",
       "name": "create COG, SOG etc",
       "rules": [
           {
               "t": "set",
               "p": "SOG",
               "pt": "msg",
               "to": "msg.payload.updates.values[path=\"navigation.speedOverGround\"].value*1.94384",
               "tot": "jsonata"
           },
           {
               "t": "set",
               "p": "COG",
               "pt": "msg",
               "to": "msg.payload.updates.values[path=\"navigation.courseOverGroundTrue\"].value*180/3.14",
               "tot": "jsonata"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 520,
       "y": 100,
       "wires": [
           [
               "23641279.19f17e"
           ]
       ]
   },
   {
       "id": "23641279.19f17e",
       "type": "function",
       "z": "749e8283.293f4c",
       "name": "create INSERT topic SOG, COG",
       "func": "\n    msg.SOG=msg.SOG.toFixed(1);\n    msg.COG=msg.COG.toFixed(1);\n    msg.topic = \"INSERT INTO navdata  (SOG, COG) VALUES (\"  + msg.SOG + \",\" + msg.COG  + \" );\";\n   \n    return msg;",
       "outputs": "1",
       "noerr": 0,
       "x": 750,
       "y": 60,
       "wires": [
           [
               "8e3e8329.9202f"
           ]
       ]
   },
   {
       "id": "8e3e8329.9202f",
       "type": "delay",
       "z": "749e8283.293f4c",
       "name": "",
       "pauseType": "rate",
       "timeout": "5",
       "timeoutUnits": "seconds",
       "rate": "1",
       "nbRateUnits": "1",
       "rateUnits": "minute",
       "randomFirst": "1",
       "randomLast": "5",
       "randomUnits": "seconds",
       "drop": true,
       "x": 710,
       "y": 100,
       "wires": [
           [
               "a2715992.38a2d8"
           ]
       ]
   },
   {
       "id": "a2715992.38a2d8",
       "type": "sqlite",
       "z": "749e8283.293f4c",
       "mydb": "fe279cd9.bbe82",
       "name": "",
       "x": 1030,
       "y": 100,
       "wires": [
           []
       ]
   },
   {
       "id": "fc1b2b62.0b63a8",
       "type": "websocket-listener",
       "z": "",
       "path": "ws://localhost:3000/signalk/v1/stream",
       "wholemsg": "false"
   },
   {
       "id": "fe279cd9.bbe82",
       "type": "sqlitedb",
       "z": "",
       "db": "/home/pi/database/boatdata.db"
   }
]

This one might be of use as well, simply saving AIS to a text file -

Code:
[
   {
       "id": "36d7cef4.ce9742",
       "type": "tcp in",
       "z": "f1a0cb4.fe86138",
       "name": "",
       "server": "client",
       "host": "10.10.10.1",
       "port": "10109",
       "datamode": "stream",
       "datatype": "utf8",
       "newline": "\\n",
       "topic": "",
       "base64": false,
       "x": 184.00001525878906,
       "y": 83,
       "wires": [
           [
               "2ec38e6f.de4e32"
           ]
       ]
   },
   {
       "id": "2ec38e6f.de4e32",
       "type": "switch",
       "z": "f1a0cb4.fe86138",
       "name": "Filter just ais",
       "property": "payload",
       "propertyType": "msg",
       "rules": [
           {
               "t": "regex",
               "v": "!AIVDM*",
               "vt": "str",
               "case": true
           }
       ],
       "checkall": "true",
       "outputs": 1,
       "x": 412,
       "y": 68.99998474121094,
       "wires": [
           [
               "b94ee7ad.e95078"
           ]
       ]
   },
   {
       "id": "b94ee7ad.e95078",
       "type": "file",
       "z": "f1a0cb4.fe86138",
       "name": "",
       "filename": "/home/pi/savedais2.txt",
       "appendNewline": true,
       "createDir": false,
       "overwriteFile": "false",
       "x": 624,
       "y": 45.99998474121094,
       "wires": []
   }
]
Reply
#20
(2017-11-17, 02:35 PM)tocan Wrote: Its nice you found yours solution but i am no more interest in sql database logging. That this is working i did publish in my blog . What i am interesting for is something you did drop for. i am interesting in a step by step guide of yours influx db logging with grafana  including the connection to  Signal K. There is no reason i think to hide what you did drop. Exact this work i am interesting for.
I don't understand you. What exactly are you trying to do and what is stopping you?
Yesterday I've put, mosqitto, node-red, grafana, and influxdb on an clean raspbian stretch lite running on a pi zero w, just for the fun of it. I've connected an esp8266 (easy esp) via mqtt logging bme280 data. Thinking about it I've missed that it's possible to cut out the mqtt/node-red part and send the data straight via http to influx. Nervermind - the set up survived the night running smoothly but the memory of the pi zero (<500mb) might be an issue with more data to come and a big grafana dashboard (currently I'm just using three graphs).
For every single step I needed the help of google but there are so many blogentries/articles/forum postings that I never got stuck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)