tag:blogger.com,1999:blog-20166324425525465922024-03-28T12:32:32.131+01:00PysselPyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.comBlogger174125tag:blogger.com,1999:blog-2016632442552546592.post-10332075794570972822024-03-05T22:53:00.004+01:002024-03-22T14:40:58.505+01:00OpenPlotter v4 Beta, install guide<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihGqQEru1u3C8FGi_PdvYJnhGRndtgrWUn8LHd6rSB7ByrGebIWUoJ3ogJ_Q0DP3YMaXVHckVaK50jE8b95hVgFD-3JqWyTmd8tJHduSVpFiI_1j7_4lZl4ySzPQ7S7iw3o6xp-a638rj9DY8LdsxD8be_Fsfl7pS43LJReq32UgXTMmTFANW2n1DfNPUD/s990/OP_v4.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="922" data-original-width="990" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihGqQEru1u3C8FGi_PdvYJnhGRndtgrWUn8LHd6rSB7ByrGebIWUoJ3ogJ_Q0DP3YMaXVHckVaK50jE8b95hVgFD-3JqWyTmd8tJHduSVpFiI_1j7_4lZl4ySzPQ7S7iw3o6xp-a638rj9DY8LdsxD8be_Fsfl7pS43LJReq32UgXTMmTFANW2n1DfNPUD/w194-h182/OP_v4.png" width="194" /></a></div><p></p><p><span style="font-family: arial;">OpenPlotter(OP), a Boat Navigation application, is really a nice and simple installation of</span></p><div><div><span style="font-family: arial;"><ul style="font-family: Times;"><li><span style="font-family: arial;"><a href="https://openmarine.net/openplotter" target="_blank">OpenPlotter</a>(OP)</span></li><li><span style="font-family: arial;"><a href="https://opencpn.org" target="_blank">OpenCPN</a>(OC)</span></li><li><span style="font-family: arial;"><a href="http://signalk.org" target="_blank">SignalK</a>(SK) </span></li></ul><div style="font-family: Times;"><span style="font-family: arial;">and other supporting applications for Your boat.</span></div></span></div><div><br /></div><div><span style="font-family: arial;">An overall information about the OP package is found <a href="https://pysselilivet.blogspot.com/2020/07/understandinstall-openplotteropencpnsig.html" rel="nofollow" target="_blank">here</a>.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span><a name='more'></a></span></div><div><b style="font-family: arial; font-size: x-large;">Intro</b></div><div><span style="background-color: white; font-family: arial;"><span><span>This is info for OP v4 beta, just 64 bit, and if you want a stable variant <a href="https://pysselilivet.blogspot.com/2022/04/openplotter-v3-beta-install-guide.html" rel="nofollow" target="_blank">check out OP v3</a>.</span></span></span></div><div><span style="font-family: arial;"><span style="background-color: white;">On the other hand if you have a Raspberry Pi 5 you must use this variant.</span></span></div><div><br /></div><div><span style="font-family: arial;">Just want to install SK ? <a href="https://pysselilivet.blogspot.com/2021/05/signal-k-quick-install.html" target="_blank">Link here</a>.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">The documentation for v4 is not available for the moment but you can watch the progress of the applications <a href="https://forum.openmarine.net/showthread.php?tid=5060" target="_blank">here</a>.</span></div><div><span><br /></span><span style="font-family: arial;"><span style="font-size: large;"><span><b>Installing from </b></span><b>image(Option A)</b></span><br /><span>Below you have the links to the different images with Bookworm</span></span></div><div><span style="font-family: arial;"><ul class="mycode_list" style="background-color: white; color: #333333;"><li>OpenPlotter 4 Starting: <a class="mycode_url" href="https://cloud.openmarine.net/s/TwxS4AJrtTJ485T" rel="noopener" style="color: #0072bc; text-decoration-line: none; text-decoration: none;" target="_blank">https://cloud.openmarine.net/s/TwxS4AJrtTJ485T</a><br /></li><li>OpenPlotter 4 Headless: <a class="mycode_url" href="https://cloud.openmarine.net/s/cMJrfH45aPeamFc" rel="noopener" style="color: #0072bc; text-decoration-line: none; text-decoration: none;" target="_blank">https://cloud.openmarine.net/s/cMJrfH45aPeamFc</a><br /></li><li>OpenPlotter 4 Touchscreen: <a class="mycode_url" href="https://cloud.openmarine.net/s/3gjyKsrpKRb6ZHe" rel="noopener" style="color: #0072bc; text-decoration-line: none; text-decoration: none;" target="_blank">https://cloud.openmarine.net/s/3gjyKsrpKRb6ZHe</a></li></ul></span></div><div><span style="font-family: arial;"><span>Choose one of the files, download, unzip and u<span style="font-family: arial;">se </span><a href="https://openplotter.readthedocs.io/en/3.x.x/getting_started/installing.html" target="_blank">these instructions</a>(v3)<span style="font-family: arial;">, with the downloaded OP file. </span></span></span></div><div><span style="font-family: arial;"><span><span style="font-family: arial;"><br /></span></span></span></div><div><span style="font-family: arial;"><span><span style="font-family: arial;">When using remote access...</span></span></span></div><div><span style="font-family: arial;"><span><span style="font-family: arial;"><ul class="mycode_list" style="background-color: white; color: #333333;"><li>User: pi<br /></li><li>Password: raspberry<br /></li><li>Headless hotspot SSID: OpenPlotter<br /></li><li>Headless hotspot password: 12345678<br /></li><li>Headless VNC address: openplotter.local<br /></li><li>Headless SSH: ssh pi@openplotter.local</li></ul></span></span></span></div><div><span style="font-family: arial;"><span><span style="font-family: arial;">Then</span></span></span><span style="font-family: arial;"> go on with <b>Final setup</b> below.</span></div><div><span><br /></span><span style="font-family: arial;"><span style="font-size: large;"><span id="OptionB"><b>Installing from Raspberry Pi OS</b></span><b>(Option B)</b></span><br /><span>I used the Raspberry Pi OS Lite(RPiOS) Bookworm 64 bit, headless install, and <a href="https://pysselilivet.blogspot.com/2017/11/raspbian-lite-with-gui-rdp-vnc.html" target="_blank">just installing</a> Wayland(Pixel), VNC and Firefox. </span><br /><span><br /></span><span>In a terminal/ssh session, always start updating with </span></span><br /><span style="font-size: x-small; font-variant-ligatures: no-common-ligatures;"><br /></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">$ sudo apt update && <span style="font-variant-ligatures: no-common-ligatures;">sudo apt full-upgrade</span> -y && sudo apt clean</span></span><br /><div class="p1"><span class="s1"><span style="font-size: x-small;"><br /></span></span></div><span style="font-family: arial;">continue and install the dependencies</span><br /><span style="font-family: helvetica; font-size: 12px;"><br /></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">$ sudo apt install python3-wxgtk4.0 python3-ujson python3-pyudev vlc matchbox-keyboard</span></span><div class="p2"><span style="font-family: arial;"><br /></span></div><div class="p2"><span style="font-family: arial;">Download the latest "</span><span style="font-family: arial;">openplotter-settings"</span><span style="font-family: arial;"> deb file </span><a href="https://cloudsmith.io/~openplotter/repos/openplotter/packages/" style="font-family: arial;" target="_blank">from Cloudsmith</a>.</div><div class="p2"><span style="font-family: arial;">Please note that there are several versions so the best way is to sort by name</span></div><div class="p2"><br /></div><div class="p2"><span style="font-family: arial;">If you want to test the latest, Beta OP v4, 64 bit, </span><span style="font-family: arial;">for Bookworm(also RPi 5), download with </span></div><div class="p2"><br /></div><div class="p2"><span style="background-color: #eeeeee; font-family: courier; font-size: small;">$ </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">wget https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian/pool/bookworm/main/o/op/openplotter-settings_4.0.64-beta/openplotter-settings_4.0.64-beta_all.deb</span></div><div class="p2"><br /></div><div class="p2"><span style="font-family: arial;">Install with </span></div><div class="p2"><br /></div><div class="p2"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span><span>$ </span></span>sudo dpkg -i openplotter-settings_4.0.64-beta_all.deb</span></div><div class="p2"><br /></div><div class="p1"><span style="font-family: arial; font-size: large;"><b>Final setup </b></span></div><div class="p2"><span style="font-family: arial;">In the GUI, reached via <a href="https://www.realvnc.com/en/connect/download/viewer/" target="_blank">VNC viewer</a>, or direct connected with keyboard/mouse/monitor, open "Applications => Other => Settings"</span></div><span style="font-family: arial;"><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
</style><br /></span><div class="p2"><span style="font-family: arial;">Click on ”Add Sources” and after that "Get Candidates" which will update the list of possible applications.</span></div><span style="font-family: arial;"><span><br /></span><span>Mark the row with the application You want to install and click on "Install" in the right part.</span><br /><span><br /></span><span>Every new application will create a separate Icon in "Other" from where it will be started.</span><br /><span><br /></span><span>After installing the "Serial" OP application You can add serial USB devices to OP.</span><br /><span>(Another way, not recommended, is to <a href="https://github.com/SignalK/signalk-server/blob/master/README.md#setting-up-data-connections" target="_blank">add them direct in SK</a>)</span><br /></span><span><br /></span><span style="font-family: arial; font-size: large;"><b>Installing Signal K(SK)</b></span><br /><span style="font-family: arial;">Install the "Signal K installer" which will do the job. Additional instructions are <a href="https://openplotter.readthedocs.io/en/3.x.x/signalk/signalk_app.html" target="_blank">found here</a>(v3).</span></div><div><span><br /></span></div><div><span style="font-size: large;"><b style="font-family: arial;">Installing OpenCPN(OC)</b></span></div><div><span style="font-family: arial;">Install instructions is <a href="https://pysselilivet.blogspot.com/2020/07/understandinstall-openplotteropencpnsig_24.html" target="_blank">found here</a> together with charts. The OP documentation is found <a href="https://openplotter.readthedocs.io/en/3.x.x/opencpn/opencpn_app.html" target="_blank">here</a>(v3).</span></div><div><span><br /></span></div><div><span style="font-family: arial;"><b><span style="font-size: large;">OP update</span></b><br /><span style="background-color: white; color: #444444; text-align: justify;"><span>If You have been running OP for a while and want to update to the latest development, update with;</span></span><br /></span><ul><li><span style="background-color: white; color: #444444; text-align: justify;"><span style="font-family: arial;"><span style="color: #444444;">In "OpenPlotter Settings",</span><span style="color: #444444;"><span> click on "Add Sources", then "Update Candidates" to check if there any updates</span></span></span></span></li><li><span style="background-color: white; color: #444444; font-family: arial; text-align: justify;"><span>In a ssh/Terminal session update, OP and RPiOS, with </span></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;"><span style="color: #444444; text-align: justify;">$ </span><span style="color: #444444; text-align: justify;">sudo apt full-upgrade -y && sudo apt clean</span></span></span></li></ul><div style="text-align: justify;"><div><span style="font-family: arial; font-size: x-large;"><b>Remark</b></span></div><div><span style="font-family: arial;"><span style="font-family: arial; text-align: left;">Don't miss the </span><a href="http://forum.openmarine.net/" style="text-align: left;" target="_blank">OP active forum</a><span style="font-family: arial; text-align: left;"> !!</span></span></div></div></div></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com0Helsingörskajen 102, 252 67 Helsingborg, Sweden56.0449272 12.686998156.040133267633365 12.678415031152344 56.049721132366628 12.695581168847657tag:blogger.com,1999:blog-2016632442552546592.post-20532084559083689382024-03-02T10:47:00.004+01:002024-03-03T11:42:21.568+01:00Raspberry Pi OS Lite with GUI, RDP, VNC, Chrome<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQldUNaMn6syDOdkZg55XbBnyfrAPCE6vUVGTkyaqTyrzhww2BJp-MCKabJY6MgpXLB2E8hzbNB278-b9idaEgjJEvpZuFgcFlKI2Hyqex_6uYOYziR41THQRrmNXBFxBCSyWWuk45NZo2EMqEQDBtQ6myI_V7m8qJwM2pDOoTqOaZoiLBiqwpb2at2R_P/s1364/Bookworm.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="741" data-original-width="1364" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQldUNaMn6syDOdkZg55XbBnyfrAPCE6vUVGTkyaqTyrzhww2BJp-MCKabJY6MgpXLB2E8hzbNB278-b9idaEgjJEvpZuFgcFlKI2Hyqex_6uYOYziR41THQRrmNXBFxBCSyWWuk45NZo2EMqEQDBtQ6myI_V7m8qJwM2pDOoTqOaZoiLBiqwpb2at2R_P/w269-h146/Bookworm.png" width="269" /></a></div><div class="p1"><span style="background-color: #04ff00; font-family: arial;">Updated 2024-03-02 !</span></div>
<div class="p1">
<span style="font-family: arial;">
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif" style="font-size: small;"><span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span></span>
<span face="arial, helvetica, sans-serif" style="font-size: small;"><font>I like the Raspberry Pi(RPi), with Raspberry Pi OS Lite (no Desktop
is included), headless operation, and then adding the software You
need. Until now I haven't had a use case where I needed a Desktop but
now was time. </font></span></span></span>
</div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><font face="arial"><br /></font></span>
</div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><font face="arial">Why don't use the Raspberry Pi OS with Desktop ?? In that package there
is a lot of software I don't need and I really want to optimize the RPi. I
think that the less software You install the happier RPi will be...</font></span></div><div class="p1"><span face="arial, helvetica, sans-serif" style="font-size: small;"><font face="arial">😉</font></span></div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><font face="arial"><br /></font></span>
</div>
<div class="p2">
<a name='more'></a>
</div>
<span style="font-family: arial;"><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px <span class="goog-spellcheck-word" id=":di.8" tabindex="-1" role="menuitem" aria-haspopup="true" style="background: yellow;">Helvetica</span>}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px <span class="goog-spellcheck-word" id=":di.9" tabindex="-1" role="menuitem" aria-haspopup="true" style="background: yellow;">Helvetica</span>; min-height: 14.0px}
</style></span>
<div class="p1">
<span style="font-family: arial;">So after some </span><span style="font-family: arial;">Googling inspired from this <a href="https://www.raspberrypi.org/forums/viewtopic.php?p=890408#p890408" target="_blank">guide</a> I came up with the following setup.</span>
</div>
<div class="p1">
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><div class="p1" style="font-size: medium;">
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span></span>
</div>
<div class="p1">
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Prerequisites</b></span></span>
</div></span><span face="arial, helvetica, sans-serif" style="font-size: small;">Start up with a fresh
<a href="https://pysselilivet.blogspot.com/2017/02/rpi-raspbian-install-with-mac.html" rel="nofollow" target="_blank">Raspberry PI OS Lite installation</a>, and don't forget to update with </span></span>
</div>
<div class="p1">
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span></span>
</div>
<div class="p1">
<span style="font-family: courier; font-size: x-small;"><span style="background-color: #eeeeee;">sudo apt update && </span><span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;">sudo apt full-upgrade</span><span style="background-color: #eeeeee;"> -y && sudo apt clean</span></span>
</div>
<div class="p1">
<span style="font-family: arial; font-size: small;"><br /></span>
</div>
<div class="p1">
<span style="font-family: arial; font-size: x-large;"><b>Adding Desktop/GUI</b></span>
</div>
<div class="p1"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: medium;"><b>Standard</b></span></span></div><div class="p1"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: small;">Before Bookworm </span><span face="arial, helvetica, sans-serif" style="font-size: small;"><b>Pixel</b> was the standard RPi desktop but it
<a href="https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/" target="_blank">changed to </a><b><a href="https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/" target="_blank">Wayland</a>.</b></span></span>
</div>
<div class="p1">
<span style="font-family: arial; font-size: small;"><br /></span>
</div>
<div class="p1">
<span style="font-family: arial; font-size: small;">Both variants are installed, depending on your RPi OS, using the same command</span>
</div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span>
</div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt install raspberrypi-ui-mods</span>
</div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span>
</div>
<div class="p1">
<span style="font-family: arial;"><b><span style="font-size: medium;">Other variants</span></b><br /></span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">The easiest way to install other Desktops, and some other software, is
using<br /></span><span class="kw2" style="border: 0px; box-sizing: border-box; font-stretch: normal; line-height: 1.4rem; margin: 0px; outline: 0px; padding: 0px; text-size-adjust: auto; vertical-align: baseline;"><span style="font-family: arial; font-size: medium;"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo</span></span><span style="background-color: #eeeeee; caret-color: rgb(248, 248, 248); font-family: courier; font-size: x-small; text-size-adjust: auto;"><span class="Apple-converted-space"> </span>tasksel</span></span></div><div class="p1"><br /></div><div class="p1"><span style="font-family: arial;">
<span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Remote access</b></span></span>
</div>
<div class="p1"><span style="font-family: arial; font-size: medium;"><b>Wayvnc</b>(Bookworm)</span></div><div class="p1"><span style="font-family: arial;">There is a new VNC server which is installed together with Wayland. Anyway, the command is </span></div><div class="p1"><span style="font-family: arial;"><br /></span></div><div class="p1"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt install wayvnc</span></div><div class="p1"><span style="font-family: arial;"><br /></span></div><div class="p1">
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span><span style="font-family: arial;">and <a href="https://www.raspberrypi.com/documentation/computers/remote-access.html#enable-the-vnc-server" target="_blank">setup</a>. T</span><span style="font-family: arial;">he recommended client is </span><a href="https://tigervnc.org" target="_blank">TigerVNC</a><span style="font-family: arial;"> with </span><a href="https://sourceforge.net/projects/tigervnc/files/stable/" target="_blank">binaries</a><span style="font-family: arial;">.</span></span></span></span></div><div class="p1"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="font-size: medium; font-weight: bold;"><br /></span></span></span></div><div class="p1"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span><b>2024-03-02 !!!!</b> </span></span></span></div><div class="p1"><ul style="text-align: left;"><li><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span>Did a fresh install of VNC via </span></span></span><span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;"><span style="background-color: #eeeeee;">sudo raspi-config</span> </span><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;">and <a href="https://help.realvnc.com/hc/en-us/articles/360002249917-RealVNC-Connect-and-Raspberry-Pi#setting-up-your-raspberry-pi-0-0" target="_blank">RealVNC</a> was installed ? and works fine.</span></span></li><li><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;"><a href="https://help.realvnc.com/hc/en-us/articles/14110635000221-Raspberry-Pi-5-Bookworm-and-RealVNC-Connect#statement-0-0" target="_blank">RealVNC and RPi 5</a> will for the moment not work.</span></span></li></ul></div><div class="p1"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="font-size: medium; font-weight: bold;"><br /></span></span></span></div><div class="p1"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="font-size: medium; font-weight: bold;">VNC</span>(Before
Bookworm)</span></span>
</div>
<div class="p1">
<span style="font-family: arial;">You have to install the software for the VNC server and the easiest way is
to use </span>
</div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span>
</div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo raspi-config</span>
</div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span>
</div>
<span style="font-family: arial;">and then in the menu</span><br /><br /><span style="font-family: courier; font-size: x-small;">3 Interface Options<br />
<span> </span>P3 VNC<br />2 Display Options<br />
<span> </span>D1 Resolution<br />
<span> <span> </span></span>DMT Mode 16 </span><br /><br /><span style="font-family: arial;">For Bullseye </span>
<div>
<span style="font-family: arial;"><br /></span><span style="font-family: courier; font-size: small;">D5 VNC Resolution</span><br /><br /><span style="font-family: arial;"><span> Finish and reboot</span>
</span>
<div class="p1">
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span>
<span face="arial, helvetica, sans-serif" style="font-size: small;">Please note that two <b>systemd</b> services are initiated
via </span></span><br />
<span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span>
<span style="font-family: courier; font-size: x-small;"><span style="background-color: #eeeeee;">vncserver-x11-serviced.service</span><br />
<span style="background-color: #eeeeee;">vncserver-virtuald.service </span></span><br /></div><div class="p1"><br /></div>
<div class="p1">
<span style="font-family: arial; font-size: small;">Access the RPi with
<a href="https://www.realvnc.com/en/connect/download/viewer/" target="_blank">VNC Viewer</a> from Your PC/Mac/Phone.</span></div><div class="p1">
<span style="font-family: arial;"><br /><span><span style="font-size: medium; font-weight: bold;">RDP</span>(Problem with Bookworm....)</span></span></div>
<div class="p1">
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: small;">If You want o use RDP </span>instead, more lightweight than VNC, install the following server software</span>
</div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span>
</div>
<div class="p1">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px <span class="goog-spellcheck-word" id=":di.29" tabindex="-1" role="menuitem" aria-haspopup="true" style="background: yellow;">Menlo</span>; <span class="goog-spellcheck-word" id=":di.30" tabindex="-1" role="menuitem" aria-haspopup="true" style="background: yellow;">color</span>: #000000; background-<span class="goog-spellcheck-word" id=":di.31" tabindex="-1" role="menuitem" aria-haspopup="true" style="background: yellow;">color</span>: #<span class="goog-spellcheck-word" id=":di.32" tabindex="-1" role="menuitem" aria-haspopup="true" style="background: yellow;">ffffff</span>}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style>
</div>
<div class="p1">
<span class="s1" style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">sudo apt-get install xrdp</span></span>
</div>
<div class="p1"><br /></div>
<div class="p1">
<span style="font-family: arial;">Please note that two </span><b style="font-family: arial;">systemd</b><span style="font-family: arial;"> services are initiated via</span>
</div>
<div class="p1">
<span style="font-family: arial;"><br /></span>
</div>
<div class="p1">
<p style="font-stretch: normal; line-height: normal; margin: 0px;">
<span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">xrdp-sesman.service</span></span>
</p>
<p style="font-stretch: normal; line-height: normal; margin: 0px;">
<span style="font-family: courier; font-size: x-small;"><span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"></span></span>
</p>
<p style="font-stretch: normal; line-height: normal; margin: 0px;">
<span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">xrdp.service</span></span>
</p>
</div>
<div class="p1">
<br />
<div class="p1"><span style="font-family: arial;">Then install the RDP on your client. I prefer the Microsoft package
which works well on both
</span><a href="https://www.microsoft.com/en-us/download/details.aspx?id=50042" style="font-family: arial;" target="_blank">PC</a><span style="font-family: arial;">/</span><a href="https://apps.apple.com/us/app/microsoft-remote-desktop/id1295203466?mt=12" style="font-family: arial;" target="_blank">Mac</a><span style="font-family: arial;">/</span><a href="https://itunes.apple.com/us/app/microsoft-remote-desktop/id714464092?mt=8" style="font-family: arial;" target="_blank">iPad/iPhone</a></div></div>
<div class="p1">
<span><br />
<span style="font-family: arial; font-size: x-large;"><b>Add WEB-browser ?</b></span><br /></span></div><div class="p1"><span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;"> </span></span></span></div><div class="p1"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: medium;"><b>Chrome</b></span></span></div><div class="p1"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Install the default one with </span></span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt install chromium-browser --yes</span><br />
<div class="p1" style="color: black; font-style: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"></div>
</div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
</div><div class="p1"><span style="font-family: arial;"><b style="background-color: white; font-size: large;">Firefox</b><span style="background-color: white;"><span style="font-size: x-small;">(Smaller application compared to Chrome)</span></span></span></div><div class="p1"><span style="background-color: #eeeeee; font-family: arial; font-size: medium;"><br /></span></div><div class="p1"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt install firefox</span></div><div class="p1"><br /></div>
<div class="p1"><span style="background-color: white;"><span style="font-family: arial;"><span style="font-size: x-large;"><b>SD Card Copier</b></span><br /><span face="arial, helvetica, sans-serif">Install with </span></span><br style="font-family: Times; font-size: medium;" /><span style="font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt install piclone</span>
</div>
<div class="p1"><span style="font-family: arial;"><br /></span></div><div class="p1"><span style="font-family: arial;">or use the <a href="https://pysselilivet.blogspot.com/2017/11/rpi-clone-raspberry-boot-disk.html" rel="nofollow" target="_blank">command line one</a>. </span></div><div class="p1"><br /></div>
<div class="p1">
<b style="font-family: arial; font-size: xx-large;">Remote access from outside</b>
</div>
<div class="p1">
<span style="font-family: arial;">A really nice software solution for </span><span style="font-family: arial;">http, ssh, vnc, rdp, <a href="https://pysselilivet.blogspot.com/2016/11/samba-rpi-as-windows-file-server.html" rel="nofollow" target="_blank">SAMBA</a>....</span><span style="font-family: arial;"> is <a href="http://remote.it">remote.it</a> Quick
<a href="https://pysselilivet.blogspot.com/2023/09/remote-access-via-remoteit-made-simple.html" rel="nofollow" target="_blank">installation is found here</a>.</span></div></div><div class="p1"><span style="font-family: arial;"><br /></span></div><div class="p1"><span style="font-family: arial; font-size: x-large;"><b>Remark</b></span></div><div class="p1"><span style="font-family: arial;"><div class="p1" style="font-family: -webkit-standard;"><span style="font-family: arial; font-size: small;">If using <b>Stretch</b> delete the following package (In Buster it is not installed)</span></div><span face="-webkit-standard" style="font-size: small;"></span><br style="font-family: -webkit-standard;" /><div class="p1" style="font-family: -webkit-standard;"><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">sudo apt-get purge xserver-xorg-legacy</span></span></div></span></div><div class="p1"><span style="font-family: arial;"><br /></span></div><span style="font-family: arial;">Sems to bee a </span><a href="https://forums.raspberrypi.com/viewtopic.php?t=323471" style="font-family: arial;" target="_blank">problem with Bullseye</a><span style="font-family: arial;"> ?</span><div><span style="font-family: arial;"><br /></span></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com18tag:blogger.com,1999:blog-2016632442552546592.post-3436179123562900772024-03-01T08:30:00.002+01:002024-03-05T17:42:20.522+01:00OpenPlotter V3, install guide<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz98RWI4Vwd2rnfejBm5jUd5lTWRrzq9HlJsOEW1h8QSJ6n9NvGMvQWbYbfArcbpWznW0z7ffEJRE8vgE0Qhl1gpEwOtOA2h1PmCCVWF1jpKMb07ehuYwdsX76tyTZd079cPI8Vt_kv1hy8wvq0rR2l90fRAKls2HRLAGBfYuadtzp4hGe1aPFc6uQFw/s932/OP_V3.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="600" data-original-width="932" height="148" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz98RWI4Vwd2rnfejBm5jUd5lTWRrzq9HlJsOEW1h8QSJ6n9NvGMvQWbYbfArcbpWznW0z7ffEJRE8vgE0Qhl1gpEwOtOA2h1PmCCVWF1jpKMb07ehuYwdsX76tyTZd079cPI8Vt_kv1hy8wvq0rR2l90fRAKls2HRLAGBfYuadtzp4hGe1aPFc6uQFw/w230-h148/OP_V3.png" width="230" /></a></div><p><span style="font-family: arial;"><span style="background-color: #04ff00; color: #444444;">Updated 2024-03-01 !</span></span></p><div><div><span style="font-family: arial;"><span style="font-family: arial;">OpenPlotter(OP), a Boat Navigation application, is really a nice and simple installation of</span><br style="font-family: Times;" /><ul style="font-family: Times;"><li><span style="font-family: arial;"><a href="https://openmarine.net/openplotter" target="_blank">OpenPlotter</a>(OP)</span></li><li><span style="font-family: arial;"><a href="https://opencpn.org" target="_blank">OpenCPN</a>(OC)</span></li><li><span style="font-family: arial;"><a href="http://signalk.org" target="_blank">SignalK</a>(SK) </span></li></ul><div style="font-family: Times;"><span style="font-family: arial;">and other supporting applications for Your boat.</span></div></span></div><div><br /></div><div><span style="font-family: arial;">An overall information about the OP package is found <a href="https://pysselilivet.blogspot.com/2020/07/understandinstall-openplotteropencpnsig.html" rel="nofollow" target="_blank">here</a>.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span><a name='more'></a></span></div><div><b style="font-family: arial; font-size: x-large;">Intro</b></div><div><span style="background-color: white; font-family: arial;"><span><span>OP V3 will run both</span></span><span style="caret-color: rgb(64, 64, 64);"> 32bit or 64bit Raspberry Pi OS.</span></span></div><div><span style="font-family: arial;"><span style="font-family: arial;"><br /></span></span></div><div><span style="font-family: arial;"><span style="font-family: arial;">Using OpenPlotter(OP), on a Raspberry Pi 4(RPi) 2 GB with SSD, and the <a href="https://pysselilivet.blogspot.com/2021/11/raspberry-4-usb-ssd-boot-in-60-seconds.html" target="_blank">64 bit Raspberry Pi OS, Bullseye,</a> installed with option B below i</span><span style="font-family: arial;">t's running very nice !</span></span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Just want to install SK ? <a href="https://pysselilivet.blogspot.com/2021/05/signal-k-quick-install.html" target="_blank">Link here</a>.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">The documentation for V3 is <a href="https://openplotter.readthedocs.io/en/3.x.x/description/what_is_openplotter.html" target="_blank">found here</a> and you can watch the progress of the applications <a href="https://forum.openmarine.net/showthread.php?tid=3878" target="_blank">here</a>.</span></div><div><span><br /></span><span style="font-family: arial;"><span style="font-size: large;"><span><b>Installing from </b></span><b>image(Option A)</b></span><br /><span><a href="https://openplotter.readthedocs.io/en/3.x.x/getting_started/downloading.html" target="_blank">Here</a> you can find information about different images for download.</span><br /><span><br /></span><span>Choose one of the files, download, unzip and u<span style="font-family: arial;">se </span><a href="https://openplotter.readthedocs.io/en/3.x.x/getting_started/installing.html" target="_blank">these instructions</a><span style="font-family: arial;">, with the downloaded OP file. Then</span></span></span><span style="font-family: arial;"> go on with <b>Final setup</b> below.</span><br /><span><br /></span><span style="font-family: arial;"><span style="font-size: large;"><span id="OptionB"><b>Installing from Raspberry Pi OS</b></span><b>(Option B)</b></span><br /><span>I used the Raspberry Pi OS Lite(RPiOS), headless install, and <a href="https://pysselilivet.blogspot.com/2017/11/raspbian-lite-with-gui-rdp-vnc.html" target="_blank">just installing</a> Wayland(Pixel), VNC(RDP) and Chromium. </span><br /><span><br /></span><span>In a terminal/ssh session, always start updating with </span></span><br /><span style="font-size: x-small; font-variant-ligatures: no-common-ligatures;"><br /></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">$ sudo apt update && <span style="font-variant-ligatures: no-common-ligatures;">sudo apt full-upgrade</span> -y && sudo apt clean</span></span><br /><div class="p1"><span class="s1"><span style="font-size: x-small;"><br /></span></span></div><span style="font-family: arial;">continue and<span class="Apple-converted-space"> i</span>nstall the dependencies</span><br /><span style="font-family: helvetica; font-size: 12px;"><br /></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">$ sudo apt install python3-wxgtk4.0 python3-ujson python3-pyudev vlc matchbox-keyboard</span></span><div class="p2"><span style="font-family: arial;"><br /></span></div><div class="p2"><span style="font-family: arial;">Download the latest "</span><span style="font-family: arial;">openplotter-settings"</span><span style="font-family: arial;"> deb file </span><a href="https://cloudsmith.io/~openplotter/repos/openplotter/packages/" style="font-family: arial;" target="_blank">from Cloudsmith</a>.</div><div class="p2"><span style="font-family: arial;">Please note that there are several versions so the best way is to sort by name</span></div><div class="p2"><br /></div><div class="p2"><span style="font-family: arial;">If you want to test the latest, Beta OP v4, 64 bit, </span><span style="font-family: arial;">for Bookworm(also RPi 5), download with </span></div><div class="p2"><br /></div><div class="p2"><span style="background-color: #eeeeee; font-family: courier; font-size: small;">$ </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">wget https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian/pool/bookworm/main/o/op/openplotter-settings_4.0.64-beta/openplotter-settings_4.0.64-beta_all.deb</span></div><div class="p2"><br /></div><div class="p2"><span style="font-family: arial;">Install with </span></div><div class="p2"><br /></div><div class="p2"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span><span>$ </span></span>sudo dpkg -i openplotter-settings_4.0.64-beta_all.deb</span></div><div class="p2"><span style="font-size: xx-small;"><br /></span></div><div class="p2"><span style="font-family: arial;">For RPi OS before Bookworm get the file below instead</span></div><div class="p2"><span style="font-family: arial;"><br /></span></div><div class="p2"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">https://dl.cloudsmith.io/public/openplotter/openplotter/deb/debian/pool/bullseye/main/o/op/openplotter-settings_3.6.6-stable/openplotter-settings_3.6.6-stable_all.deb</span></div><div class="p2"><span style="font-family: arial;"><br /></span></div><div class="p2"><span style="font-size: xx-small;"><br /></span></div><div class="p1"><span style="font-family: arial; font-size: large;"><b>Final setup </b></span></div><div class="p2"><span style="font-family: arial;">In the GUI, reached via <a href="https://www.realvnc.com/en/connect/download/viewer/" target="_blank">VNC viewer</a>, or direct connected with keyboard/mouse/monitor, open "Applications => Other => Settings"</span></div><span style="font-family: arial;"><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
</style><br /></span><div class="p2"><span style="font-family: arial;">Click on ”Add Sources” and after that "Get Candidates" which will update the list of possible applications.</span></div><span style="font-family: arial;"><span><br /></span><span>Mark the row with the application You want to install and click on "Install" in the right part.</span><br /><span><br /></span><span>Every new application will create a separate Icon in "Other" from where it will be started.</span><br /><span><br /></span><span>After installing the "Serial" OP application You can add serial USB devices to OP.</span><br /><span>(Another way, not recommended, is to <a href="https://github.com/SignalK/signalk-server/blob/master/README.md#setting-up-data-connections" target="_blank">add them direct in SK</a>)</span><br /></span><span><br /></span><span style="font-family: arial; font-size: large;"><b>Installing Signal K(SK)</b></span><br /><span style="font-family: arial;">Install the "Signal K installer" which will do the job. Additional instructions are <a href="https://openplotter.readthedocs.io/en/3.x.x/signalk/signalk_app.html" target="_blank">found here</a>.</span></div><div><span><br /></span></div><div><span style="font-size: large;"><b style="font-family: arial;">Installing OpenCPN(OC)</b></span></div><div><span style="font-family: arial;">Install instructions is <a href="https://pysselilivet.blogspot.com/2020/07/understandinstall-openplotteropencpnsig_24.html" target="_blank">found here</a> together with charts. The OP documentation is found <a href="https://openplotter.readthedocs.io/en/3.x.x/opencpn/opencpn_app.html" target="_blank">here</a>.</span></div><div><span><br /></span></div><div><span style="font-family: arial;"><b><span style="font-size: large;">OP update</span></b><br /><span style="background-color: white; color: #444444; text-align: justify;"><span>If You have been running OP for a while and want to update to the latest development, update with;</span></span><br /></span><ul><li><span style="background-color: white; color: #444444; text-align: justify;"><span style="font-family: arial;"><span style="color: #444444;">In "OpenPlotter Settings",</span><span style="color: #444444;"><span> click on "Add Sources", then "Update Candidates" to check if there any updates</span></span></span></span></li><li><span style="background-color: white; color: #444444; font-family: arial; text-align: justify;"><span>In a ssh/Terminal session update, OP and RPiOS, with </span></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;"><span style="color: #444444; text-align: justify;">$ </span><span style="color: #444444; text-align: justify;">sudo apt full-upgrade -y && sudo apt clean</span></span></span></li></ul><div style="text-align: justify;"><div><span style="font-family: arial; font-size: x-large;"><b>Remark</b></span></div><div><span style="font-family: arial;"><span style="font-family: arial; text-align: left;">Don't miss the </span><a href="http://forum.openmarine.net/" style="text-align: left;" target="_blank">OP active forum</a><span style="font-family: arial; text-align: left;"> !!</span></span></div></div></div></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com5tag:blogger.com,1999:blog-2016632442552546592.post-80286832702651261682024-02-28T10:00:00.002+01:002024-03-03T22:44:40.180+01:00Raspberry Pi 2, 3, 4 USB SSD or USB drive boot<p></p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg86Tk_yRhKXkvuqMeTiL-IlgABQxSXaMR6_Xmk1VKzjrGCRBoNOAUDEf1L9Rmm2ftd8nod8NcpGBKcWA-LYRsUu1kZNl75QbyLJLlXb5Vur60wNDwtG_sKlUFLsauHEGDS96DFS5D8xqQD/s338/SSD.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="338" data-original-width="248" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg86Tk_yRhKXkvuqMeTiL-IlgABQxSXaMR6_Xmk1VKzjrGCRBoNOAUDEf1L9Rmm2ftd8nod8NcpGBKcWA-LYRsUu1kZNl75QbyLJLlXb5Vur60wNDwtG_sKlUFLsauHEGDS96DFS5D8xqQD/w147-h200/SSD.png" width="147" /></a>
</div>
<span style="font-family: arial;"><div><span style="font-family: arial;"><span style="background-color: lime;">Updated 2024-02-28 !</span></span></div><div><span style="font-family: arial;"><span style="background-color: lime;"><br /></span></span></div>After having tested several methods creating a bootable USB SSD, or other USB drive, for Raspberry Pi(RPi) 3 and 4, I finished with this simple method <br /><ul style="text-align: left;"><li><span style="font-family: arial;"> Create the setup you want on a ordinary SD card(Or use existing)</span></li><li><span style="font-family: arial;">Make a bootable backup/clone of the SD card saving it to the USB SSD</span></li><li><span style="font-family: arial;">Remove the SD card and boot from the USB SSD</span></li></ul></span><div><span style="font-family: arial;">Having a RPi 4 ? Use <a href="https://pysselilivet.blogspot.com/2021/11/raspberry-4-usb-ssd-boot-in-60-seconds.html" target="_blank">this post</a> on how to write the OS direct to the SSD.</span></div><div>
<div style="text-align: left;">
<span style="font-family: arial;"> </span></div>
<span><span style="font-family: arial;"><a name='more'></a></span></span>
<div style="text-align: left;"><b style="font-family: arial;"><span style="font-size: x-large;">Prerequisites</span></b></div>
<div style="text-align: left;"><span style="font-family: arial;">The tests was made with this <a href="https://www.aliexpress.com/item/33042865282.html?spm=a2g0s.9042311.0.0.355b4c4dK95EQ1" target="_blank">SSD</a></span></div><div style="text-align: left;"><span style="font-family: arial;"><br /></span></div><div style="text-align: left;"><span style="font-family: arial;">If You are starting from scratch with a new SD card you can
</span><a href="https://pysselilivet.blogspot.com/2017/02/rpi-raspbian-install-with-mac.html" style="font-family: arial;" target="_blank">check these instructions</a><span style="font-family: arial;"> to install the RPi OS and after that you install your selected software.</span></div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;">Please note !!! Before you continue you <b>MUST</b> update/upgrade !! to
get the latest OS/firmware</span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;"><font face="courier" size="2" style="background-color: #eeeeee;">sudo apt update && sudo apt full-upgrade -y && sudo apt
clean</font>
</div>
<div><br /></div><div><span style="font-family: arial;">Check out the clone alternatives att <b>Extra</b> below !</span></div><div><br /></div><div><b><span style="font-family: arial; font-size: x-large;">Setup</span></b></div>
<div style="text-align: left;">
<b><span style="font-family: arial; font-size: medium;">Raspberry Pi 3(RPi3)</span></b>
</div>
<div style="text-align: left;"><span style="font-family: arial;">Sometimes you find excellent "how to" posts and
</span><a href="https://www.raspberrypi.org/forums/viewtopic.php?t=225812#p1385832" style="font-family: arial;" target="_blank">this one</a><span style="font-family: arial;"> is such, explaining how to set up the RPi3 for SSD boot. Thanks
"HawaiianPi" ! (Here you also find some hints for RPi 2)</span></div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;">On my RPi 3, 7 years old, I had to set the OTP bit and add </span>
</div>
<div style="text-align: left;">
<span style="background-color: white; font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<span style="background-color: #eeeeee; caret-color: rgb(85, 85, 85); text-size-adjust: auto;"><span style="font-family: courier; font-size: x-small;">program_usb_boot_mode=1 </span></span>
</div>
<div style="text-align: left;">
<span style="caret-color: rgb(85, 85, 85); text-size-adjust: auto;"><span style="background-color: #eeeeee; text-size-adjust: auto;"><span style="font-family: courier; font-size: x-small;">program_usb_boot_timeout=1</span></span></span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;"><span style="background-color: white; caret-color: rgb(85, 85, 85); text-size-adjust: auto;"><span><br /></span></span>
</span></div>
<div style="text-align: left;">
<span style="caret-color: rgb(85, 85, 85); text-size-adjust: auto;"><span style="background-color: white; font-family: arial;">to "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">config.txt</span><span style="background-color: white; font-family: arial;">", </span></span><span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">sudo nano /boot/firmware/config.txt</span></span><span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;"> (</span><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;">Older RPi OS? =></span></span><span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;"> </span><span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">sudo nano /boot/config.txt</span></span><span style="background-color: white; caret-color: rgb(85, 85, 85); font-family: arial;">, and reboot to make it work. (After the reboot, check if the 2 added lines are still there, otherwise delete them.)</span></div><div style="text-align: left;"><span style="caret-color: rgb(85, 85, 85); text-size-adjust: auto;"><span style="background-color: white; font-family: arial;"><br /></span></span></div><div style="text-align: left;"><span style="caret-color: rgb(85, 85, 85); text-size-adjust: auto;"><span style="background-color: white; font-family: arial;">Also <b>please check</b> the issue below with high CPU load due to the RPi 3 is polling the SD card !!</span></span></div><div style="text-align: left;"><span style="font-family: arial;"><br /></span></div>
<div style="text-align: left;">
<b><span style="font-family: arial; font-size: medium;">Raspberry Pi 4</span></b>
</div>
<div style="text-align: left;"><span style="font-family: arial;">Run the command</span></div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">sudo raspi-config</span></span>
</p>
</div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;">and then select "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"> 6 Advanced options => A6 Boot order => B2 USB Boot</span><span style="font-family: arial;">"</span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;">This isn't really mandatory since the RPi will check both ways but selecting makes the boot quicker.</span></div><div style="text-align: left;"><span style="font-family: arial;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: arial; font-size: medium;"><b>Common instructions</b></span>
</div>
<div style="text-align: left;"><span style="font-family: arial;">Insert the USB SSD and then follow the
</span><a href="https://pysselilivet.blogspot.com/2017/11/rpi-clone-raspberry-boot-disk.html" style="font-family: arial;" target="_blank">instructions for a backup/clone</a><span style="font-family: arial;"> of the SD card to the USB SSD</span></div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div><div style="text-align: left;"><span style="font-family: arial;"><span style="background-color: #04ff00;">Copy alternatives</span> are found at <b>Extra,</b> below!</span></div><div style="text-align: left;"><span style="font-family: arial;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: arial;">Power down the RPi</span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo shutdown now</span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;">disconnect the power and remove the SD card. Connect the power again and
the RPi will boot from the USB SSD.</span></div><div style="text-align: left;"><span style="font-family: arial;"><br /></span></div><div style="text-align: left;"><span style="font-family: arial;">If you
do updates to the USB SSD I recommend to make a backup with the backup program to a SD card. </span><span style="font-family: arial;">Probably the boot disk will be named "</span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">sda</span></span><span style="font-family: arial;">" and the inserted, in a USB port, backup SD card will be named "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sdb</span><span style="font-family: arial;">" so the command will be </span>
</div>
<div style="text-align: left;"><br /></div>
<div style="text-align: left;">
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">sudo rpi-clone sdb -f</span></span>
</p>
</div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<span style="font-family: arial; font-size: x-large;"><b>Speed test</b></span>
</div>
<div style="text-align: left;"><span style="font-family: arial;">A </span><a href="https://www.raspberrypi.org/blog/sd-card-speed-test/" style="font-family: arial;" target="_blank">speed test</a><span style="font-family: arial;">
is made available by the RPi guys. This software can be used to compare the SD
card speed with your installed USB drive. Install with </span></div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">sudo apt install agnostics</span></span>
</p>
</div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;">and run from the GUI or from command line, (<a href="https://geektechstuff.com/2020/03/08/raspberry-pi-microsd-check-using-agnostics-via-cli-raspberry-pi/" target="_blank">inspiration link</a>), with</span>
</div>
<div style="text-align: left;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="text-align: left;">
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">sudo sh /usr/share/agnostics/sdtest.sh</span></span>
</p>
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;"><br /></span></span>
</p>
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="background-color: white; font-family: arial;"><i><b>Another</b> way</i> is using the command (<a href="https://www.the-diy-life.com/how-to-boot-a-raspberry-pi-4-from-an-ssd/" target="_blank">Inspire link</a>)</span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="background-color: white; font-family: arial;"><br /></span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="background-color: white; font-family: arial;"></span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">dd if=/dev/zero of=./speedTestFile bs=20M count=5 oflag=direct</span></span></p>
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="background-color: white; font-family: arial;"><br /></span></span>
</p>
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="background-color: white; font-family: arial;">which will create and copy a file, </span></span><span style="background-color: #eeeeee; font-family: courier; font-size: small; font-variant-ligatures: no-common-ligatures;">speedTestFile</span><span style="background-color: white; font-family: arial; font-variant-ligatures: no-common-ligatures;">, and report the write speed. Go on with reading the file with </span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="background-color: white; font-family: arial; font-variant-ligatures: no-common-ligatures;"><br /></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">dd if=./speedTestFile of=/dev/zero bs=20M count=5 oflag=dsync</span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><br /></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;">and get the read speed. Then delete the file with</span> <span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">rm <span style="font-variant-ligatures: no-common-ligatures;">speedTestFile</span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span style="font-variant-ligatures: no-common-ligatures;"><br /></span></span></p>
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b><span style="font-family: arial; font-size: x-large;">High CPU load on a RPi 3 ?</span></b></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;">I detected that the CPU load on my RPi 3, booting from the SSD, was over 15 %, used the "top" command, even when the RPi 3 didn't do anything ?? Did some googling and <a href="https://jamesachambers.com/raspberry-pi-reclaim-1-cpu-usage-when-ssd-msd-booting/" target="_blank">found this</a> which helped. In short, add "</span><span style="background-color: #eeeeee; caret-color: rgb(0, 0, 0); font-style: inherit; font-weight: inherit; white-space: pre-wrap;"><span style="font-family: courier; font-size: x-small;">dtparam=sd_poll_once</span></span><span style="background-color: white; caret-color: rgb(0, 0, 0); font-family: arial; font-style: inherit; font-weight: inherit; white-space: pre-wrap;">" to "</span><span style="caret-color: rgb(0, 0, 0);"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">/boot/config.txt</span><span style="background-color: white; font-family: arial;">"</span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><br /></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="caret-color: rgb(0, 0, 0);"><span style="background-color: white; font-family: arial;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><span style="caret-color: rgb(0, 0, 0);"></span></div><span style="caret-color: rgb(0, 0, 0);"><span style="background-color: white; font-family: arial; font-size: x-large;"><b>Extra</b></span></span></div><div><span style="background-color: white; font-family: arial;"><span style="font-size: medium;"><b>Clone alternatives</b></span></span><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"></p><ul style="text-align: left;"><li><span style="background-color: white; font-family: arial;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUmE1NueXWNXFsWMfx0hKRnqyn-xPneshuCp5KtY3EMMLtOwc3plegLyOEXvr5ugaukKlAiP4_k6Hct6JhZh2SQzOGIyIQKaHtxWS-rRTYkJ_vFbcim7Ogn_yi2hLNBaGYrigz34dykFq8/" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img alt="" data-original-height="192" data-original-width="352" height="91" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUmE1NueXWNXFsWMfx0hKRnqyn-xPneshuCp5KtY3EMMLtOwc3plegLyOEXvr5ugaukKlAiP4_k6Hct6JhZh2SQzOGIyIQKaHtxWS-rRTYkJ_vFbcim7Ogn_yi2hLNBaGYrigz34dykFq8/w166-h91/Sk%25C3%25A4rmavbild+2021-11-10+kl.+18.56.06.png" width="166" /></a></span><span style="font-family: arial;"><span style="background-color: white;">Use</span> the standard "Accessories => CD Card Copier" found in the RPi meny. (If you don't use RPi OS lite) If not installed ? </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt install piclone</span></li><li><span style="caret-color: rgb(0, 0, 0);"><span style="background-color: white; font-family: arial;">After a format of the USB drive use "</span></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">dd if=<span class="s1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-ligatures: no-common-ligatures; font-variant-numeric: normal; line-height: normal;">/dev/mmcblk0 of=</span>/dev/sda status=progress</span><span style="background-color: white; caret-color: rgb(0, 0, 0); font-family: arial;">" and after the boot, from the USB drive, expand the filesystem via "</span><span style="background-color: #eeeeee; caret-color: rgb(0, 0, 0);"><span style="font-family: courier; font-size: x-small;">sudo raspi-config</span></span><span style="background-color: white; caret-color: rgb(0, 0, 0); font-family: arial;">", 6, A1. Please note that this only works if the target has a bigger storage than the source and that the command will copy the whole source SD card which will take longer time than the recommended clone above.</span></li></ul><p></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="caret-color: rgb(0, 0, 0);"><span style="background-color: white; font-family: arial;">Check out this post <a href="https://pysselilivet.blogspot.com/2020/10/raspberry-and-external-storagedisk.html" target="_blank">connecting RPi to external storage/disk</a></span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="caret-color: rgb(0, 0, 0);"><br /></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: medium;"><b><span style="caret-color: rgb(0, 0, 0);">Checking </span><span style="background-color: #fafafa;">USB boot bit</span></b></span></p><div><span style="font-family: arial;">Use command</span></div><div><br /></div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">vcgencmd otp_dump | grep 17:
</span><br /><br /><span style="font-family: arial;">The output could be 17:3020000a. If there is a 1, where the 3 is, USB boot is not enabled.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial; font-size: medium;"><b>Boost read/write speed without SSD</b></span></div><div><span style="font-family: arial;">Instead of using the standard SD card, or a SSD, you could use a <a href="https://www.amazon.de/SanDisk-Ultra-Dual-Drive-Flash/dp/B07YYJL21Z/ref=sr_1_1_sspa?crid=GM66IEUAAW1O&keywords=Sandisk+Ultra+Dual+Drive+Go&qid=1666102657&qu=eyJxc2MiOiIyLjM4IiwicXNhIjoiMi4xNiIsInFzcCI6IjIuMDMifQ%3D%3D&sprefix=sandisk+ultra+dual+drive+go%2Caps%2C97&sr=8-1-spons&psc=1" target="_blank">USB flash card</a> with high read speed. Just follow the instructions above as if it was an SSD.</span>
</div>
</div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com5tag:blogger.com,1999:blog-2016632442552546592.post-3793877241876559482024-02-27T06:00:00.018+01:002024-03-23T11:15:11.863+01:00AIS receiver and dispatcher ! The best ?!<p></p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBqYAuUX9ENHO-E9AEM-x_fG1fZFtWl31gc4_p56avCdADdPDoo0SYLLz-unpvRc1x7F_u_yEjnPqYsJt_7X-ZEeiw8eoA2OC7S-d6wY-eV7KUd5DRqmNtN1EoSRl3tCnYLfTmEbG7_nZUqcUIcvz2NWaaQ5wk6QzrY5lwQSlQZtwX12Hk6wTAfjKHNwV-/s1407/AIS-catcher.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="767" data-original-width="1407" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBqYAuUX9ENHO-E9AEM-x_fG1fZFtWl31gc4_p56avCdADdPDoo0SYLLz-unpvRc1x7F_u_yEjnPqYsJt_7X-ZEeiw8eoA2OC7S-d6wY-eV7KUd5DRqmNtN1EoSRl3tCnYLfTmEbG7_nZUqcUIcvz2NWaaQ5wk6QzrY5lwQSlQZtwX12Hk6wTAfjKHNwV-/s320/AIS-catcher.png" width="320" /></a>
</div>
<span style="font-family: arial;"><div>
<span style="font-family: arial;"><span style="background-color: #04ff00;">Updated 2024-02-18</span></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
I found this amazing application,</span><span style="font-family: arial;"> </span><a href="https://github.com/jvde-github/AIS-catcher" style="font-family: arial;" target="_blank">AIS-catcher</a><span style="font-family: arial;">, just scrolling around on Youtube and </span><span style="font-family: arial;">it includes "all" you need for an AIS receiver staying ashore or installed on
a boat.</span>
<div>
<span style="font-family: arial;"><br /></span>
<div>
<div>
<span style="font-family: arial;">It is compatible with a wide range of Software Defined Radios (SDRs).
These include RTL-SDR dongles (such as the ShipXplorer AIS dongle and
RTL SDR Blog v4), AirSpy (Mini/R2/HF+), HackRF, SDRPlay, SoapySDR, and
file/network input (ZMQ/RTL-TCP/SpyServer). </span>
</div>
</div>
<div><br /></div>
<span><a name='more'></a></span>
<div>
<b><span style="font-family: arial; font-size: x-large;">Intro</span></b>
</div>
<div><span style="font-family: arial; font-size: medium;"><b>Output</b></span></div><div>
<span style="font-family: arial;">AIS-catcher can deliver output in the form of NMEA messages, default, which can be
conveniently displayed on screen or forwarded via UDP/HTTP/TCP.</span>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;">With this approach it's simple to forward the NMEA to aggregators, type
Marintraffic, Vesselfinder or to some other local application.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">It also includes a WEB server, not activated by default, that can serve a lot of information including the picture above.</span></div>
<div>
<span style="font-family: arial;"><br /></span>
</div><div><span style="font-family: arial; font-size: medium;"><b>Charts</b></span></div>
<div>
<span style="font-family: arial;">At the end of this post you will find a setup on how to use
<b>off-line charts</b>. </span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div><div><span style="font-family: arial; font-size: medium;"><b>Source another application</b></span></div>
<div>
<span style="font-family: arial;">If you already have an application, </span><span style="font-family: arial;">OpenCPN,</span><span style="font-family: arial;"> </span><a href="https://pysselilivet.blogspot.com/2021/05/signal-k-quick-install.html" rel="nofollow" style="font-family: arial;" target="_blank">Signal K</a><span style="font-family: arial;">, Navionics App or ...... ?, </span><span style="font-family: arial;">showing charts and accepts NMEA 0183 AIS input </span><span style="font-family: arial;">it's easy to use this app as just a receiver, </span><span style="font-family: arial;">without the WEB-server function,</span><span style="font-family: arial;"> and use for example the UDP output for the other application.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">This app have better sensitivity and lower CPU load than other I
used so in my case it's the source for </span><a href="https://pysselilivet.blogspot.com/2021/05/signal-k-quick-install.html" rel="nofollow" style="font-family: arial;" target="_blank">Signal K to display the targets</a><span style="font-family: arial;">, see setup info below. Another popular application </span><span style="font-family: arial;">is <a href="https://github.com/jvde-github/AIS-catcher#connecting-to-opencpn" target="_blank">OpenCPN</a>.</span>
</div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><b>Warning !</b></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhORAUqySI6Qicq-dbLtUBKHnAmQdI4yAVq_nhPXZ1o1OSm9taAB4kfl6W0kxXQQh43zJrKB51hyphxvAPWZCwCJJjUW4f0Ca6wp9x17tD0o4e2Tm5mqusoaOKgWwd8supZY5g3ftpWEJLOcD7-bspR_AxJci-YfsIk5XQipIt9z2pblkuuUolZKFWmZOo5/s4032/Buck_conv.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="91" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhORAUqySI6Qicq-dbLtUBKHnAmQdI4yAVq_nhPXZ1o1OSm9taAB4kfl6W0kxXQQh43zJrKB51hyphxvAPWZCwCJJjUW4f0Ca6wp9x17tD0o4e2Tm5mqusoaOKgWwd8supZY5g3ftpWEJLOcD7-bspR_AxJci-YfsIk5XQipIt9z2pblkuuUolZKFWmZOo5/w68-h91/Buck_conv.jpeg" width="68" /></a></div></div>
<div><span style="font-family: arial;">I'm using this setup on our boat and are using a simple buck converter, 12V DC => 5V DC, to source the Raspberry Pi 4. In this case the converter was placed direct below the SDR and interfered so much that there was almost no reception. So check for a good power supply, away from the dongle, and shielding.</span></div><div><span style="font-family: arial;"><div><span style="font-family: arial;"><br /></span></div>Another trix to minimize the problem is using an USB extension cable so the dongle is away from the interferences emitted by the power supply and the computer.</span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3aq4FV4ZQGo5TCeOZtP6hi-4zJTbL6nUsEFy82V7k18mGExwfFVR4KhQvHvf9a4glfNYq_P-3p1EB4J9zQoeElVGXEaT8RuY3Mr34CDPesxauY1KSXL0uqCu7BSKkz2Nwei1VVRGQjCkn9utnSiw61aZaWoCngKVURjOihAMhtrMyZuUHk2FBexPJU8i2/s4032/Ferrit.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="47" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3aq4FV4ZQGo5TCeOZtP6hi-4zJTbL6nUsEFy82V7k18mGExwfFVR4KhQvHvf9a4glfNYq_P-3p1EB4J9zQoeElVGXEaT8RuY3Mr34CDPesxauY1KSXL0uqCu7BSKkz2Nwei1VVRGQjCkn9utnSiw61aZaWoCngKVURjOihAMhtrMyZuUHk2FBexPJU8i2/w62-h47/Ferrit.jpeg" width="62" /></a></div></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">As a last measure I added a <a href="https://en.wikipedia.org/wiki/Ferrite_bead" target="_blank">ferrite bead</a> on the USB cable which also increased the reception range.</span></div><div><br /></div>
<div>
<b><span style="font-family: arial; font-size: x-large;">Install</span></b>
</div>
<div>
<span style="font-family: arial;">The application is very well documented, also
<a href="https://github.com/jvde-github/AIS-catcher#build-process" target="_blank">the install</a>, but this post will cover a simple install on a Raspberry Pi 3(RPi),
Bookworm Lite 64 bit, with a RTL-SDR,<a href="https://support.nooelec.com/hc/en-us/articles/360005889913-NESDR-Nano-Series" target="_blank">
Nano 3</a>, USB dongle.</span>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;">On a updated RPi, with hostname "</span><span style="font-family: courier; font-size: x-small;">test</span><span style="font-family: arial;">", run the following commands</span>
</div>
<div><br /></div>
<div>
<div>
<span style="font-family: courier; font-size: x-small;">sudo apt install librtlsdr-dev</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><br /></span>
</div>
<div><span style="font-family: arial;">*With GIT</span></div>
<div>
<span style="font-family: courier; font-size: x-small;">sudo apt-get install git make gcc g++ cmake pkg-config -y</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">git clone https://github.com/jvde-github/AIS-catcher.git</span>
</div>
<div><span style="font-family: courier; font-size: x-small;">*</span></div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">*Without GIT (=> Like this approach to do a minimal install. Pick
the
<a href="https://github.com/jvde-github/AIS-catcher/releases" target="_blank">latest</a>)</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><div>sudo apt-get install make gcc g++ cmake pkg-config -y</div>
<div>
wget
https://github.com/jvde-github/AIS-catcher/archive/refs/tags/v0.57.zip
</div>
<div>
unzip v0.57.zip && mv AIS-catcher-0.57 AIS-catcher
</div></span>
</div>
<div><span style="font-family: arial;">*</span></div>
<div style="text-align: left;">
<span style="font-family: courier; font-size: x-small;">cd AIS-catcher<br /></span><span style="font-family: courier; font-size: x-small;">mkdir build<br /></span><span style="font-family: courier; font-size: x-small;">cd build<br /></span><span style="font-family: courier; font-size: x-small;">cmake ..</span>
</div>
<div>
<span style="font-family: courier; font-size: xx-small;"><br /></span>
</div>
<div style="font-family: courier; font-size: xx-small; text-align: left; width: 550px;">
-- The C compiler identification is GNU 12.2.0<br />
-- The CXX compiler identification is GNU 12.2.0<br />
-- Detecting C compiler ABI info<br />
-- Detecting C compiler ABI info - done<br />
-- Check for working C compiler: /usr/bin/cc - skipped<br />
-- Detecting C compile features<br />
-- Detecting C compile features - done<br />
-- Detecting CXX compiler ABI info<br />
-- Detecting CXX compiler ABI info - done<br />
-- Check for working CXX compiler: /usr/bin/c++ - skipped<br />
-- Detecting CXX compile features<br />
-- Detecting CXX compile features - done<br />
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")<br />
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD<br />
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success<br />
-- Found Threads: TRUE<br />
-- Looking for linux/can.h<br />
-- Looking for linux/can.h - found<br />
-- Looking for linux/can/raw.h<br />
-- Looking for linux/can/raw.h - found<br />
-- NMEA2000: not found NMEA2000_LIB-NOTFOUND NMEA2000_INCLUDE-NOTFOUND<br />
-- Checking for module 'libusb-1.0'<br />
-- Found libusb-1.0, version 1.0.26<br />...<br />
-- Checking for module 'zlib'<br />
-- Found zlib, version 1.2.13<br />
-- ZLIB: found - /usr/include, /usr/lib/aarch64-linux-gnu/libz.so<br />...<br />
-- Checking for module 'librtlsdr'<br />
-- Found librtlsdr, version 0.6.0<br />
-- RTLSDR: found - /usr/include,
/usr/lib/aarch64-linux-gnu/librtlsdr.so<br />
-- Looking for rtlsdr_set_bias_tee<br />
-- Looking for rtlsdr_set_bias_tee - found<br />
-- RTLSDR: bias-tee support included.<br />
-- Looking for rtlsdr_set_tuner_bandwidth<br />
-- Looking for rtlsdr_set_tuner_bandwidth - found<br />
-- RTLSDR: tuner badwidth support included.<br />
</div>
<div style="font-family: courier; font-size: xx-small; text-align: left; width: 550px;">
...<br />
-- Configuring done<br />
-- Generating done<br />
-- Build files have been written to: /home/pi/AIS-catcher/build
</div>
<div style="font-family: courier; font-size: x-small; text-align: left; width: 400px;">
<br />
</div>
<div></div>
<div>
<span style="font-family: courier; font-size: x-small;">make </span><span style="font-family: arial;">(=> This took approx 10 minutes on a RPi 3)</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">sudo make install</span>
</div>
</div>
<div>
<b><span style="font-family: arial;"><br /></span></b>
</div>
<div>
<span style="font-family: arial;">Above we can see that the build generator found the dependency for
RTL-SDR. Test the install with</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><br /></span>
</div>
<div>
<div>
<span style="font-family: courier; font-size: xx-small;">pi@test:~/AIS-catcher/build $ AIS-catcher -l</span>
</div>
<div>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">AIS-catcher (build Feb 18 2024) v0.56-122-gf99160f8</span></span>
</p>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">(C) Copyright 2021-2023 jvde-github and other contributors</span></span>
</p>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">This is free software; see the source for copying conditions.There
is NO</span></span>
</p>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.</span></span>
</p>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">Found 1 device(s):</span></span>
</p>
</div>
<div>
<span style="font-family: courier; font-size: xx-small;">0: NooElec, NESDR Nano 3, SN: 5566669999</span>
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">
Check if you receive any data from the dongle with a connected antenna.
</div>
<div style="font-family: arial;"><br /></div>
<div>
<span style="font-family: courier; font-size: x-small;">AIS-catcher -v 10 -u 127.0.0.1 10110</span>
</div>
<div style="font-family: arial;"><br /></div>
<div>
<span style="font-family: arial;">"</span><span style="font-family: courier;"><span style="font-size: x-small;">-u 127.0.0.1 10110</span>" </span><span style="font-family: arial;">makes the application forward UDP messages to local host port
10110.</span><span style="font-family: courier; font-size: small;"> </span><span style="font-family: arial;">There is a built in WEB-server which you activate adding "</span><span style="font-family: courier; font-size: x-small;">-N 8100</span><span style="font-family: arial;">" where 8100 is the port number where you find the WEB
page. </span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">AIS-catcher -v 10 -u 127.0.0.1 10110 -N 8100</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">Use the below URL for a host "</span><span style="font-family: courier; font-size: x-small;">test</span><span style="font-family: arial;">".</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">http://test.local:8100</span>
</div>
<div><span style="font-family: arial;"> </span></div>
<div style="font-family: arial;">
To get distances to the AIS targets you have to tell the application where
you are so
</div>
</div>
<div style="font-family: arial;"><br /></div>
<div>
<span style="font-family: courier; font-size: x-small;">AIS-catcher -v 10 -u 127.0.0.1 10110 -N 8100 -N LAT 56.00 LON 12.00
SHARE_LOC on</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: x-large;"><b>Update</b></span>
</div>
<div>
<span style="font-family: arial;">It's almost the same as install. In your home directory "</span><span style="font-family: courier; font-size: x-small;">/home/pi</span><span style="font-family: arial;">"</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="background-color: white;"><span style="font-family: courier; font-size: x-small;">sudo apt update && sudo apt full-upgrade -y && sudo apt
clean</span></span>
</div>
<div>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span style="font-family: courier; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">rm v0* && </span><span style="font-variant-ligatures: no-common-ligatures;">master.zip && rm -rf </span><span style="font-variant-ligatures: no-common-ligatures;">AIS-catcher</span></span>
</p>
<div>
<span style="font-family: courier; font-size: x-small;">wget
https://github.com/jvde-github/AIS-catcher/archive/refs/tags/v0.57.zip</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">unzip v0.57.zip && mv AIS-catcher-0.57 AIS-catcher</span>
</div>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">cd AIS-catcher<br /></span><span style="font-family: courier; font-size: x-small;">mkdir build<br /></span><span style="font-family: courier; font-size: x-small;">cd build<br /></span><span style="font-family: courier; font-size: x-small;">cmake ..</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><div>
<span style="font-family: courier; font-size: x-small;">make</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;">sudo systemctl stop ais</span>
</p>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-variant-ligatures: normal;">sudo make install</span></span>
</p>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;">sudo systemctl start ais</span>
</p></span>
</div></span>
</div>
<div><br /></div>
<div>
<span style="font-family: arial; font-size: x-large;"><b>How to participate</b></span>
</div>
<div>
<span style="font-family: arial;">Here you can
<a href="https://github.com/jvde-github/AIS-catcher?tab=readme-ov-file#how-to-participate" target="_blank">read about how to participate</a>
and share your data. Just add "</span><span style="font-family: courier; font-size: x-small;">-X</span><span style="font-family: arial;">" to the command line</span>
</div>
<div><br /></div>
<div>
<span style="font-family: courier; font-size: x-small;">AIS-catcher -v 10 -u 127.0.0.1 10110 -N 8100 -N LAT 56.00 LON 12.00
SHARE_LOC on -X</span>
</div>
<div>
<span style="font-family: courier; font-size: small;"><br /></span>
</div><div><span style="font-family: arial; font-size: x-large;"><b>Signal K</b></span></div><div><span style="font-family: arial; font-size: small;">To source Signal K(SK), could also be OpenPlotter or OpenCPN, start AIS-catcher with command </span></div><div><span style="font-family: courier; font-size: small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;"><p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s2" style="font-variant-ligatures: no-common-ligatures;">AIS-catcher -o 0 -u 127.0.0.1 10110</span></p></span></div><div><span style="font-family: courier; font-size: small;"><br /></span></div><div><span style="font-family: arial; font-size: small;">"</span><span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;">-o 0</span><span style="font-family: arial;">" will suppress NMEA messages so they don't end up in the log. To receive the messages add a connection, in SK, with datatype "</span><span style="font-family: courier; font-size: x-small;">NMEA0183</span><span style="font-family: arial;">", Source "</span><span style="font-family: courier; font-size: x-small;">UDP</span><span style="font-family: arial;">", port "</span><span style="font-family: courier; font-size: x-small;">10110</span><span style="font-family: arial;">". </span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">To autostart AIS-catcher just use the info below and the command above.</span></div><div><span style="font-family: courier; font-size: small;"><br /></span></div>
<div>
<span style="font-family: arial; font-size: x-large;"><b>Autostart</b></span>
</div>
<div>
<span style="font-family: arial;">The recommended autostart is using <b>systemd</b>. Here is
<a href="https://github.com/jvde-github/AIS-catcher#running-as-a-service-on-ubuntu-and-raspberry-pi" target="_blank">info for a script</a>
that does the job but I did a simple one below.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div><span style="font-family: arial;">Create the servicefile</span></div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">sudo nano /etc/systemd/system/ais.service</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div><span style="font-family: arial;">and add the info </span></div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<div>
<span style="font-family: courier; font-size: x-small;">[Unit]</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">Description=AIS</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">After=syslog.target network-online.target</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">[Service]</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">Type=simple</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">User=root</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">ExecStart=/usr/local/bin/AIS-catcher -v 10 -u 127.0.0.1 10110 -N 8100
-N LAT 56.00 LON 12.00 SHARE_LOC on -X</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">Restart=on-failure</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">RestartSec=10</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">KillMode=process</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">[Install]</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">WantedBy=multi-user.target</span>
</div>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">and then to activate and check </span>
</div>
<div><br /></div>
<div>
<span style="font-family: courier; font-size: xx-small;"><div>pi@test:~ $ sudo systemctl daemon-reload</div>
<div>pi@test:~ $ sudo systemctl enable ais</div>
<div>
Created symlink /etc/systemd/system/multi-user.target.wants/ais.service
→ /etc/systemd/system/ais.service.
</div>
<div>pi@test:~ $ sudo systemctl start ais</div>
<div>pi@test:~ $ sudo systemctl status ais</div>
<div>● ais.service - AIS</div>
<div>
Loaded: loaded (/etc/systemd/system/ais.service;
enabled; preset: enabled)
</div>
<div>
Active: active (running) since Mon 2023-12-11
23:33:43 CET; 16s ago
</div>
<div> Main PID: 1473 (AIS-catcher)</div>
<div> Tasks: 5 (limit: 765)</div>
<div> CPU: 3.897s</div>
<div> CGroup: /system.slice/ais.service</div>
<div>
└─1473
/usr/local/bin/AIS-catcher -v 10 -u 127.0.0.1 10110 -u 127.0.0.1 10111
-N 8100 -N LAT 56.117 LON 12.603 SHARE_LOC on -X
</div>
<div><br /></div>
<div>
Dec 11 23:33:52 test AIS-catcher[1473]:
!AIVDM,1,1,,A,13=@ir01iE0ppftP8NLU6l1T0@NJ,0*39 ( MSG: 1, REPEAT: 0,
MMSI: 215233000, signalpower: -14.0567, ppm: 2.31481, timestamp:
20231211223351)
</div>
<div>
Dec 11 23:33:52 test AIS-catcher[1473]:
!AIVDM,1,1,,B,13u=7U003M0qW8HP65EL79gV0<0Q,0*1D ( MSG: 1, REPEAT: 0,
MMSI: 265504660, signalpower: -13.851, ppm: -2.02546, timestamp:
20231211223352)
</div>
<div>
Dec 11 23:33:54 test AIS-catcher[1473]:
!AIVDM,1,1,,A,1815=F@w1>PqA=lP7BqTuCu`0<13,0*74 ( MSG: 1, REPEAT:
0, MMSI: 538004825, signalpower: -3.77949, ppm: 1.44676, timestamp:
20231211223354)
</div>
<div>.....</div>
<div>.....</div></span>
</div>
<div><br /></div>
<div>
<b><span style="font-family: arial; font-size: x-large;">Watchdog</span></b>
</div>
<div>
<span style="font-family: arial;">To secure the running application you can
<a href="https://pysselilivet.blogspot.com/2021/10/raspberry-pi-watchdog-made-simple.html" rel="nofollow" target="_blank">apply a Watchdog</a>.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: x-large;"><b>Remarks</b></span>
</div>
<div>
<span style="font-family: arial;"><b>CPU Load</b></span>
</div>
<div>
<span style="font-family: arial;">Also did a test with a RPi Zero W, running the recommended RPi OS 32 bit
Bullseye, and it didn't perform as god as the mentioned
RPi3 with 64 bit Bookworm. This despite that I used
<a href="https://github.com/jvde-github/AIS-catcher#running-on-rpi-zero-w-and-other-devices-with-performance-limitations" target="_blank">option -F</a>
which really decreased the CPU load. The RPi 3 detected about 50% more AIS
targets. In
<a href="https://github.com/jvde-github/AIS-catcher/issues/211#issuecomment-1858916590" target="_blank">this comment</a>
there are some trix you can check.</span>
</div>
<div><br /></div>
<div>
<b><span style="font-family: arial;">Calibrate</span></b>
</div>
<div>
<span style="font-family: arial;">If you are using an older or cheaper SDR-RTL don't forget to
<a href="https://pysselilivet.blogspot.com/2019/08/sdr-calibrate-with-kalibrate-rtl.html" rel="nofollow" target="_blank">calibrate</a> ! </span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">Check out this info regarding </span><span style="background-color: white; caret-color: rgb(31, 35, 40);"><span style="font-family: arial;"><a href="https://github.com/jvde-github/AIS-catcher#frequency-shift-and-ppm" target="_blank">Frequency Shift</a>
which can help. So if the chart "</span><span style="font-family: courier; font-size: x-small;">Frequency Shift (avg PPM per hour)</span><span style="font-family: arial;">" is showing -2.5 test to use, in the command line, "-p -2.5" to
compensate the SDR-RTL:s deviation from the correct frequency.</span></span>
</div>
<div><br /></div>
<div>
<div>
<div>
<b><span style="font-family: arial; font-size: x-large;">Off line charts</span></b>
</div>
<div><b style="font-family: arial;">Version >=v0.57</b></div>
<div>
<span style="font-family: arial;">With <a href="https://github.com/jvde-github/AIS-catcher/issues/211#issuecomment-1860918421" target="_blank">tips from Jasper</a> the setup below will serve off-line tiles.</span>
</div>
<div>
<span style="font-family: arial;"><div style="font-family: Times;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="font-family: Times;">
<span style="font-family: arial;">If you have set up <b>systemd</b> as above, stop with
the commands</span>
</div>
<div style="font-family: Times;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="font-family: Times;">
<span style="background-color: white; font-family: courier; font-size: x-small;">sudo systemctl stop ais</span>
</div></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;"><b>webassets</b></span>
</div>
<div>
<span style="font-family: arial;">Showing off line charts, no Internet, also includes a setup where
relying online</span>
</div>
<div>
<span style="font-family: arial;">libraries are downloaded. </span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">Go to your home directory "</span><span style="font-family: courier; font-size: x-small;">/home/pi</span><span style="font-family: arial;">". Download and create the "</span><span style="font-family: courier; font-size: x-small;">webassets</span><span style="font-family: arial;">" directory. </span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">wget
https://github.com/jvde-github/webassets/archive/refs/heads/main.zip</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">unzip main.zip && mv webassets-main webassets</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">You will later add the CDN argument to the command line "</span><span style="font-family: courier; font-size: x-small;">CDN /home/pi/webassets</span><span style="font-family: arial;">"</span>
</div>
<div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;"><b>Charts</b></span>
</div>
<div>
<span style="font-family: arial;">I downloaded from <a href="https://ftp.gwdg.de/pub/misc/openstreetmap/openseamap/charts/mbtiles/" target="_blank">this FTP site </a> the charts for the Baltics.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="background-color: white; font-family: courier; font-size: x-small;">wget
https://ftp.gwdg.de/pub/misc/openstreetmap/openseamap/charts/mbtiles/OSM-OpenCPN2-Baltic.mbtiles</span>
</div>
</div>
<div><br /></div>
<div>
<span><div>
<span style="font-family: arial;"><b>Tile server</b></span>
</div>
<div>
<div>
<span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;"><span style="font-family: arial;">Install Node.js 20 =></span><span class="Apple-converted-space" style="font-family: courier; font-size: x-small;"> </span></span><span style="box-sizing: border-box; font-family: courier; font-size: x-small; text-underline-offset: 0.2rem;"><a href="https://github.com/nodesource/distributions#installation-instructions" style="box-sizing: border-box; text-underline-offset: 0.2rem;">https://github.com/nodesource/distributions#installation-instructions</a> </span><span style="font-family: arial;">and update npm to the latest</span></div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;">curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E
bash</span></p>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"></span>
</p>
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;">sudo apt install nodejs</span></p><p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span style="background-color: white;">sudo npm install -g npm@latest</span></p></span></div><div>
</div>
<div><span style="font-family: arial;"><br /></span></div><div>
<span style="font-family: arial;">Install the tile server which is needed serving the downloaded
charts,</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="background-color: white; font-family: courier; font-size: x-small;">sudo npm install -g tileserver-gl-light</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">Start the tile server with the downloaded charts</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="background-color: white; font-family: courier; font-size: x-small;">tileserver-gl-light OSM-OpenCPN2-Baltic.mbtiles</span>
</div>
</div></span>
</div>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;">Check the tile server function at "</span><span style="font-family: courier; font-size: x-small;">http://test.local:8080</span><span style="font-family: arial;">"</span>
</div>
<div>
<span style="font-family: courier; font-size: small;"><br /></span>
</div>
<div></div>
<div>
<span style="font-family: arial;"><b>Plugin config</b></span>
</div>
<div>
<span style="font-family: arial;">In a new terminal session create a file</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="background-color: white; font-family: courier; font-size: x-small;">nano offlinemaps.pjs</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div><span style="font-family: arial;">and add the following</span></div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<div>
<span style="font-family: courier; font-size: x-small;">// { "version": 2, "description": "offline openseamap", "author":
"jvde-github" }</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">addTileLayer("Offline OSM Baltic", new ol.layer.Tile({</span>
</div>
<div>
<span style="white-space: normal;"><span style="font-family: courier; font-size: x-small;"><span style="white-space: pre;"> </span>source: new
ol.source.XYZ({</span></span>
</div>
<div>
<span style="white-space: normal;"><span style="font-family: courier; font-size: x-small;"><span style="white-space: pre;"> </span>url:
'http://test.local:8080/data/OSM-OpenCPN2-Baltic/{z}/{x}/{y}.png',</span></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">attribution: '©',</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">subdomains: 'abcd',</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">maxZoom: 14,</span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">minZoom: 8</span>
</div>
<div>
<span style="white-space: normal;"><span style="font-family: courier; font-size: x-small;"><span style="white-space: pre;"> </span>})</span></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">}));</span>
</div>
</div>
<div><br /></div>
<div>
<b><span style="font-family: arial;">Test AIS-catcher</span></b>
</div>
<div></div>
<div>
<span style="font-family: arial;">Start the AIS application and check out the new chart.</span>
</div>
<div>
<span style="font-family: arial;"><div style="font-family: Times;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="font-family: Times;">
<span style="font-size: x-small;"><span style="font-family: courier;">AIS-catcher -v 10 -u 127.0.0.1 10110 -N 8100 -N LAT 56.00 LON
12.00 SHARE_LOC on -X </span><span style="font-family: courier;">CDN /home/pi/webassets PLUGIN /home/pi/offlinemaps.pjs</span></span>
</div>
<div style="font-family: Times;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="font-family: Times;">
<span style="font-family: arial;"><b>systemd</b></span>
</div>
<div style="font-family: Times;">
<span style="font-family: arial;">Edit the "</span><span style="font-family: courier; font-size: x-small;">ais.service</span><span style="font-family: arial;">" file with the above command and then </span>
</div>
<div style="font-family: Times;">
<span style="font-family: courier; font-size: small;"><br /></span>
</div>
<div style="font-family: Times;">
<p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span style="font-family: courier; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">sudo systemctl daemon-reload && </span><span style="font-variant-ligatures: no-common-ligatures;">sudo systemctl restart ais</span></span>
</p>
</div></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div><b style="font-family: arial;">systemd tileserver autostart</b></div>
<div><span style="font-family: arial;">Stop the 2 applications.</span></div>
<div><br /></div>
<div>
<div>
<span style="font-family: arial;">To autostart the tile server copy the "</span><span style="background-color: white; font-family: courier; font-size: x-small;">ais.service</span><span style="font-family: arial;">" file</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="background-color: white; font-family: courier; font-size: x-small;">sudo cp /etc/systemd/system/ais.service
/etc/systemd/system/tileserver.service</span>
</div>
<div><br /></div>
<div><span style="font-family: arial;">Edit with </span></div>
<div><br /></div>
<div>
<span style="background-color: white; font-family: courier; font-size: x-small;">sudo nano /etc/systemd/system/tileserver.service</span>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;">Below the line "</span><span style="background-color: white;"><span style="font-family: courier; font-size: x-small;">After=syslog.target network-online.target</span><span style="font-family: arial;">" add "</span><span style="font-family: courier; font-size: x-small;">Before=ais.service</span></span><span style="font-family: arial;">"</span>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;">and then change "</span><span style="background-color: white; font-family: courier; font-size: x-small;">ExecStart=.....</span><span style="font-family: arial;">" To "</span><span style="background-color: white; font-family: courier; font-size: x-small;">ExecStart=/usr/bin/tileserver-gl-light
/home/pi/OSM-OpenCPN2-Baltic.mbtiles</span><span style="font-family: arial;">"</span>
</div>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;">Start up the servers with</span>
</div>
</div>
<div><br /></div>
<div>
<span style="background-color: white; font-family: courier; font-size: x-small;">sudo systemctl daemon-reload</span>
</div>
<div>
<span style="font-family: courier; font-size: small;"><br /></span>
</div>
<div><span style="font-family: arial;">and then </span></div>
<div>
<span style="font-family: courier; font-size: small;"><br /></span>
</div>
<div>
<div>
<span style="background-color: white;"><span style="font-family: courier; font-size: x-small;">sudo systemctl enable tileserver && sudo systemctl
start tileserver</span>
</span>
</div>
<div>
<span style="background-color: white; font-family: courier; font-size: x-small;">sudo systemctl enable ais && sudo systemctl start ais</span>
</div>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;"><b>Older versions <= v0.56</b></span>
</div>
<div>
<span style="font-family: arial;">The file "</span><span style="background-color: white; font-family: courier; font-size: x-small;">nano offlinemaps.pjs</span><span style="font-family: arial;">" have a little different content for older versions.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;">addTileLayer("Offline OSM Baltic",L.tileLayer('</span><a href="http://test.local:8080/data/OSM-OpenCPN2-Baltic/%7Bz%7D/%7Bx%7D/%7By%7D.png" rel="nofollow" style="box-sizing: border-box; text-underline-offset: 0.2rem;">http://test.local:8080/data/OSM-OpenCPN2-Baltic/{z}/{x}/{y}.png</a><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;">', {</span><br style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328;" /><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;">attribution: '</span><span style="caret-color: rgb(31, 35, 40); color: #1f2328;">&copy;</span><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;">',</span><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;"><br /></span><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;">subdomains: 'abcd',</span><br style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328;" /><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;">maxZoom: 14,</span><br style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328;" /><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;">minZoom: 8</span><br style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328;" /><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328;">}));</span></span>
</div>
</div>
Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com2Helsingborg, Sweden56.0464674 12.694512155.433087679951427 11.5958792875 56.659847120048568 13.7931449125tag:blogger.com,1999:blog-2016632442552546592.post-42491626910801291142024-02-20T09:35:00.000+01:002024-03-03T22:46:10.668+01:00Clone the Raspberry boot disk<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Wbg2RQpVV8rZQiu8Tjjkev3ecLKvbsMKMS277Tw4-TrZV_VOjB5inkaUr6fp3TdhnZoASxbLGSGbpIw8VFXaSTBfIYyIs6YXCWyGiqhv8EhSZmKOaxyutgDf-AH6N6Iwjl74PdU38B2P/s1600/SD_reader.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="225" data-original-width="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Wbg2RQpVV8rZQiu8Tjjkev3ecLKvbsMKMS277Tw4-TrZV_VOjB5inkaUr6fp3TdhnZoASxbLGSGbpIw8VFXaSTBfIYyIs6YXCWyGiqhv8EhSZmKOaxyutgDf-AH6N6Iwjl74PdU38B2P/s1600/SD_reader.jpg" /></a>
</div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="background-color: lime;">Updated 2024-02-20 !</span></span><br />
<span face="arial, helvetica, sans-serif"><br /></span><span face="arial, helvetica, sans-serif">A very nice way to fix a backup is to make a copy, bootable, of the actual
SD card You are using on the Raspberry Pi(RPi). This will be done even when
the RPi is up and running !</span><br />
<span face="arial, helvetica, sans-serif"><br />This application can also be used to
<a href="https://pysselilivet.blogspot.com/2020/10/raspberry-pi-1-2-3-4-usb-ssd-boot.html" target="_blank">make a bootable SSD or USB drive !!</a></span></span>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">You clone from the command line so You don't need the standard GUI,
Pixel, and the "<a href="https://pysselilivet.blogspot.com/2017/11/rpi-clone-raspberry-boot-disk.html#clone_alt">SD card copier</a></span></span><span style="font-family: arial;">"</span><span style="font-family: arial;"> function.</span></div><div><span style="font-family: arial;">
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">It is also possible to set up a a scheduled job, cronjob explained
later, which for example makes a clone every night at 1 o'clock.</span><br />
<span face="arial, helvetica, sans-serif"></span><br /> </span><a name='more'></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: large;"><b>Check SD</b></span></span>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">You just need a USB SD card reader, with a SD Card, and then</span><span face="arial, helvetica, sans-serif"> You plug the SD Card reader into a free USB port on the RPi.</span><br />
<span face="arial, helvetica, sans-serif"></span><br />
<span face="arial, helvetica, sans-serif">Log on to the RPi and at a command line type</span></span><br />
<br />
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style>
<span style="background-color: #eeeeee; font-size: x-small;"><span style="background-color: transparent; font-family: courier; font-variant-ligatures: no-common-ligatures;">lsblk</span></span><br />
<br />
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Which checks if the SD Card is "accepted" and also which name
it's assigned to. Could be "</span><span style="background-color: #eeeeee;">sda</span><span face="arial, helvetica, sans-serif">", "</span><span style="background-color: #eeeeee;">sdb</span><span face="arial, helvetica, sans-serif">" ......</span><br />
<span face="arial, helvetica, sans-serif"><br /></span><span face="arial, helvetica, sans-serif">On Github You can find additional info about the application. For
example it handles that You are cloning from/to SD Cards with
different sizes.</span></span></div><div><span style="font-family: arial;">
<span face="arial, helvetica, sans-serif"><br /><span style="font-size: large;"><b>Install<br /></b></span>Run the script</span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span></span></div><div><span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">curl https://raw.githubusercontent.com/geerlingguy/rpi-clone/master/install | sudo bash</span></span></div><div><br /></div><div><span style="font-family: arial;">If you would like to run installation manually <a href="https://github.com/geerlingguy/rpi-clone?tab=readme-ov-file#install" target="_blank">check here</a>.</span></div><div><u><b><span face="arial, helvetica, sans-serif"><br /></span></b></u>
<b><span style="font-family: arial; font-size: large;">Manual clone </span></b><br /><span style="font-family: arial;">Execute the clone script with </span><br />
<br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">sudo rpi-clone sda -f</span><br />
<br />
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">(The USB could be assigned another name than "</span><span style="background-color: #eeeeee;">sda</span><span face="arial, helvetica, sans-serif">", so use the name You got earlier) </span><span face="arial, helvetica, sans-serif">and something like this will appear</span></span><br />
<br />
<div style="background-color: #eeeeee; text-align: left; width: 500px;">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Booted disk: mmcblk0 15.9GB
Destination disk: sda 15.9GB</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">---------------------------------------------------------------------------</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Part Size FS Label
Part Size FS
Label</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">1 /boot 43.5MB fat32 --
1 43.5MB fat32
--</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">2 root 15.9GB ext4 cpy_stretch 2
15.9GB ext4 --</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">---------------------------------------------------------------------------</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">== Initialize: IMAGE mmcblk0 partition table to sda - forced by option
==</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">1 /boot (21.5MB used)
: IMAGE to sda1 FSCK</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">2 root (2.0GB
used) : RESIZE(15.9GB) MKFS SYNC to sda2</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">---------------------------------------------------------------------------</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Run setup script : no</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Verbose mode : no</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">-----------------------:</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">** WARNING ** : All destination disk
sda data will be overwritten!</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">
: The partition structure will be imaged from
mmcblk0.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">-----------------------:</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">
</span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Initialize and clone to the destination disk sda? (yes/no):</span>
</div>
<br />
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Answer with</span> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">yes</span>
<span style="font-family: arial;">and type a label for the destination SD card</span><br />
<br />
<div style="background-color: #eeeeee; text-align: left; width: 500px;">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Optional destination ext type file system label (16 chars max):
XX</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Initializing</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> Imaging past the start of /boot partition 2.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> => dd if=/dev/mmcblk0 of=/dev/sda bs=1M count=50 ...</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> Resizing last partition to end of disk ...</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> Resize success.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> Changing destination Disk ID ...</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> Delaying so partprobe can update /dev entries ...</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> => fsck -p /dev/sda1 ...</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> => mkfs -t ext4 -L XX /dev/sda2 ...</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Syncing file systems (can take a long time)</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Syncing mounted partitions:</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> Mounting /dev/sda2 on /mnt/clone</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> => rsync // /mnt/clone with-root-excludes ...</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> Mounting /dev/sda1 on /mnt/clone/boot</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> => rsync /boot/ /mnt/clone/boot ...</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Editing /mnt/clone/boot/cmdline.txt PARTUUID to use dee316b8</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Editing /mnt/clone/etc/fstab PARTUUID to use dee316b8</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">===============================</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Done with clone to /dev/sda</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> Start - 12:06:06 End - 12:12:36
Elapsed Time - 6:30</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Cloned partitions are mounted on /mnt/clone for inspection or
customizing.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Hit Enter when ready to unmount the /dev/sda partitions ...</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> unmounting /mnt/clone/boot</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> unmounting /mnt/clone</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">
</span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">===============================</span>
</div>
<br />
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">In this case I cloned from/to 16 Gb SD Card with approx 2 Gb of
data.</span><br />
<span face="arial, helvetica, sans-serif"><br />Before you hit "Enter", to unmount, the destination can be
checked, in another terminal window, with </span></span>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;"><span><span><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;">ls -la<span class="Apple-converted-space"> </span>/mnt/clone</span>
</p></span></span>
</span></div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif" style="font-size: large;"><b>Automated clone</b></span><br /><span face="arial, helvetica, sans-serif">To add an automated setup, from a command line, type</span></span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">crontab -e</span><br />
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">If it's the first cronjob You are adding, something like this will
appear</span></span><br />
<br />
<div style="background-color: #eeeeee; text-align: left; width: 400px;">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">no crontab for pi - using an empty one</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Select an editor. To change later, run 'select-editor'.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> 1. /bin/ed</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> 2. /bin/nano <---- easiest</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> 3. /usr/bin/vim.tiny</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Choose 1-3 [2]: </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">
</span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">crontab: installing new crontab</span>
</div>
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">where You select the editor You want to use.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">On the last line add </span></span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">0 1 * * * sudo bash rpi-clone sda -q</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">and exit. </span><span face="arial, helvetica, sans-serif">This means that a new clone will be made every night at 1 o'clock</span></span>
</div>
<div><br /></div>
<div>
<span><span face="arial, helvetica, sans-serif"><div style="font-family: Times;"><span style="background-color: white; font-family: arial;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUmE1NueXWNXFsWMfx0hKRnqyn-xPneshuCp5KtY3EMMLtOwc3plegLyOEXvr5ugaukKlAiP4_k6Hct6JhZh2SQzOGIyIQKaHtxWS-rRTYkJ_vFbcim7Ogn_yi2hLNBaGYrigz34dykFq8/" style="clear: right; display: inline; float: right; margin-bottom: 1em; margin-left: 1em;"><img alt="" data-original-height="192" data-original-width="352" height="91" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUmE1NueXWNXFsWMfx0hKRnqyn-xPneshuCp5KtY3EMMLtOwc3plegLyOEXvr5ugaukKlAiP4_k6Hct6JhZh2SQzOGIyIQKaHtxWS-rRTYkJ_vFbcim7Ogn_yi2hLNBaGYrigz34dykFq8/w166-h91/Sk%25C3%25A4rmavbild+2021-11-10+kl.+18.56.06.png" width="166" /></a></span>
<span style="background-color: white; font-family: arial;"><span style="font-size: large;"><b id="clone_alt">Clone alternative</b></span></span>
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"></p>
<span style="font-family: arial;"><span style="background-color: white;">With GUI installed use</span> the standard
"Accessories => CD Card Copier" found in the RPi meny. (If you
don't use RPi OS lite) </span>
</div>
<div style="font-family: Times;">
<span style="font-family: arial;">If not installed ? </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt install piclone</span>
</div><div style="font-family: Times;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><br /></span></div><div style="font-family: arial;"><span style="background-color: white; font-size: large;"><b>Remark</b></span><span style="background-color: white;"> </span></div><div style="font-family: arial;"><span style="background-color: white;">On one of my RPi 4 I suddenly couldn't boot from SD-card and got the message, on the monitor, </span></div></span></span><br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">Failed to open device: ’sdcard’ (cmd 371a0010 status 1fff0001)</span><br /><div style="font-family: arial;"><span style="background-color: white;"><br /></span></div><span><span face="arial, helvetica, sans-serif"><div style="font-family: arial;"><span style="background-color: white;">Googled a little and found that this could happen when the </span><span style="background-color: white;">SD card slot broken. So how to fix it ? </span></div><div style="font-family: arial;"><span style="background-color: white;">I could do some soldering and exchange the broken slot but bought a fast USB 3 flash drive, cloned the SD card to the flash drive, inserted it in one of USB 3 ports and booted from that instead.</span></div></span></span>
</div>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style>
</div>
Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com38tag:blogger.com,1999:blog-2016632442552546592.post-40166646934260201592024-02-12T13:07:00.002+01:002024-03-03T11:20:56.874+01:00Waveshare CAN hat with Signal K & OpenPlotter<div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwsXhgmRFhiaOaBbBxuF6acR7jrxULBZTia_wRUDI3EQJqTAMCFdoOgvSAOr3ddCJNMbakZPs4dRGrStZ9PrL3Axw4DI9021z0Gm9mL5Y1fB2D_I9p1J_N3aWtzIuOeI4o7KURYjfg3FTB2YcPmePUFpmQ3JuMWmOq-14KtQdYu0WS_uWeg3CInN-VhA/s960/Waveshare_CAN.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="745" data-original-width="960" height="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwsXhgmRFhiaOaBbBxuF6acR7jrxULBZTia_wRUDI3EQJqTAMCFdoOgvSAOr3ddCJNMbakZPs4dRGrStZ9PrL3Axw4DI9021z0Gm9mL5Y1fB2D_I9p1J_N3aWtzIuOeI4o7KURYjfg3FTB2YcPmePUFpmQ3JuMWmOq-14KtQdYu0WS_uWeg3CInN-VhA/w208-h161/Waveshare_CAN.jpg" width="208" /></a></div></div></div><div style="text-align: left;"><span style="font-family: arial;"><span style="background-color: #04ff00;">Updated 2024-02-12</span></span></div><div style="text-align: left;"><span style="font-family: arial;"><br /></span></div><div style="text-align: left;"><span style="font-family: arial;">To get information from the NMEA 2000(N2K) network, to the RPi, I have been using </span><a href="https://actisense.com/products/ngt-1-nmea-2000-to-pc-interface/" style="caret-color: rgb(0, 0, 0); font-family: arial;" target="_blank">Actisense NGT-1</a><span style="font-family: arial;">, for a long time,</span><span style="font-family: arial;"> and later also the </span><a href="https://www.yachtd.com/products/wifi_gateway.html" style="caret-color: rgb(0, 0, 0); font-family: arial;" target="_blank">Yacht Devices YDWG 02</a><span style="font-family: arial;"> but now it was time for a Raspberry Pi(RPi) CAN hat(CH) from Waveshare(WS). WS have <a href="https://www.waveshare.com/catalogsearch/result/?q=can+hat" target="_blank">3 different models</a> but I picked the <a href="https://www.waveshare.com/2-ch-can-hat.htm" target="_blank">2 channel isolated one</a>.</span></div><div style="text-align: left;"><span style="font-family: arial;"><br />It's recommended to use an isolated one which also is demanded for those interfaces which can be approved by the N2K group.</span></div><div style="text-align: left;"><span style="font-family: arial;"><br /></span></div><span><span style="font-family: arial;"><a name='more'></a></span></span><div><span><span style="font-family: arial; font-size: x-large;"><b>Introduction</b></span></span></div><div><span><span style="font-family: arial;"><b>Wiki</b></span></span></div><div><span><span style="font-family: arial;">There is a very <a href="https://www.waveshare.com/wiki/2-CH_CAN_HAT" target="_blank">nice Wiki</a> for the hat but will do a short and simple install instruction here with updated info matching a connection to a N2K network.</span></span><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><b>Terminating resistors</b></span></div><div><span style="font-family: arial;">A N2K network have 2 terminating resistors at the end of the network. To confirm this, measure that you have around 60 Ohms between the white/blue, (CAN +/-, H/L), cables when no supply voltage is applied. If your network miss a terminator, and the CH is at the end of the network, you can set the jumper in ON position otherwise in OFF position. Check picture above.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><b>Logic level</b></span></div><div><span style="font-family: arial;">The RPi GPIO pins, connecting the CH, have a logic level of 3,3 VDC so place the jumper accordingly. </span><span style="font-family: arial;">Check picture above.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><b>Cabling</b></span></div><div><div><span style="font-family: arial;">Connect, CAN0, to a NMEA 2000/SeaTalk NG network with a standard cable</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><span style="white-space: pre;"> </span>CAN +/H<span style="white-space: pre;"> </span>=> White</span></div><div><span style="font-family: arial;"><span style="white-space: pre;"> </span>CAN -/L<span style="white-space: pre;"> </span>=> Blue</span></div><div><span style="font-family: arial;"><span style="white-space: pre;"> </span>Ground<span style="white-space: pre;"> </span>=> Black</span></div></div><div><div><span><span style="font-family: arial;"><br /></span></span></div><div><span><span style="font-family: arial; font-size: x-large;"><b>Installing</b></span></span></div><div><span><span style="font-family: arial;">Mount the CH to the RPi and power up.</span></span></div><div><span><span style="font-family: arial;"><a href="https://www.waveshare.com/wiki/2-CH_CAN_HAT#Enable_SPI_interface" target="_blank">Enable SPI</a> interface via "</span></span><span style="white-space: pre-wrap;"><span style="background-color: white; font-family: courier; font-size: x-small;">sudo raspi-config</span></span><span style="font-family: arial;">"</span></div><div><span style="font-family: arial;"><br /></span></div><div><span><span style="font-family: arial;">Add device configuration with</span></span><span style="font-family: arial;"> "</span><span style="background-color: white; font-family: courier; font-size: x-small;">sudo nano </span><span><span style="font-variant-ligatures: no-common-ligatures;"><span style="background-color: white; font-family: courier; font-size: x-small;">/boot/firmware/config.txt</span></span><span style="font-family: arial;">" </span></span></div><div><span style="font-size: xx-small;"><span><span style="font-family: arial;">(Before RPi OS Bookworm </span></span><span style="font-family: arial;">"</span><span style="background-color: white; font-family: courier;">sudo nano /boot/config.txt</span><span style="font-family: arial;">")</span></span></div><div><span><span style="font-family: arial;">and add </span></span></div><div><br /></div><div><span style="background-color: white; font-family: courier; font-size: x-small;"># Waveshare CAN hat</span></div><span style="background-color: white; font-family: courier; font-size: x-small;">dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=23<br /># dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=25</span><div><span><span style="font-family: arial;"><br /></span></span></div><div><span><span style="font-family: arial;">I'm just using one channel so the third row is just a comment.</span></span></div><div><span><span style="font-family: arial;">After a "</span><span style="background-color: white; font-family: courier; font-size: x-small;">sudo reboot now</span><span style="font-family: arial;">" check that the CH is recognized with</span></span></div><div><span><span style="font-family: arial;"> </span></span></div><div><span><span style="background-color: white; font-family: courier; font-size: x-small;">dmesg | grep spi</span></span></div><div><span><span style="font-family: arial;"><br /></span></span></div><div><span><span style="font-family: arial;">initialize the CH with </span></span></div><br /><span style="font-family: courier; font-size: x-small;"><span style="background-color: white;">sudo ip link set can0 up type can bitrate 250000<br />sudo ip link set can0 txqueuelen 65536</span><br /></span><br /><span style="font-family: arial;">Confirm with "</span><span style="background-color: white; font-family: courier; font-size: x-small;">ip link</span><span style="font-family: arial;">" </span></div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1OpIaMbwlbVFh-ReNcKhoLdfBpAFWpoN8cVuNugi9y1iQRIJbYVQbRiZ3gQ34FvMkaE_dNVu9kIZX3GmcQIlvbfwMNgyzv-nOhT6H9w-RpvHByNSWVDGQCUtAH0iVaWu27g_TUx593Wp_g-W96IdtUwNZ8R2pZPfLe_WX43aRz8jw02a9b0BgaAVXxpb2/s731/WS_can.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="731" data-original-width="684" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1OpIaMbwlbVFh-ReNcKhoLdfBpAFWpoN8cVuNugi9y1iQRIJbYVQbRiZ3gQ34FvMkaE_dNVu9kIZX3GmcQIlvbfwMNgyzv-nOhT6H9w-RpvHByNSWVDGQCUtAH0iVaWu27g_TUx593Wp_g-W96IdtUwNZ8R2pZPfLe_WX43aRz8jw02a9b0BgaAVXxpb2/w205-h220/WS_can.png" width="205" /></a></div><span style="font-family: arial; font-size: x-large;"><b>Testing</b></span></div><div><b style="font-family: arial;">OpenPlotter</b></div><div><span style="font-family: arial;">Just check the documentation at <a href="https://openplotter.readthedocs.io/en/latest/can/can_app.html" target="_blank">OpenPlotter</a>.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><b>Signal K</b></span></div><div><span style="font-family: arial;">In Signal K "Server => Data Connections => Add" and use info from the picture, end with clicking on "Apply", restart SK and then check with "Data Browser" if you succeeded.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">As seen in the picture a filter is added for PGN 130311 which is due to that I have a Tri-ducer which have a defect water temperature sensor.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><b>Other</b></span></div><div><span style="font-family: arial;">At the CH Wiki there are <a href="https://www.waveshare.com/wiki/2-CH_CAN_HAT#Testing" target="_blank">some other methods</a>.<br /></span><br /><span style="font-family: arial; font-size: x-large;"><b>Final settings</b></span></div><div><span style="font-family: arial;">To keep the settings at reboot we have to edit/create a file with "</span><span style="background-color: white; font-family: courier; font-size: x-small;">sudo nano /etc/network/interfaces.d/can0</span><span style="font-family: arial;">" </span><span style="font-family: arial;">and add the following</span></div><div><span style="font-family: arial;"><br /></span></div><div><div><span style="background-color: white; font-family: courier; font-size: x-small;">auto can0</span></div><div><span style="background-color: white; font-family: courier; font-size: x-small;">iface can0 can static</span></div><div><span style="background-color: white; font-family: courier; font-size: x-small;"><span style="white-space: pre;"> </span>bitrate 250000</span></div><div><span style="background-color: white; font-family: courier; font-size: x-small;"><span style="white-space: pre;"> </span>post-up /sbin/ip link set can0 txqueuelen 65536</span></div><br /><span style="font-family: arial;">Restart and check that it's working.</span><br /></div></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com0tag:blogger.com,1999:blog-2016632442552546592.post-56966115053553663422024-02-10T11:56:00.003+01:002024-02-24T18:27:27.789+01:00DMI forecast API for atmosphere, ocean and sea ice, free !<div>
<div class="separator" style="clear: both;"></div>
<div class="separator" style="clear: both;">
<span style="font-family: arial;"><div class="separator" style="clear: both;"><span style="font-family: arial;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivYZgmi9xrRKlUmLasbP3wxIz6QegPk3cPeLH_0Yrfogv6amlXEc4cKe6kUpyaAttnJe01J8IMb-Maz-oGUkON0bMWisaF3y9231PnB1ZKnlEVBA_Boht0-B5UnLhp_HpY9UhtvCGn5_0DhmrCOvoRaKHkBr-VzFJmSp3aveJNVf8J0SibUHio3NENEWaj/s871/DMI_forecast_1.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="871" data-original-width="564" height="267" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivYZgmi9xrRKlUmLasbP3wxIz6QegPk3cPeLH_0Yrfogv6amlXEc4cKe6kUpyaAttnJe01J8IMb-Maz-oGUkON0bMWisaF3y9231PnB1ZKnlEVBA_Boht0-B5UnLhp_HpY9UhtvCGn5_0DhmrCOvoRaKHkBr-VzFJmSp3aveJNVf8J0SibUHio3NENEWaj/w173-h267/DMI_forecast_1.png" width="173" /></a></div><span style="background-color: #04ff00;">Updated 2024-02-10<br /></span></span><span style="font-family: arial;"><span style="background-color: #04ff00;"><br /></span>DMI is the
<span style="background-color: white; caret-color: rgb(23, 43, 77);">Danish Meteorological Institute and the</span></span><span style="background-color: white; caret-color: rgb(23, 43, 77); font-family: arial;"> <a href="https://opendatadocs.dmi.govcloud.dk/en/DMIOpenData" target="_blank">Open Data API</a>
provides free and open access to DMI’s data.They are covering a pretty
big area
<a href="https://opendatadocs.dmi.govcloud.dk/Data/Forecast_Data_Wave_Model_WAM" target="_blank">not just Denmark</a>.</span></div></span>
</div>
</div>
<div>
<span style="background-color: white; caret-color: rgb(23, 43, 77); font-family: arial;"><br /></span>
</div>
<div>
<span style="background-color: white; font-family: arial;"><div style="caret-color: rgb(23, 43, 77); font-family: Times;">
<span style="font-family: arial;">I'm maintaining the weather station for
<a href="https://vader.domsten.nu" target="_blank">Domstens yacht club</a>
and have become really interested in weather "issues".</span>
</div>
<div style="caret-color: rgb(23, 43, 77); font-family: Times;">
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="caret-color: rgb(23, 43, 77);">The actual use case for me is that I have to change the mooring, of our
boat, if the water level exceeds 60 cm from normal.</span><span style="caret-color: rgb(23, 43, 77); font-family: arial;"> </span><span style="caret-color: rgb(23, 43, 77); font-family: arial;">For several years I have been searching for a free forecast API so I
can get an early warning when the water level rises.</span>
</div>
<div style="caret-color: rgb(23, 43, 77); font-family: Times;">
<span style="font-family: arial;"><br /></span>
</div>
<div style="caret-color: rgb(23, 43, 77); font-family: Times;">
<span style="font-family: arial;"><a href="https://pysselilivet.blogspot.com/2018/11/node-red-quick-install.html" rel="nofollow" target="_blank">Node-Red</a>
is used.</span>
</div>
<div style="caret-color: rgb(23, 43, 77); font-family: Times;"><br /></div></span>
</div>
<div>
<span><a name='more'></a></span>
</div>
<div>
<b style="font-size: xx-large;"><span style="font-family: arial;">Intro</span><br /></b><span style="font-family: arial;">I started to use
</span><a href="https://opendatadocs.dmi.govcloud.dk/APIs/Forecast_Data_STAC-API" style="font-family: arial;" target="_blank">DMI:s forecast data in GRIB1 format</a><span style="font-family: arial;">
and wrote
</span><a href="https://pysselilivet.blogspot.com/2022/09/grib-files-extracting-data-in-linux.html" style="font-family: arial;" target="_blank">this post</a><span style="font-family: arial;">
on how </span><span style="font-family: arial;">to unpack them in a Linux(Raspberry Pi) environment.<br /><br /></span></div><div>
</div>
<div>
<span style="font-family: arial;">It's a pretty awkward way if you just want the forecast for your selected
spot. Getting a forecast for 5 days I had to download 130 files and unpack
them !</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">Therefore its very nice that DMI, 2023-03, have released a
<a href="https://opendatadocs.dmi.govcloud.dk/APIs/Forecast_Data_EDR_API" target="_blank">forecast API</a>
which is very easy to handle. One http request will get the forecast for 5
days.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: x-large;"><b>How to</b></span>
</div>
<div>
<span style="font-family: arial; font-size: medium;"><b>User</b></span>
</div>
<div>
<span style="font-family: arial;">You have to
<a href="https://opendatadocs.dmi.govcloud.dk/Authentication" target="_blank">create a user and get an API key</a>. Create the account and then click on "API Gallery => forescastedr" and
get the API key.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">To check the granted API:s and keys go to "User => Applications =>
Default application => Subscriptions"</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: medium;"><b>Getting the data</b></span>
</div>
<div>
<span style="font-family: arial;">Here you can check out some r<a href="https://opendatadocs.dmi.govcloud.dk/en/APIs/Forecast_Data_EDR_API" target="_blank">equest examples</a>.</span>
</div>
<div>
<span style="font-family: arial;">Getting the forecast for <b>wind speed and direction</b>, at Domstens
harbour, is done with this URL</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-size: x-small;"><span style="font-family: courier;">https://dmigw.govcloud.dk/v1/forecastedr/collections/wam_dw/position?coords=POINT(12.6026
56.1159)&crs=crs84&parameter-name=wind-speed,wind-dir</span><span style="font-family: courier;">&f=GeoJSON</span><span style="font-family: courier;">&api-key=503a2d22.....</span></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">I'm using the
<a href="https://opendatadocs.dmi.govcloud.dk/Data/Forecast_Data_Wave_Model_WAM_EDR" target="_blank">"</a></span><span style="font-family: courier; font-size: x-small;"><a href="https://opendatadocs.dmi.govcloud.dk/Data/Forecast_Data_Wave_Model_WAM_EDR" target="_blank">wam_dw</a></span><span style="font-family: arial;"><a href="https://opendatadocs.dmi.govcloud.dk/Data/Forecast_Data_Wave_Model_WAM_EDR" target="_blank">" collection</a>
and the output is formated as "</span><span style="font-family: courier; font-size: x-small;">GeoJSON</span><span style="font-family: arial;">"</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">And then the URL for the <b>water level</b></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small;">https://dmigw.govcloud.dk/v1/forecastedr/collections/dkss_idw/position?coords=POINT(12.6026
56.1159)&crs=crs84&parameter-name=sea-mean-deviation&f=GeoJSON&api-key=503a2d22.....</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">where I used the
<a href="https://opendatadocs.dmi.govcloud.dk/Data/Forecast_Data_Storm_Surge_Model_DKSS_EDR" target="_blank">"</a></span><span style="font-family: courier; font-size: x-small;"><a href="https://opendatadocs.dmi.govcloud.dk/Data/Forecast_Data_Storm_Surge_Model_DKSS_EDR" target="_blank">dkss_idw</a></span><span style="font-family: arial;"><a href="https://opendatadocs.dmi.govcloud.dk/Data/Forecast_Data_Storm_Surge_Model_DKSS_EDR" target="_blank">" collection</a>.</span>
</div>
<div>
<span style="font-family: arial; font-size: medium;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: medium;"><b>Node-Red flow</b></span>
</div>
<div>
<span style="font-family: arial;">The flow below is used to get the charts shown above.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHwlC3OdlK4dub-qtOxOHDFOMjQg7k53f8aZasZ-qAL4FlgTzZ7gXl6OoBtQQhrTwB_xXiAgi5jqmFoKOeh1hP8PhGUrhT_Vc1lXn91Ajn2kXLV3Q4-C10phbG7SHSIBRPxbefS_q9CYMRmzZeMomio8a_OBkaOGeh8wmFbKDjqR07ZMvgDEB3TH4E4w/s903/DMI_forecast_2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="135" data-original-width="903" height="93" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHwlC3OdlK4dub-qtOxOHDFOMjQg7k53f8aZasZ-qAL4FlgTzZ7gXl6OoBtQQhrTwB_xXiAgi5jqmFoKOeh1hP8PhGUrhT_Vc1lXn91Ajn2kXLV3Q4-C10phbG7SHSIBRPxbefS_q9CYMRmzZeMomio8a_OBkaOGeh8wmFbKDjqR07ZMvgDEB3TH4E4w/w615-h93/DMI_forecast_2.png" width="615" /></a>
</div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">and
<a href="https://github.com/MatsA/node-red-DMI-API-forecast" target="_blank">here is the link</a>
to the application.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: medium;"><b>Send an "Early warning"</b></span>
</div>
<div>
<span style="font-family: arial;">When the forecast includes a water level greater than 60 cm a push message
is sent to my phone. For this I'm using the nice
<a href="https://pysselilivet.blogspot.com/2021/10/signl4-automated-alerting-with-free.html" target="_blank">SIGNL4 app</a>.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: x-large;"><b>Old flow</b></span>
</div>
<div>
<span style="font-family: arial;">To get the same result, </span><span style="font-family: arial;">using the mentioned GRIB files, the flow below illustrates the
complexity.</span>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCRRZUEy7cUYzwsaR6IoDQlE5mY5E92ZWtwmPVbVE3_r532PkTSfl8ZK9alnfbqH1EDdXfXRrtRJYD-mbhl3C_bkrkAdi0lZUYLp-atraHqh8lj88SGOSg8VwgloGzIVhbb_rVBl6YtxlX109hY3BHeKDXBk4Zi_VYJZe3aVTWb5qAw0B_n07g2FmW5Q/s1130/DMI_forecast_3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="688" data-original-width="1130" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCRRZUEy7cUYzwsaR6IoDQlE5mY5E92ZWtwmPVbVE3_r532PkTSfl8ZK9alnfbqH1EDdXfXRrtRJYD-mbhl3C_bkrkAdi0lZUYLp-atraHqh8lj88SGOSg8VwgloGzIVhbb_rVBl6YtxlX109hY3BHeKDXBk4Zi_VYJZe3aVTWb5qAw0B_n07g2FmW5Q/w496-h302/DMI_forecast_3.png" width="496" /></a>
</div>
<br />
</div>
Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com0tag:blogger.com,1999:blog-2016632442552546592.post-701964371295855252024-02-08T23:45:00.000+01:002024-02-24T18:24:29.846+01:00GRIB files and extracting data, Linux, Raspberry<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ-C3ZjD1UxE99Fvs1lUH--Qityxwld1uObQevmxdWpa5OTglNeeUo_HvYdeM9JW_n-fsYNAqzJx82LlvIFF-lflg_NYPGOHwclZLctmiJX1JwQLS3i2kCGiVKkVkXjzgZIoB4crF9HosTfqvr2iC0gJAmSOZoS5tb_njoB67D_OTZVryw9DKL4UJElg/s640/grib.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: arial;"><img border="0" data-original-height="334" data-original-width="640" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ-C3ZjD1UxE99Fvs1lUH--Qityxwld1uObQevmxdWpa5OTglNeeUo_HvYdeM9JW_n-fsYNAqzJx82LlvIFF-lflg_NYPGOHwclZLctmiJX1JwQLS3i2kCGiVKkVkXjzgZIoB4crF9HosTfqvr2iC0gJAmSOZoS5tb_njoB67D_OTZVryw9DKL4UJElg/s320/grib.png" width="320" /></span></a></div><div><span style="font-family: arial;"><span style="background-color: #04ff00;">Updated 2024-02-08</span></span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">GRIB is a <a href="https://en.wikipedia.org/wiki/GRIB" target="_blank">data format</a>, used for meteorology, to store historical and forecast weather data. </span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">The use case for me was analyzing forecast data, from GRIB files, so an early warning could be rised before a high water level or coming storm appears. This could then be used at our <a href="https://vader.domsten.nu/?theme=dark" target="_blank">weather site</a>.</span></div><div><br /></div><div><span style="font-family: arial;">There are <a href="https://en.wikipedia.org/wiki/GRIB#Applications" target="_blank">several applications</a>, also ones that visualizes the data, but this post will handle how to extract data from files using command line.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span><a name='more'></a></span><span style="font-family: arial; font-size: large;"><b>Intro</b></span></div><div><span style="font-family: arial;">After a lot of Googling and testing I finally implemented the <a href="https://confluence.ecmwf.int/display/ECC/ecCodes+Home" target="_blank">ecCodes package</a> from <a href="https://www.ecmwf.int" target="_blank">ECMWF</a>. ECMWF is the European Centre for Medium-Range Weather Forecasts.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial; font-size: large;"><b>Installation</b></span></div><div><span style="font-family: arial;">If you accept a little older version of the </span><a href="https://confluence.ecmwf.int/display/ECC/GRIB+tools" style="font-family: arial;" target="_blank">command line (CLI) toools for GRIB files</a><span style="font-family: arial;"> there are binaries available which can be installed with </span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt install libeccodes-tools</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">and then check with </span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">codes_info</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">If you must have the latest version <span style="background-color: white; caret-color: rgb(36, 41, 47); color: #24292f; white-space: pre-wrap;">you have to <a href="https://gist.github.com/MHBalsmeier/a01ad4e07ecf467c90fad2ac7719844a" target="_blank">install manually</a> from source.</span></span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial; font-size: large;"><b>CLI examples</b></span></div><span style="font-family: arial;"><div><span style="font-family: arial;"><b>Download file</b></span></div>To get some sample GRIB files I used the <a href="https://openskiron.org/en/cosmo-gribs" target="_blank">OpenSkiron</a> site and their forecast files. Just download on of the files clicking on it. Another way, using the "Copenhagen_......" file, check the URL and then use "wget" or "curl" to download it from command line </span><div><span style="font-family: arial;"><br /></span></div><div><span style="font-size: x-small;"><span style="font-family: courier;"><span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;">wget </span></span><span style="background-color: #eeeeee; font-family: courier; font-variant-ligatures: no-common-ligatures;">-O cph.grb2</span><span style="background-color: #eeeeee; font-family: courier; font-variant-ligatures: no-common-ligatures;"> https://openskiron.org/gribs_icon-d2/Copenhagen_ICON-D2_EWAM_YYYYMMDD-nn.grb2</span></span></div><div><span style="font-family: arial;"><span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;"><br /></span></span></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">curl -o cph.grb2 https://openskiron.org/gribs_icon-d2/Copenhagen_ICON-D2_EWAM_<span style="font-variant-ligatures: no-common-ligatures;">YYYYMMDD-nn</span>.grb2</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><b>Check ShortNames</b></span></div><div><span><p class="p1" style="font-family: arial; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">To check out the "Parameter ID" "ShortNames" use the "<a href="https://confluence.ecmwf.int/display/ECC/grib_ls" target="_blank">grib_ls</a>" command</p><p class="p1" style="font-family: Menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><br /></p><p class="p1" style="font-family: Menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;">grib_ls cph.grb2</span></p><p class="p1" style="font-family: Menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><br /></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;">another variant to minimize the output is </span></span></p><p class="p1" style="font-family: Menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-size: 11px; font-variant-ligatures: no-common-ligatures;"><span style="font-family: Menlo;">grib_ls -p shortName cph.grb2 | sort | uniq -c | sort -r</span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;">where "</span><span style="background-color: #eeeeee; font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;">-p shortName</span><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;">" selects just the "shortname" and you will get a sum of how many times each unique "ShortName" appears in the file.</span></span></p></span></div><div><div style="text-align: left;"><span style="font-family: arial;">To check what parameter ID:s are available, in the file, use the <a href="https://apps.ecmwf.int/codes/grib/param-db/" target="_blank">parameter database</a> and the "Search:" function.<br /></span><span style="font-family: arial;"><b><br /></b></span></div><div style="text-align: left;"><span style="font-family: arial;"><b>Extract data</b></span></div><div style="text-align: left;"><span style="font-family: arial;"><span>With the above use of "grib_ls" command you found that, for example, the "Parameter ID" => "<span style="font-variant-ligatures: no-common-ligatures;">VMAX_10M</span>", </span><span style="background-color: white;">Maximum wind velocity</span></span><span style="font-family: arial;"> and 2 meter temp, "2t", is available in the file. If you, like me 😎, live at </span><span style="font-family: arial;"><span style="font-variant-ligatures: no-common-ligatures;">latitude=56.12</span><span class="Apple-converted-space" style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">longitude=12.60 and are interested to check the forecast, use the command</span></span></div><div style="text-align: left;"><span style="font-family: arial;"><span style="font-variant-ligatures: no-common-ligatures;"><br /></span></span></div><div style="text-align: left;"><span style="font-family: courier; font-size: x-small;"><span style="font-variant-ligatures: no-common-ligatures;"><span style="background-color: #eeeeee;">grib_ls </span></span><span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;">cph.grb2</span><span style="font-variant-ligatures: no-common-ligatures;"><span style="background-color: #eeeeee;"> -l 56.12,12.60,1 -w shortName=VMAX</span></span><span style="background-color: #eeeeee;"><span>_</span><span style="font-variant-ligatures: no-common-ligatures;">10M</span><span style="font-variant-ligatures: no-common-ligatures;">/2t</span><span style="font-variant-ligatures: no-common-ligatures;"> -p</span></span><span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"> shortName,date,validityDate,validityTime</span></span></div><p style="text-align: left;"><span style="font-family: arial;">In my example it gave</span></p><div style="text-align: left;"><span style="font-family: courier; font-size: xx-small;"><span><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">cph.grb2</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">shortName <span class="Apple-converted-space"> </span>count <span class="Apple-converted-space"> </span>date<span class="Apple-converted-space"> </span>validityDate<span class="Apple-converted-space"> </span>validityTime <span class="Apple-converted-space"> </span>value<span class="Apple-converted-space"> </span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">2t<span class="Apple-converted-space"> </span>442 <span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>1200<span class="Apple-converted-space"> </span>284.783<span class="Apple-converted-space"> </span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">2t<span class="Apple-converted-space"> </span>443 <span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>1300<span class="Apple-converted-space"> </span>284.81 <span class="Apple-converted-space"> </span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">2t<span class="Apple-converted-space"> </span>444 <span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>1400<span class="Apple-converted-space"> </span>284.881<span class="Apple-converted-space"> </span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">2t<span class="Apple-converted-space"> </span>445 <span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>1500<span class="Apple-converted-space"> </span>284.972<span class="Apple-converted-space"> </span></span></p></span>...</span></div><div style="text-align: left;"><span style="font-family: courier; font-size: xx-small;">...</span></div><div style="text-align: left;"><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">VMAX_10M<span class="Apple-converted-space"> </span>683 <span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>20220930<span class="Apple-converted-space"> </span>1000<span class="Apple-converted-space"> </span>6.0198 <span class="Apple-converted-space"> </span></span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">VMAX_10M<span class="Apple-converted-space"> </span>684 <span class="Apple-converted-space"> </span>20220928<span class="Apple-converted-space"> </span>20220930<span class="Apple-converted-space"> </span>1100<span class="Apple-converted-space"> </span>6.04429<span class="Apple-converted-space"> </span></span></span></p><div><span style="font-family: courier; font-size: xx-small;"><span style="font-variant-ligatures: no-common-ligatures;">VMAX_10M</span><span class="Apple-converted-space" style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">685 </span><span class="Apple-converted-space" style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">20220928</span><span class="Apple-converted-space" style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">20220930</span><span class="Apple-converted-space" style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">1200</span><span class="Apple-converted-space" style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">6.1439</span><span class="Apple-converted-space" style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;"> </span></span></div><div><span style="font-family: courier; font-size: xx-small;"><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">98 of 685 messages in cph.grb2</span></p><p class="p2" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 13px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"></span><br /></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">98 of 685 total messages in 1 files</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">Input Point: latitude=56.12<span class="Apple-converted-space"> </span>longitude=12.60</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">Grid Point chosen #2 index=8662 latitude=56.12 longitude=12.60 distance=0.00 (Km)</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">Other grid Points</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">- 1 - index=8663 latitude=56.12 longitude=12.62 distance=1.24 (Km)</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">- 2 - index=8662 latitude=56.12 longitude=12.60 distance=0.00 (Km)</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">- 3 - index=8512 latitude=56.10 longitude=12.62 distance=2.55 (Km)</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">- 4 - index=8511 latitude=56.10 longitude=12.60 distance=2.22 (Km)</span></p></span></div></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><span><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial; font-variant-ligatures: normal;">which shows the forecast for wind, m/s, and temperature, Kelvin, some hours ahead.</span></span></p><p class="p1" style="font-family: Menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial; font-size: medium; font-variant-ligatures: normal;"><br /></span></span></p><p class="p1" style="font-family: Menlo; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial; font-variant-ligatures: normal;"><b><span style="font-size: large;">Wrap up</span></b></span></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;">This was a short intro to the CLI tools but there is a lot <a href="https://confluence.ecmwf.int/display/ECC/Training+material" target="_blank">more to learn</a> !</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: large;"><b>Remark</b></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;">In the above extract example it would have been natural to also extract the wind, but in most grib files the info is not reported as just wind and wind direction. The wind is instead reported as 2 vektors, <a href="https://confluence.ecmwf.int/pages/viewpage.action?pageId=133262398" target="_blank">component "u" and "v"</a>, which demands a little mathematics to decode. (Another <a href="http://colaweb.gmu.edu/dev/clim301/lectures/wind/wind-uv" target="_blank">explaination</a>). </span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;">In the above example file the wind vectors are reported as "10u" "10v" which is 10 meter "u" and "v" component. <a href="https://pysselilivet.blogspot.com/2022/11/calculate-wind-speeddirection-using-u.html" target="_blank">Here you find a post</a> that handles the math to give the wind speed/direction</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;">A way to avoid dealing with the wind vectors is using a GRIB source that have other parameters for wind. If you live in Europe you could use <a href="https://opendatadocs.dmi.govcloud.dk/APIs/Forecast_Data_STAC-API" target="_blank">DMI as a source</a>, the Wave Model (WAM), where they use the parameters "wind" and "dwi"(10 meter wind speed and direction).</span></p><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;"><br /></span></p></span></div></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com0tag:blogger.com,1999:blog-2016632442552546592.post-53168708796900559302024-02-07T16:00:00.027+01:002024-02-15T19:21:41.318+01:00Teltonika RUT 240 as source for Mesh Network or router<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSovC7-YMTP90nY8cxXMRwxWo72uw93B0FdsyR7AYeKYujwlv6Xs0xI5SJrAWTfFOkmeCJvoW3RoLiWnMCkf29zBgn_sYcZcU7yBIASOdlH-poP5kbQXpFi1Am4Z-sIErH7j3Ll1VWTLpJdhLitFptl0Rj17c0KpUfp-jDLaslUAbspiuZxjCJ_L_rRt99/s948/51LZSiP5RAL._AC_SL1000_.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: arial;"><img border="0" data-original-height="948" data-original-width="667" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSovC7-YMTP90nY8cxXMRwxWo72uw93B0FdsyR7AYeKYujwlv6Xs0xI5SJrAWTfFOkmeCJvoW3RoLiWnMCkf29zBgn_sYcZcU7yBIASOdlH-poP5kbQXpFi1Am4Z-sIErH7j3Ll1VWTLpJdhLitFptl0Rj17c0KpUfp-jDLaslUAbspiuZxjCJ_L_rRt99/w150-h213/51LZSiP5RAL._AC_SL1000_.jpg" width="150" /></span></a></div><span style="font-family: arial;">I have used the <a href="https://pysselilivet.blogspot.com/2020/10/tp-link-deco-9-software-update.html" rel="nofollow" target="_blank">TP-link Deco M9</a> for quite a while and it have worked very well.</span><p></p><p><span style="font-family: arial;">Since almost 2 years I have used mobile broadband as a source for the Mesh network, at home, via a</span><span style="font-family: arial;"> </span><a href="https://www.nokia.com/networks/fixed-networks/fastmile/4g-receiver/" style="font-family: arial;" target="_blank">Nokia Fastmile</a><span style="font-family: arial;">(NF) with no direct flaws.</span></p><p><span style="font-family: arial;">Getting a very nice offer, half the monthly cost, for mobile Internet from our mobile phone </span><span style="font-family: arial;">operator it was time to test something new.</span></p><p><span style="font-family: arial;">Since I probably will have to return the Nokia receiver quitting the old supplier I had to test the new provider with some other equipment. Running the <a href="https://pysselilivet.blogspot.com/2021/05/teltonika-router-rut-240-quick-setup.html" rel="nofollow" target="_blank">Teltonika RUT 240</a>(TR) in our yacht, in the summertime, it was available for testing.</span></p><span><a name='more'></a></span><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial; font-size: x-large;"><b>Intro</b></span></div><div><span style="font-family: arial;"><span>To source the mesh network, or a router, with internet connection you have to use <a href="https://en.wikipedia.org/wiki/Network_bridge" target="_blank">b</a></span><span><a href="https://en.wikipedia.org/wiki/Network_bridge" target="_blank">ridge</a> or passthrough mode. Choosing this mode will </span><span>inhibit functions in the TR.</span><span> </span></span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">The setup is referring to firmware >= </span><span style="font-family: arial;">"</span><span style="font-family: arial;">RUT2_R_00.07.xx.xx</span><span style="font-family: arial;">" and that an active SIM card is installed.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">The setup is simple but i took some time to Google since the most information is referring to the legacy firmware.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial; font-size: x-large;"><b>Setup</b></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis48QLCwNPULmcJFgZ6en5jQuHOzfhWyidd1b7IAa-uLRbJ-RvFgGUNqHukp2TjlL7sbN_ZtkmBu62s4unkk1DH8QPEqkj6TaoCxEaJF_2-5vcUjqxoqz2x0jw7Wx9nR2vB9h1FusWOmt4YV3_-M7V3kumUyaxug-Pc_e8UceEWWNnhuCMgj1mbalmcukv/s1015/RUT240_Bridge.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="591" data-original-width="1015" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis48QLCwNPULmcJFgZ6en5jQuHOzfhWyidd1b7IAa-uLRbJ-RvFgGUNqHukp2TjlL7sbN_ZtkmBu62s4unkk1DH8QPEqkj6TaoCxEaJF_2-5vcUjqxoqz2x0jw7Wx9nR2vB9h1FusWOmt4YV3_-M7V3kumUyaxug-Pc_e8UceEWWNnhuCMgj1mbalmcukv/s320/RUT240_Bridge.png" width="320" /></a></div><span style="font-family: arial;">Start with a <a href="https://wiki.teltonika-networks.com/view/RUT240_Device_Recovery_Options" target="_blank">factory reset</a>.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">The initial setup is described in this <a href="https://pysselilivet.blogspot.com/2021/05/teltonika-router-rut-240-quick-setup.html" rel="nofollow" target="_blank">post</a>, but after the logon, admin/admin01, to the TR skip the wizard.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">In the menu </span></div><div><span style="font-family: courier; font-size: x-small;"><span> </span>"<span style="background-color: white;">Network => WAN”</span></span></div><div><span><span style="background-color: white; font-family: courier; font-size: x-small;"><span> </span>Edit ”mob1s1a1” set ”Mode => Bridge”</span><br /></span><span style="font-family: arial;"><br />RT will restart and the setup is ready. Then connect the TR to the mesh network, or router, and test.</span></div><div><br /></div><div><span style="font-family: arial; font-size: x-large;"><b>Remark</b></span></div><div><span style="font-family: arial; font-size: medium;"><b>IP and DHCP</b></span></div><div><span style="font-family: arial;">Please note that the RT will by default, after the reset, use</span><span style="font-family: arial;"> IP adress 192.168.1.1. </span><span style="font-family: arial;">Maybe it's more suitable to change the default one to one within, </span><span style="font-family: arial;">not in the DHCP range,</span><span style="font-family: arial;"> the same IP range, subnet, your client is using.</span></div><div><span style="font-family: arial;"><br /></span></div><div><div><span style="font-family: arial;">In the menu </span></div><div><span style="font-family: courier; font-size: x-small;"><span> </span>"<span style="background-color: white;">Network => LAN”</span></span></div><div><span><span style="background-color: white; font-family: courier; font-size: x-small;"><span> </span>Edit ”lan” set ”IPv4address" </span><span style="background-color: white; font-family: arial;">and</span><span style="background-color: white; font-family: courier; font-size: x-small;"> "</span></span><span style="background-color: white; caret-color: rgb(51, 51, 51); color: #333333;"><span style="font-family: courier; font-size: x-small;">Enable DHCPv4 => off"</span></span></div></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial; font-size: medium;"><b>Minimize load</b></span></div><div><span style="font-family: arial;">Turn off services, for example WiFi, on the TR which you don't need.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial; font-size: medium;"><b>My setup</b></span></div><div><span style="font-family: arial;">In the picture below the "Nokia 4G Receiver" is replaced by the TR</span></div><div><span style="font-family: arial;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1z5A_QPQkrZ1d_LMQFALTkv68J3wFZUDwppH7jYDeaGSMRKLmDibFHRmas2i_Mkv5I2sekh-JgINouYmhsYdao6cXJrRRxRU6sFCV7O_nkyN5FIjaf43lcVwoYuFcst3-OXRuPL9nCqjQCBmeoqSCvKCEiMPKbZJktiikg2gQ8pDWm9nA3r4iIc_yg_Kp/s1277/DECO_Router_mode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="446" data-original-width="1277" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1z5A_QPQkrZ1d_LMQFALTkv68J3wFZUDwppH7jYDeaGSMRKLmDibFHRmas2i_Mkv5I2sekh-JgINouYmhsYdao6cXJrRRxRU6sFCV7O_nkyN5FIjaf43lcVwoYuFcst3-OXRuPL9nCqjQCBmeoqSCvKCEiMPKbZJktiikg2gQ8pDWm9nA3r4iIc_yg_Kp/w431-h151/DECO_Router_mode.png" width="431" /></a></div><br /><span style="font-family: arial;"><br /></span></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com0tag:blogger.com,1999:blog-2016632442552546592.post-27102722041193751292024-01-20T03:00:00.001+01:002024-03-23T11:08:32.104+01:00AIS reciever for Raspberry Pi, 2 channel<span style="font-family: arial;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg5hyphenhyphenY3PE8U1xD8bjfZVWNz-DCbfNZKw1wgmtOsh2SBi1xvXPDfSQF98Q9SfINkhE8tdIFP7PZniJ_KD4bhlq-xS-FyOgTWPSVhUWpd4DgdgjDwbpwfs1ZOcequ-XbJJAJlJNVNT83Qe0f/s425/RTL-SDR.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="425" data-original-width="425" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg5hyphenhyphenY3PE8U1xD8bjfZVWNz-DCbfNZKw1wgmtOsh2SBi1xvXPDfSQF98Q9SfINkhE8tdIFP7PZniJ_KD4bhlq-xS-FyOgTWPSVhUWpd4DgdgjDwbpwfs1ZOcequ-XbJJAJlJNVNT83Qe0f/w200-h200/RTL-SDR.jpg" width="200" /></a></div><span style="background-color: #04ff00;">Updated 2024-01-20 !! OK with Bookworm !!</span><br /> <br /> This post covers the setup for a AIS, <b>dual channel</b>, receiver for Raspberry Pi(RPi) with systemd autostart.</span><br /><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">I'm using the
<a href="https://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/" target="_blank">RTL-SDR dongle V3</a>
with almost zero temperature drift or the even better <a href="https://support.nooelec.com/hc/en-us/articles/360005889913-NESDR-Nano-Series" target="_blank">NooElec NESDR Nano 3</a></span></span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">AIS posts with charts/maps</span><br />
</span>
<ul>
<li>
<span style="font-family: arial;"><a href="https://pysselilivet.blogspot.com/2019/10/ais-receiver-with-openseamap.html" rel="nofollow" target="_blank">OpenSeaMap and dispatcher</a> </span></li>
<li>
<span style="font-family: arial;"><a href="https://pysselilivet.blogspot.com/2019/01/ais-for-raspberry-with-map-and.html" target="_blank">OpenStreetMap and dispatcher</a></span>
</li>
</ul>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Improve receiving range? Calibrate ! </span><a href="https://pysselilivet.blogspot.com/2019/08/sdr-calibrate-with-kalibrate-rtl.html" target="_blank">Instructions in this post</a><br />
<br />The best AIS application ? <a href="https://pysselilivet.blogspot.com/2023/12/ais-receiver-and-dispatcher-best.html" rel="nofollow" target="_blank">is found here</a> !</span></div><div><span style="font-family: arial;"><br /> </span><a name='more'></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Intro</b></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">The actual AIS software is </span><a href="https://github.com/dgiardini/rtl-ais" target="_blank">RTL-AIS</a><span face="arial, helvetica, sans-serif">
which connects to the dongle and outputs NMEA0183(N1) VDM
sentences. </span><span face="arial, helvetica, sans-serif">The setup is used in the NMEA WiFi </span><a href="https://pysselilivet.blogspot.com/2018/03/nmea-wifi-gateway.html" target="_blank">project</a><span face="arial, helvetica, sans-serif">.</span><br />
</span>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">If You want to start with a fresh Raspberry installation </span><a href="https://pysselilivet.blogspot.com/2017/02/rpi-raspbian-install-with-mac.html" target="_blank">here is a post</a><span face="arial, helvetica, sans-serif"> using Mac/PC/Linux.</span><br />
<br />
<span face="arial, helvetica, sans-serif">The fantastic </span><a href="http://sailoog.com/openplotter" target="_blank">OpenPlotter(OP) project</a><span face="arial, helvetica, sans-serif"> with guys </span><a href="http://forum.openmarine.net/member.php?action=profile&uid=25" target="_blank">Sailoog</a><span face="arial, helvetica, sans-serif">/</span><a href="http://forum.openmarine.net/member.php?action=profile&uid=84" target="_blank">e-sailing</a><span face="arial, helvetica, sans-serif"> have done a </span><a href="https://launchpad.net/~openplotter/+archive/ubuntu/openplotter/+packages" target="_blank">package</a><span face="arial, helvetica, sans-serif"> which is very easy to use. </span><span face="arial, helvetica, sans-serif">I really recommend the OP method, Installation A,</span><span face="arial, helvetica, sans-serif"> </span><span face="arial, helvetica, sans-serif">compared with installing from source. (If You are using OP use
the </span><span face="arial, helvetica, sans-serif">app "SDR VHF" instead)</span></span></div><div><br /></div><div><div><span style="font-family: arial;"><b>Warning !</b></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhORAUqySI6Qicq-dbLtUBKHnAmQdI4yAVq_nhPXZ1o1OSm9taAB4kfl6W0kxXQQh43zJrKB51hyphxvAPWZCwCJJjUW4f0Ca6wp9x17tD0o4e2Tm5mqusoaOKgWwd8supZY5g3ftpWEJLOcD7-bspR_AxJci-YfsIk5XQipIt9z2pblkuuUolZKFWmZOo5/s4032/Buck_conv.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="91" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhORAUqySI6Qicq-dbLtUBKHnAmQdI4yAVq_nhPXZ1o1OSm9taAB4kfl6W0kxXQQh43zJrKB51hyphxvAPWZCwCJJjUW4f0Ca6wp9x17tD0o4e2Tm5mqusoaOKgWwd8supZY5g3ftpWEJLOcD7-bspR_AxJci-YfsIk5XQipIt9z2pblkuuUolZKFWmZOo5/w68-h91/Buck_conv.jpeg" width="68" /></a></div></div><div><span style="font-family: arial;">I'm using this setup on our boat and are using a simple buck converter, 12V DC => 5V DC, to source the Raspberry Pi 4. In this case the converter was placed direct below the SDR and interfered so much that there was almost no reception. So check for a good power supply, away from the dongle, and shielding.</span></div><div><span style="font-family: arial;"><div><span style="font-family: arial;"><br /></span></div>Another trix to minimize the problem is using an USB extension cable so the dongle is away from the interferences emitted by the power supply and the computer.</span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3aq4FV4ZQGo5TCeOZtP6hi-4zJTbL6nUsEFy82V7k18mGExwfFVR4KhQvHvf9a4glfNYq_P-3p1EB4J9zQoeElVGXEaT8RuY3Mr34CDPesxauY1KSXL0uqCu7BSKkz2Nwei1VVRGQjCkn9utnSiw61aZaWoCngKVURjOihAMhtrMyZuUHk2FBexPJU8i2/s4032/Ferrit.jpeg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="47" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3aq4FV4ZQGo5TCeOZtP6hi-4zJTbL6nUsEFy82V7k18mGExwfFVR4KhQvHvf9a4glfNYq_P-3p1EB4J9zQoeElVGXEaT8RuY3Mr34CDPesxauY1KSXL0uqCu7BSKkz2Nwei1VVRGQjCkn9utnSiw61aZaWoCngKVURjOihAMhtrMyZuUHk2FBexPJU8i2/w62-h47/Ferrit.jpeg" width="62" /></a></div></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">As a last measure I added a <a href="https://en.wikipedia.org/wiki/Ferrite_bead" target="_blank">ferrite bead</a> on the USB cable which also increased the reception range.</span></div><div><br /></div><span face="arial, helvetica, sans-serif"><span style="font-family: arial; font-size: large;"><b>Installation</b></span></span>
<div><b style="font-family: arial;">Update OS</b></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">You must update cause there are bugs in older firmware. Open a terminal window/ssh and start with an update of the
OS and firmware</span></span><br />
<span style="font-family: menlo; font-size: 11px;"><br /></span><span style="font-family: courier; font-size: x-small;"><span style="background-color: #eeeeee;">$ </span><span style="background-color: #eeeeee;">sudo apt update && sudo apt full-upgrade -y && sudo apt
clean</span></span><br />
<br />
<span style="font-family: arial;"><span><b><span style="font-size: medium;">Installation A, from Openplotter package</span></b></span><br />
If you are running this variant of software and get an error "</span><span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">Segmentation fault</span></span><span style="font-family: arial;">" you must use the other, B, method!!</span></div><div><span style="font-family: arial;">
<span face="arial, helvetica, sans-serif"><br /></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Start with dependencies for RTL-AIS</span></span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">$ <span style="font-variant-ligatures: no-common-ligatures;">sudo apt install librtlsdr-dev libpthread-stubs0-dev</span></span></span><br />
<br />
<span style="font-family: arial;">Choose a
<a href="https://launchpad.net/~sailoog/+archive/ubuntu/openplotter/+sourcepub/11585432/+listing-archive-extra" target="_blank">package file</a>
for Your OS. For RPi "standard" <b>32 bit</b> download </span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ wget
https://launchpad.net/~sailoog/+archive/ubuntu/openplotter/+files/rtl-ais_0.4.2-stable_armhf.deb</span><br />
<div><br /></div>
<span style="font-family: arial;">and install</span><br />
<span face="arial, helvetica, sans-serif" style="font-size: 11px;"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo dpkg -i rtl-ais_0.4.2-stable_armhf.deb</span><br /></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">If running RPi <b>64 bit</b></span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ wget https://launchpad.net/~sailoog/+archive/ubuntu/openplotter/+files/rtl-ais_0.4.2-stable_arm64.deb</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">and install </span></div><br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo dpkg -i rtl-ais_0.4.2-stable_arm64.deb</span><br /><br /><div><span style="font-family: arial;">continue below with "</span><b style="font-family: arial;">Testing</b><span style="font-family: arial;">"</span><span style="font-family: arial;"><br /></span>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</div>
<span><b><span style="font-family: arial; font-size: medium;">Installation B, from source</span></b></span></div><div><span style="font-family: arial;">Start with dependencies for RTL-AIS</span><div class="p1">
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ <span style="font-variant-ligatures: no-common-ligatures;">sudo apt install librtlsdr-dev</span></span><br />
<br />
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><b>With GIT</b></span><br /><span face="arial, helvetica, sans-serif">If You don't have the GIT package install it with</span></span><br />
<br />
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Courier New'; color: #333333; background-color: #eeeeee}
span.s1 {font-kerning: none}
</style>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo apt <span style="font-variant-ligatures: no-common-ligatures;">install </span>git</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">Clone RTL-AIS from github</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: courier;"><span style="background-color: #eeeeee; font-size: x-small;">$ git clone https://github.com/dgiardini/rtl-ais</span><br /></span>
<br />
<span style="font-family: arial;"><b>Without GIT</b></span><br />
<span style="font-family: courier;"><span style="background-color: #eeeeee; font-size: x-small;">$ wget
https://github.com/dgiardini/rtl-ais/archive/master.zip</span><br />
<span style="background-color: #eeeeee; font-size: x-small;">$ unzip master.zip && </span><span style="background-color: #eeeeee; font-size: x-small;">mv rtl-ais-master </span><span style="background-color: #eeeeee; font-size: x-small;">rtl-ais</span></span><br />
<br /><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Then go to the created directory and compile</span></span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ cd rtl-ais</span><br /><span face="arial, helvetica, sans-serif"><br /></span></div><div class="p1"><span style="font-family: arial;"><span style="background-color: #04ff00;">Please note that there are a bug in Buster !</span> Check at <b>Buster</b> below</span></div><div class="p1"><span><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ make</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">Copy the program to the right place. </span><br />
<span face="arial, helvetica, sans-serif"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo cp rtl_ais /usr/bin</span><br />
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif" style="font-size: large;"><b>Testing</b></span><br /><span face="arial, helvetica, sans-serif">Connect the dongle to the RPi, and an antenna to the dongle, and
start the software with </span></span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ <span style="font-variant-ligatures: no-common-ligatures;">sudo rtl_ais -R on -n</span></span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">and something like this will appear with the VDM sentences at the
end</span><span face="arial, helvetica, sans-serif"><br /></span>
<br />
<div class="p2">
<div style="background-color: #eeeeee; text-align: left; width: 350px;">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Edge tuning disabled.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">DC filter enabled.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">RTL AGC enabled.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Internal AIS decoder enabled.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Buffer size: 163.84 mS</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Downsample factor: 64</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Low pass: 25000 Hz</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Output: 48000 Hz</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Found 1 device(s):</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> 0: NooElec, NESDR Nano 3, SN: XXXXXX</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Using device 0: Generic RTL2832U OEM</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Detached kernel driver</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Found Rafael Micro R820T tuner</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Log NMEA sentences to console ON</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">AIS data will be sent to 127.0.0.1 port 10110</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Tuner gain set to automatic.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">RTL AGC mode ON</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Tuned to 162000000 Hz.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Sampling at 1600000 S/s.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Allocating 12 zero-copy buffers</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">!AIVDM,1,1,,B,137KW60018PqU<bP6M2<?9iV08N=,0*7E</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">!AIVDM,1,1,,A,15V3Qh000I0qPQ8P7al=9bAf08Qf,0*6B</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">!AIVDM,1,1,,A,137KW60018PqU5DP6MQ<?ah00D1;,0*0B</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">
</span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">!AIVDM,1,1,,B,137KW60018PqTtFP6N6t?IhF086b,0*1A</span>
</div>
<br />
</div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Exit with Ctrl+C</span><br />
</span>
<div class="p1">
<span class="s1"><span class="Apple-converted-space" style="font-family: arial;"><br /></span></span>
</div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"></span>
<span face="arial, helvetica, sans-serif">As You see the N1 data is available as UDP data at port 10110</span><br />
<span face="arial, helvetica, sans-serif"><br /></span> </span><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">Clean up with</span> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><span style="font-variant-ligatures: no-common-ligatures;">rm -rf /home/pi/rtl-ais/ </span></span></span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">/home/pi/master.zip</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;"><b><span face="arial, helvetica, sans-serif" style="font-size: large;">Autostart with systemd</span></b><br /><span face="arial, helvetica, sans-serif">Autostart with
<a href="https://wiki.debian.org/systemd/" target="_blank">systemd</a>
will make the rtl-ais software start at boot and restart if it
fails.</span><br />
<span face="arial, helvetica, sans-serif">Create a file with</span></span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">$ sudo nano /etc/systemd/system/ais.service</span><br />
<br />
<span style="font-family: arial;">and add the following configuration</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">[Unit]</span><br />
<div class="p1">
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">Description=AIS</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">After=syslog.target network-online.target</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">[Service]</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">Type=simple</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">User=root</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">ExecStart=</span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">/usr/bin/</span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">rtl_ais -R on -n</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">Restart=on-failure</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">RestartSec=10</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">KillMode=process</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">[Install]</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">WantedBy=multi-user.target</span>
</div>
<div class="p1">
<span class="s1"><span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span></span>
</div>
<span style="font-family: arial;">(If you don't want to log the NMEA sentences remove the "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">-n</span><span style="font-family: arial;">" from the "</span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: small;">ExecStart</span><span style="font-family: arial;">" line above)</span></div><div class="p1"><span style="font-family: arial;">And then the following commands to get it up and running</span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">$ sudo systemctl daemon-reload</span><br />
<div class="p1">
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">$ sudo systemctl enable ais</span>
</div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">Created symlink
/etc/systemd/system/multi-user.target.wants/ais.service →
/etc/systemd/system/ais.service.</span>
</div>
<div class="p2">
<span style="background-color: #eeeeee; color: #333333; font-family: "courier new", courier, monospace; font-size: x-small;">$ sudo systemctl start ais</span>
</div>
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Check with the following command</span><span class="Apple-converted-space" face="arial, helvetica, sans-serif"> </span></span><br />
<div class="p2"><span class="s1"></span><br /></div>
<div class="p3">
<span class="s2" style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">$ sudo systemctl status ais</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">You will get something like this if You succeed</span><span class="Apple-converted-space" face="arial, helvetica, sans-serif"> </span></span>
</div>
<div class="p4">
<span class="s1"></span>
</div>
<br />
<div class="p1">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><span class="s1" style="color: lime;"><b style="background-color: #eeeeee;">●</b></span><span class="s2" style="background-color: #eeeeee;">
ais.service - AIS</span></span>
</div>
<div class="p1">
<span class="s2" style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>Loaded:
loaded (/etc/systemd/system/ais.service; enabled; vendor preset:
enabled)</span></span>
</div>
<div class="p1">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><span class="s2" style="background-color: #eeeeee;"><span class="Apple-converted-space"> </span>Active: </span><span class="s1" style="color: lime;"><b style="background-color: #eeeeee;">active (running)</b></span><span class="s2" style="background-color: #eeeeee;">
since Tue 2018-06-26 11:05:10 CEST; 41s ago</span></span>
</div>
<div class="p1">
<span class="s2" style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>Main PID: 1648
(rtl_ais)</span></span>
</div>
<div class="p1">
<span class="s2" style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>CGroup:
/system.slice/ais.service</span></span>
</div>
<div class="p1">
<span class="s2" style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>└─1648 /home/pi/rtl-ais/rtl_ais -p 0 -R on -n</span></span>
</div>
<div class="p1">
<span class="s2" style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;">Jun 26 11:05:22 Zest rtl_ais[1648]:
!AIVDM,1,1,,A,14`a0?001dPqOmHP6io<K9td08=9,0*01</span></span>
</div>
<div class="p1">
<span class="s2" style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;">Jun 26 11:05:28 Zest rtl_ais[1648]:
!AIVDM,1,1,,A,B3uK=1P0=h>H22`1l69VSweUkP06,0*6B</span></span>
</div>
<div class="p1">
<span class="s2" style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;">Jun 26 11:05:28 Zest rtl_ais[1648]:
!AIVDM,1,1,,A,13A4g<00000qhP4P3vLLS84p08@e,0*50</span></span>
</div>
<div class="p1">
<span class="s2" style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;">Jun 26 11:05:31 Zest rtl_ais[1648]:
!AIVDM,1,1,,B,14`a0?001ePqOd0P6ja<K9tv058D,0*18</span></span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">Jun 26 11:05:32 Zest rtl_ais[1648]:
!AIVDM,1,1,,B,402R3a447wP000r;6vP4fwG00l4;,0*6B</span>
</div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: 16px;"><br /></span>
<span style="font-family: arial;">If You have problems and would like to clean up, use the following
commands<span class="Apple-converted-space"> </span></span>
</div>
<div class="p1">
<span class="s1"><span class="Apple-converted-space"><br /></span></span>
</div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">$ sudo systemctl stop ais && </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">sudo systemctl disable ais</span>
</div>
<div class="p1">
<br />
</div>
<div class="p1">
<span class="s1"><span class="Apple-converted-space"></span></span>
</div>
<div class="p1">
<span style="font-family: arial; font-size: small;">and then delete the ”ais.service” file.</span>
</div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span>
</div>
<div class="p1">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT8jgUeiizhXBIib2T7vmPlHFLl5WJ2YRNC-Simju-NhQHkT2GX-aBTmyDy9ivkk64GPhUtBStpGs4ud2JZcEqR-pXpjWYZ4t0gituEsauYj3GfpYIxunLadaSCxDQ_3CmcOkzlZ3fAuEI/s1600/AIS_provider.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-size: large;"><img border="0" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT8jgUeiizhXBIib2T7vmPlHFLl5WJ2YRNC-Simju-NhQHkT2GX-aBTmyDy9ivkk64GPhUtBStpGs4ud2JZcEqR-pXpjWYZ4t0gituEsauYj3GfpYIxunLadaSCxDQ_3CmcOkzlZ3fAuEI/s200/AIS_provider.jpeg" width="200" /></span></a><span style="font-family: arial; font-size: large;"><b>SignalK(SK)</b></span>
</div>
<div class="p1">
<span style="font-family: arial;">If You are </span><a href="https://pysselilivet.blogspot.com/2018/03/nmea-wifi-gateway.html" style="font-family: arial;" target="_blank">using SK</a><span style="font-family: arial;">
and want to receive the N1 data? In the admin GUI go to ”Server =>
Data Providers”</span><span class="Apple-converted-space" style="font-family: arial;"> </span><span style="font-family: arial;">and add</span><span class="Apple-converted-space" style="font-family: arial;"> </span>
</div>
<div class="p1"></div>
<ul>
<li>
<span style="font-family: arial; font-size: small;">Input type: NMEA0183</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">ID: AIS</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">NMEA 0183 Source: UDP</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">Port: 10110</span></li></ul><div><span style="font-family: arial;">Restart SK and check.</span></div><div><span style="font-family: arial;"><br /></span></div><div class="p1">
</div>
<div class="p1">
<span style="font-family: arial; font-size: large;"><b>OpenCPN/OpenPlotter</b></span>
</div>
<div class="p1">
<span style="font-family: arial;">Connection for </span><a href="https://pysselilivet.blogspot.com/2018/03/nmea-wifi-gateway.html" style="font-family: arial;" target="_blank">OpenCPN</a>
</div>
<div class="p1"></div>
<ul>
<li>
<span style="font-family: arial; font-size: small;">Click the Options-icon</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">Connections-tab</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">Add Connection</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">Network</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">Protocol: UDP</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">Address: IP address of workstation (localhost)</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">DataPort: 10110</span>
</li>
<li>
<span style="font-family: arial; font-size: small;">Check “Show NMEA Debug Window” to see incoming messages.</span>
</li>
</ul>
<span style="font-family: arial;"><span style="font-size: large;"><b>Remarks</b></span><br /> </span>
<div class="p1">
<span style="font-family: arial;"><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
span.s1 {font: 11.0px Menlo; font-variant-ligatures: no-common-ligatures; color: #000000; background-color: #ffffff}
</style>
</span>
</div>
<div class="p1">
<span style="font-family: arial; font-size: small;">Inspiration to this setup has come from several places but
<a href="http://blog.videgro.net/2015/12/raspberry-pi-automatic-identification-system-ais-receiver/" target="_blank">this blog</a>
and
<a href="https://www.loose.info/an-inexpensive-dual-channel-ais-receiver/" target="_blank">this site</a> gave the best information.</span>
</div>
</div>
<span style="font-family: arial;"><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Times}
span.s1 {font-kerning: none}</style><br />
<span face="arial, helvetica, sans-serif">Many thanks to "<span style="background-color: white;">dgiardini" who is maintaining the software and helped me with the
Buster fix.</span></span></span><br />
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; min-height: 14.0px}</style><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; min-height: 14.0px}</style><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'}
</style>
</div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="background-color: white;"><br /></span></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="background-color: white; font-size: large;"><b>Buster</b></span></span></span></div><div><span><span face="arial, helvetica, sans-serif"><span><div class="p1" style="background-color: white;"><span style="font-family: arial;"><a href="https://github.com/dgiardini/rtl-ais/pull/15" target="_blank">Because of a bug</a> <span style="font-family: arial;">You have to edit the<span face="-webkit-standard"> </span></span></span><span style="font-family: arial;">"</span><span style="background-color: #eeeeee; font-size: x-small;"><span style="font-family: courier;">Makefile</span></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">", with </span><span face="arial, helvetica, sans-serif">"</span></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">nano <span>Makefile</span></span><span style="font-family: arial;">", and the line in the beginning</span><br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">LDFLAGS+=$(shell pkg-config --libs librtlsdr)</span></div><div class="p1" style="background-color: white; font-family: -webkit-standard;"><span style="font-family: arial;">or </span></div><div class="p1" style="background-color: white;"><span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">LDFLAGS+=-lpthread -lm -L /usr/lib/arm-linux-gnueabihf/ </span></span></div><div class="p1" style="background-color: white; font-family: -webkit-standard;"><span style="font-family: arial;"><br /></span></div><div class="p1" style="background-color: white; font-family: -webkit-standard;"><span style="font-family: arial;">should be changed to</span></div><div class="p1" style="background-color: white;"><span style="background-color: #eeeeee; color: #24292e; white-space: pre-wrap;"><span style="font-family: courier; font-size: x-small;">LDFLAGS+=-lpthread -lm -lrtlsdr -L /usr/lib/arm-linux-gnueabihf/</span></span></div><div class="p1"><br /></div><div class="p1"><span style="color: #24292e; white-space: pre-wrap;"><span style="background-color: #04ff00; font-family: arial;">Note !! </span></span></div><div class="p1"><span style="background-color: white;"><span style="font-family: arial;">If You did a "</span><span style="font-family: arial;">make</span><span style="font-family: arial;">" before the change of the Makefile do a "</span><span style="font-family: arial;"><span>make clean</span></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">" and then </span><span face="arial, helvetica, sans-serif">"</span></span><span style="font-family: arial;">make</span></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="background-color: white;">" </span><span style="background-color: white;">again.</span></span></span></div></span></span></span></div>
</div>
Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com16tag:blogger.com,1999:blog-2016632442552546592.post-7117086169482206132024-01-08T09:00:00.003+01:002024-01-10T12:13:50.903+01:00 Install Weather34 with WeatherLink, v2 API<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifJ5Tk_WSvzWD_fdhyphenhyphen4Yxb8Dini0jmetNzeOF2IsOKvm8s2R-_ei2nVLfFLmDS5D4EwFfg-fFczxEbkeopMl9OGhaAwX1mXIVc5rlUnIH7fCHAzlxvaOzGLnEGxtnNBGj3diLB0cD8muxZ/s1600/Ska%25CC%2588rmavbild+2019-03-31+kl.+19.23.07.png" style="clear: right; display: inline; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" data-original-height="867" data-original-width="1024" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifJ5Tk_WSvzWD_fdhyphenhyphen4Yxb8Dini0jmetNzeOF2IsOKvm8s2R-_ei2nVLfFLmDS5D4EwFfg-fFczxEbkeopMl9OGhaAwX1mXIVc5rlUnIH7fCHAzlxvaOzGLnEGxtnNBGj3diLB0cD8muxZ/w229-h193/Ska%25CC%2588rmavbild+2019-03-31+kl.+19.23.07.png" width="229" /></a><span style="font-family: arial;"></span></p><p><span style="font-family: arial;"><span style="background-color: #04ff00; font-family: arial;">Updated 2024-01-08 OK with Bookworm 64 bit, PHP 8.2 !</span></span></p><span style="font-family: arial;">This post is an <a href="https://pysselilivet.blogspot.com/2017/01/install-weather34-with-weatherlink.html" target="_blank">update from a former post</a> which handles on how to set up a <a href="https://vader.domsten.nu" target="_blank">weather WEB-site</a> with data from Davis Weather Link(WL) but here adapted to the latest WL API v2.</span><p></p><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">Any product that reports weather data to WL can be used as a source for this weather template.<br /><br /></span></span><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">T</span><span face="arial, helvetica, sans-serif">his is made </span><b><span style="font-size: medium;">without</span></b><span face="arial, helvetica, sans-serif"> additional software such as Cumulus, Weather display or the Meteobridge product.</span></span></span><div><br /></div><div><span style="font-family: arial;"><span><a name='more'></a></span></span><div><span style="clear: right; float: right; font-family: arial; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="741" data-original-width="1480" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJIXAXj6Z6FuYic5VzKbroNBC_pmZmwDvO6GoJWCPTA1QA0qSsR7OBnzb2_JiNQyUAk36M-vBsTEg8vMbNR6nfuzMoeDjyiNi14p8ZI_tvvWktrIOGzI_7THlDEIEaCVw88XTjU3Zkzc6e/s200/Node_red_dashboard.jpg" width="200" /></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="background-color: white; font-size: x-large;"><b><div><b>Intro</b></div></b></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">An example of a WeatherLink, v2 API, dashboard with Node-Red is </span><a href="https://pysselilivet.blogspot.com/2022/02/weatherlink-weather-template-api-v2.html" target="_blank">found here</a><span face="arial, helvetica, sans-serif">.</span><br /><br /><span face="arial, helvetica, sans-serif" style="background-color: white;">The template Weather34(W34) was built so it could get </span><span face="arial, helvetica, sans-serif">online</span><span face="arial, helvetica, sans-serif" style="background-color: white;"> data from different </span><span face="arial, helvetica, sans-serif">PWS</span><span face="arial, helvetica, sans-serif" style="background-color: white;"> solutions which should update their respective </span><span face="arial, helvetica, sans-serif">online</span><span face="arial, helvetica, sans-serif" style="background-color: white;"> files at the W34 web-server. In our case we pull JSON data direct from the WL site, via the <a href="https://weatherlink.github.io/v2-api/tutorial" target="_blank">WL V2 API</a>, </span></span><span style="background-color: white; font-family: arial;">and update an </span><span style="font-family: arial;">online</span><span style="background-color: white; font-family: arial;"> file, </span><a href="https://cumuluswiki.org/a/Realtime.txt" style="font-family: arial;" target="_blank">type "cumulus"</a><span style="background-color: white; font-family: arial;">, on the W34 web-server. </span></div><div><span style="background-color: white; font-family: arial;"><br /></span></div><div><span style="background-color: white; font-family: arial;">This post will cover an install on a Raspberry Pi but it could be any platform running a WEB server, </span><span style="background-color: white; font-family: arial;">Apache is used here, and PHP 8.x.</span></div><div><span style="background-color: white; font-family: arial;"><br /></span></div><div><span style="background-color: white; font-family: arial;"><div style="font-family: Times; font-stretch: normal; line-height: normal;"><span style="font-family: arial;"><b>Alternative</b></span></div><div style="font-family: Times; font-stretch: normal; line-height: normal;"><span style="font-family: arial;">An alternative, which Ken True recommends, is <a href="https://pwsdashboard.com" target="_blank">this weather dashboard</a> which also supports other hardware than Davis. But still I think the W34 GUI is the best.</span></div></span></div><div><u style="font-family: arial, helvetica, sans-serif;"><br /></u><span style="font-family: arial;"><span><b><span style="font-size: x-large;">Prerequisites</span></b></span><br /><span face="arial, helvetica, sans-serif">Before You start You must ensure that;</span><br /></span><ul style="text-align: left;"><li><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">You have a registered account at </span><a href="http://www.weatherlink.com/" target="_blank">Davis Weatherlinksite</a><span face="arial, helvetica, sans-serif">(WL)</span></span></li><ul><li><span style="font-family: arial;">PWS data is pushed to WL</span></li><li><span style="font-family: arial;">PWS data is retrieved from WL</span></li><li><span style="font-family: arial;">PWS data is forwarded to <a href="https://support.davisinstruments.com/article/w6ehvsemuv-how-do-i-share-my-data-with-weather-underground-noaa-globe" target="_blank">Weather Underground from WL</a></span></li><ul><li><span style="font-family: arial;">Register in WL "Manage devices => Share & Uploads"</span></li></ul></ul><li><span style="font-family: arial;">You have a registered account at <a href="https://www.wunderground.com/" target="_blank">Weather Underground</a>(WU)</span></li><ul><li><span style="font-family: arial;">Forecasts could be retrieved from WU</span></li><li><span style="font-family: arial;">PWS data is pushed to WU</span></li><li><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Historic PWS data </span>is retrieved from WU</span></li></ul></ul><span style="font-family: arial;"><span style="background-color: white;">Metar aviation weather data is used for "Current conditions" module 7.</span><br /></span><ul><li><span style="font-family: arial;">Register an account at <a href="https://www.checkwx.com/signup" target="_blank">Checkwx</a></span></li><ul><li><span style="font-family: arial;">Aviation weather data are retrieved from Checkwx</span></li></ul></ul><span><span style="background-color: white; font-family: arial;"><div><span><span style="font-family: arial;"><div style="font-family: -webkit-standard;"><span style="font-family: arial;">If you want a forecast alternativ to WU(English)</span></div><div style="font-family: -webkit-standard;"><ul><li><span style="font-family: arial;">Register an account at "pwsweather.com" </span><a href="https://pysselilivet.blogspot.com/2022/07/davis-pws-connected-to-pwsweather-and.html" style="font-family: arial;" target="_blank">Setup here</a>.</li><ul><li><span style="font-family: arial;">Free API also available</span></li></ul></ul></div></span></span></div><div><span><span style="font-family: arial;"><b>WL API key/secret</b></span></span></div><div>To access weather data from WeatherLink(WL) you have to get an <b>API key</b> and an <b>API Secret</b>. These are retrieved from the <a href="https://www.weatherlink.com/" target="_blank">DWL site</a> after You logged on.</div><div><span><span style="font-family: arial;"><b><br /></b></span></span></div><div><span><span style="font-family: arial;"><b>WU API key</b></span></span></div>If You are supplying WU with Your PWS data You will get a API key for <a href="https://docs.google.com/document/d/1eKCnKXI9xnoMGRRzOL1xPCBihNV2rOet08qpE_gArAY/edit" target="_blank">the new API </a>without cost. You can then get a 5 days forecast and historical data, day/month, which is supported with the W34 version issued 2019-05-21.</span><br /><span style="font-family: arial;"><br /><b>RPi OS</b><br /></span><span style="font-family: arial;">To start up <a href="https://pysselilivet.blogspot.com/2017/02/rpi-raspbian-install-with-mac.html" target="_blank">fresh on the RPi</a> You can follow the instructions <a href="http://pysselilivet.blogspot.com/2017/02/rpi-install-apachephp-web-server.html" target="_blank">here</a> where You install Apache2 and PHP 8.x with Raspberry Pi OS . </span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">You must have the "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">curl</span><span style="font-family: arial;">" module/extension installed !</span><br /></span><div style="background-color: white; font-stretch: normal; line-height: normal;"><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;"><b><br class="Apple-interchange-newline" />Dark Sky</b></span></span></div><div style="background-color: white; font-stretch: normal; line-height: normal;"><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;">The <a href="https://darksky.net/dev" target="_blank">Dark Sky(DS) api</a> is not available anymore so please skip all settings which refers to DS.</span></span></div><br /><span style="font-family: arial;"><b>Source and support</b></span><br /></span><div style="background-color: white; font-stretch: normal; line-height: normal;"><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;">The current version of W34 is supported by Ken True. There is a <a href="https://cumulus.hosiene.co.uk/viewforum.php?f=29" target="_blank">Forum</a>, and a <a href="https://github.com/ktrue/CU-HWS" target="_blank">GitHub repository</a>.</span></span></div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Installation</b></span><br /><span face="arial, helvetica, sans-serif" style="font-size: medium;"><b>Update RPi OS</b></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Installation is referring to a RPi with hostname </span><span face="arial, helvetica, sans-serif">"pws01".</span></span></div><div><span style="font-family: arial;">Logged on to RPi, via ssh/terminal, and user "pi", start with an OS update</span></div><div><span style="font-family: arial;"><br /></span></div><div><span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">sudo apt update && sudo apt full-upgrade -y && sudo apt clean</span></span><br /><span style="font-family: arial;"><br /></span></span></div><div><span><span style="font-family: arial; font-size: medium;"><b>Install W34</b></span></span></div><div><span><span style="font-family: arial;">After that download the W34 source to "pi" home folder</span></span></div><div><span face="arial, helvetica, sans-serif"></span><br /><div style="font-stretch: normal; line-height: normal;"><span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">wget https://github.com/ktrue/CU-HWS/archive/master.zip</span></span></div><br /><span face="arial, helvetica, sans-serif">(<span style="font-family: arial;">Another way, if Git is installed <i><b>on the RPi</b></i>, is</span></span><br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">git clone https://github.com/ktrue/CU-HWS.git</span><span face="arial, helvetica, sans-serif">)</span><br /><br /><span style="font-family: arial;">Unzip the file "</span><span style="background-color: #eeeeee; font-size: x-small;"><span style="font-family: courier;">unzip </span><span style="font-family: courier;">master.zip</span></span>"</div><div><br /><span style="font-family: arial;">Check that a folder with name "CU-HWS-master" is created and it contains several folders and files with the extension "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">.php</span><span style="font-family: arial;">". Delete the zip file, "</span><span style="font-size: x-small;"><span style="background-color: #eeeeee; font-family: courier;">rm </span><span style="background-color: #eeeeee; font-family: courier;">master.zip</span></span><span style="font-family: arial;">", and then create a new folder</span></div><div><br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">mkdir CU-HWS-master/add_on</span><br /><span style="font-family: arial; font-size: small;"><br /></span></div><div><span style="font-family: arial; font-size: medium;"><b>Install WL check and the pull application</b></span></div><div><span style="font-family: arial; font-size: small;">Download from <a href="https://github.com/MatsA/weatherlink-data-pull_v2" target="_blank">Github</a> the program that retrieves data from WL</span></div><div><span style="font-family: arial;"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">wget https://github.com/MatsA/weatherlink-data-pull_v2/archive/refs/heads/main.zip</span><br /><br /><span style="font-family: arial;">then unzip "</span><span style="font-size: x-small;"><span style="background-color: #eeeeee; font-family: courier;">unzip </span><span style="background-color: #eeeeee; font-family: courier;">main.zip</span></span><span style="font-family: arial;">" and delete the zip file "</span><span style="font-size: x-small;"><span style="background-color: #eeeeee; font-family: courier;">rm </span><span style="background-color: #eeeeee; font-family: courier;">main.zip</span></span><span style="font-family: arial;">".</span></div><div><span style="font-family: arial;"><br /></span><span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">Copy 4 files to the "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">add_on</span><span style="font-family: arial;">" folder</span></span><span style="font-family: arial; font-size: small;">(The online file</span><span style="font-family: arial;"> </span><span style="font-family: arial;">"realtime.txt" will be created by the program)</span></span><br /><br /><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">cp weatherlink-data-pull_v2-main/</span><span style="font-variant-ligatures: no-common-ligatures;">{cumulusdata.php,realtime.templ,wlauth.txt,wlcheck.php} ~/CU-HWS-master/add_on/</span></span></p></div><div><br /></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Move, and rename, the folder "CU-HWS-master" to the Apache document root with</span></span><br /><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo mv CU-HWS-master /var/www/html/pws</span><br /><div><br /><span><span style="font-family: arial; font-size: small;">The W34 application will change </span><span style="font-family: arial;">local files,</span><span style="font-family: arial; font-size: small;"> </span><span style="font-family: arial;">u</span><span style="font-family: arial;">pdates from WU, DS and WL,</span><span style="font-family: arial;"> and therefore we have to take care of authority.</span><span style="font-family: arial; font-size: small;"> The Apache servers default user/group is </span><span style="background-color: #eeeeee;"><span style="color: #222222; font-family: courier; font-size: x-small;">www-data</span></span><span style="font-family: arial;">, </span><span style="font-family: arial;">so the following command will handle this</span></span></div><div><span face="arial, helvetica, sans-serif"><br /></span></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo chown -R www-data:www-data /var/www/html/pws/</span></div><span face="arial, helvetica, sans-serif" style="background-color: white;"><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span></span><span style="background-color: white; font-family: arial; font-size: medium;"><b>Check access to WL</b></span></div><div><span style="background-color: white; font-family: arial;">With the app </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small; font-variant-ligatures: no-common-ligatures;">wlcheck.php</span><span style="background-color: white; font-family: arial;"> we are now going to check that we can retrieve data from WL.</span></div><div><span style="background-color: white; font-family: arial;"><br /></span></div><div><span style="background-color: white; font-family: arial;">Execute the app with </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">http://pws01/pws/add_on/wlcheck.php</span><span style="background-color: white; font-family: arial;"> in a WEB-browser.</span></div><div><span style="background-color: white; font-family: arial;"><br /></span></div><div><span style="font-family: arial;">This will show the content of file "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">wlauth.txt</span><span style="font-family: arial;">" which contains, an example, API key, API secret and Station ID in one record. The fields are separated with a comma(,).</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Use your credentials, key/secret, you got from the WL site and paste them into the file with </span></div><div><span style="background-color: white; font-family: arial;"><br /></span></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo nano /var/www/html/pws/add_on/wlauth.txt</span></div><div><span style="background-color: white; font-family: arial;"><br /></span></div><div><span style="background-color: white; font-family: arial;">(Don't change</span><span style="font-family: arial;"> the last field, Station ID)</span></div><div><span style="font-family: arial;">Verify the information, in the file, with the above URL.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Now we are going to check that the communication with the WL site is OK and also retrieve the Station ID. U</span><span style="font-family: arial;">se the following URL in the browser</span></div><div><div style="font-family: arial;"><br /></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">http://pws01/pws/add_on/wlcheck.php?data=stations</span></div><div style="font-family: arial;"><br /></div><div><span style="font-family: arial;">After executing the URL the application will retrieve your Station ID, from WL, <b>and</b> update the "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">wlauth.txt</span><span style="font-family: arial;">" file. The content of the file is shown at the last row. </span></div><div style="font-family: arial;"><br /></div><div style="font-family: arial;">No we can create the URL which will get current station data from WL. Execute the URL</div><div style="font-family: arial;"><br /></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">http://pws01/pws/add_on/wlcheck.php?data=current</span></div><div style="font-family: arial;"><br /></div><div style="font-family: arial;">And you will be shown a new URL which should be used in a new tab in your browser.</div></div><div><span style="background-color: white; font-family: arial;"><br /></span></div><div><span style="background-color: white; font-family: arial; font-size: medium;"><b>W34 setup</b></span></div><div><span style="background-color: white; font-family: arial;">Continue with the setup, URL</span><br /><span face="arial, helvetica, sans-serif" style="background-color: white;"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">http://pws01/pws/easyweathersetup.php</span><span face="arial, helvetica, sans-serif" style="background-color: white;"> <span style="font-family: arial;">No Password.</span></span><br /><span face="arial, helvetica, sans-serif" style="background-color: white;"><br /></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="background-color: white;">Set up the parameters for Your use case. </span></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="background-color: white;"> (Please don't use </span></span><a href="https://darksky.net/dev" style="font-family: arial;" target="_blank">Dark Sky</a><span style="font-family: arial;">(DS), mentioned as a forecast source, cause the service is soon terminated)</span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="background-color: white;"><br /></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="background-color: white;">I</span>n the section "Cumulus Software Path to Data file" choose </span><br /></span><ul><li><span style="font-family: arial;">"Data Type" => "cumulus" </span></li><li><span style="font-family: arial;">"Your Path to data file" => "add_on/realtime.txt" </span></li></ul><div><span style="font-family: arial;">To check that the application is getting data from WL, execute with </span></div><div><span face="arial, helvetica, sans-serif"><br /></span></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo php /var/www/html/pws/add_on/cumulusdata.php</span></div><div><span face="arial, helvetica, sans-serif"><br /></span></div><div><span style="font-family: arial;">and check in a WEB-browser </span></div><div><span face="arial, helvetica, sans-serif"><br /></span></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">http://pws01/pws/add_on/realtime.txt</span></div><div><span face="arial, helvetica, sans-serif"><br /></span></div><div><span style="font-family: arial;">or via ssh/terminal</span><br /><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">cat /var/www/html/pws/add_on/realtime.txt</span><br /><span face="arial, helvetica, sans-serif"><br /></span><span style="font-family: arial;">The date and time in the beginning of the file will tell if You succeed</span></div><div><span style="font-family: arial;"><br /></span></div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: small;">Add a crontab record, as user "pi", </span><span face="arial, helvetica, sans-serif">using, </span></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">crontab -e</span><br /><div class="p1"><div class="p1"><span style="font-family: times; font-size: small;"><br /></span></div><div class="p1"><span style="font-family: courier;"><span style="background-color: #eeeeee; font-size: x-small;">*/5 </span><span style="background-color: #eeeeee; font-size: x-small;">* * * * sudo php /var/www/html/pws/add_on/cumulusdata.php</span></span><br /><span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span><span><span style="font-family: arial; font-size: small;">This job will get the data, every 5 minutes, from WL and create/update the online file "</span><span face="arial, helvetica, sans-serif"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">realtime.txt</span><span style="font-family: arial;">"</span></span><br /></span></div><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><div class="p1"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span></div><div class="p1"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><span style="background-color: white; font-family: arial;">You can now check the application with URL</span><br /><span face="arial, helvetica, sans-serif" style="background-color: white;"><br /></span><span face="arial, helvetica, sans-serif" style="background-color: white;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">http://pws01/pws/</span></span></span></span></div><div class="p1"><br /></div></span></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">and confirm that everything is working OK</span></span><br /><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif" style="background-color: lime;">Avoiding cron job ? </span><span face="arial, helvetica, sans-serif" style="background-color: white;"> Check <a href="https://pysselilivet.blogspot.com/2019/04/weather34-weatherlink-without-cronjob.html" target="_blank">this</a></span></span><br /><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">Please note;</span></span><br /></span><div class="p1"><ul><li><span style="font-family: arial;">Trend values, temperature and pressure, DarkSky forecast and Last Hour Rain can take up to 2 hours before they are OK.</span></li><li><span style="font-family: arial;">Wind run, daily max wind, yesterday's rainfall, and some other data, will be correct after a day shift</span></li></ul></div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Update W34</b></span><br /><span face="arial, helvetica, sans-serif">When You update/replace W34 to a new version, save</span><br /></span><ul><li><span style="font-family: arial;">”settings1.php” file so You don't have to register all settings with "easyweathersetup.php" again. Allways run the "easyweathersetup.php" so a conversion could be done and check if there are new settings.</span></li><li><span style="font-family: arial;">"menu.php" file if You have added own Menu rows</span></li></ul><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Tips and tricks</b></span><br /></span><ul><li><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">If You have problem with the W34 application the built in diagnose feature could help. URL <a href="http://pws01/pws/diags.php?show=info" target="_blank">http://pws01/pws/diags.php?show=info</a></span></span></span></li><li><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">Show W34 settings with URL <a href="http://pws01/pws/diags.php?show=settings" target="_blank">http://pws01/pws/diags.php?show=settings</a></span></span></span></li><li><span><span style="font-family: arial;">If You don't like the translation You could edit the specific file in </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">/var/www/html/pws/languages/</span></span></li><li><span style="font-family: arial;">WL is updated, at the most, once every minute so it's no use to run the Cron job more often</span></li><li><span style="font-family: arial;">If You want to edit and change the W34 files, from Your Mac/PC, in the Apache server just add user "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">www-data</span><span style="font-family: arial;">" to Your Samba installation</span></li><li><span style="font-family: arial;"><span>Works with </span>Bullseye and PHP 8.x !</span></li></ul><div><span style="font-family: arial; font-size: medium;"><b>Several stations on the same WL account ? </b></span></div></div><div><span style="font-family: arial;">The URL "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">http://pws01/pws/add_on/wlcheck.php?data=stations</span><span style="font-family: arial;">" will retrieve the "first" station and store it in </span><span style="font-family: arial;">"</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">wlauth.txt</span><span style="font-family: arial;">". With several stations use the shown URL, execute it and check the generated json data to get the other stations. Then edit the file </span><span style="font-family: arial;">"</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">wlauth.txt</span><span style="font-family: arial;">" </span><span style="font-family: arial;">, manually, </span><span style="font-family: arial;">and update Station ID.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><div style="font-family: -webkit-standard;"><span style="font-family: arial;"><b>Sensor and data structure type !!</b></span></div><div style="font-family: -webkit-standard;"><span style="font-family: arial;">It could be that some of the data you are retrieving is missing due to that your source for the weather data is different than ours. (Vantage Pro2, sensor type 23, and data structure typ 2)</span></div><div>At <a href="https://weatherlink.github.io/v2-api/interactive-sensor-catalog" target="_blank">this link</a> you can check if there are any differences and if so you have to edit "cumulus data.php" and map to correct fields. In the source search for "Direct values".</div></span></div><div><br /></div><div><span style="font-family: arial; font-size: x-large;"><b>Remarks</b></span><span face="arial, helvetica, sans-serif"><u><b><br /></b></u></span><div><span style="font-family: arial; font-size: medium;"><b>WL accounts</b></span></div><div><span style="font-family: arial;">Please note that with the latest v2 API you will just get weather data, </span><span style="font-family: arial;"><a href="https://weatherlink.github.io/v2-api/data-permissions" target="_blank">with a free account</a>,</span><span style="font-family: arial;"> every <span style="font-size: medium;"><b>15 minutes</b></span>. The W34 application have a timeout, 300 seconds, where it sets the respective data window as "Offline". This could be changed editing the line </span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><div class="updatedtime"><span><?php if(file_exists($livedata)&&time()- filemtime($livedata)>300)echo $offline. ..........</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">where you change ">300" to ">1300", 22 minutes, in </span></div><div><ul style="text-align: left;"><li><span style="font-family: arial;">barometer.php</span></li><li><span style="font-family: arial;">rainfall.php</span></li><li><span style="font-family: arial;">temperature.php</span></li><li><span style="font-family: arial;">windspeeddirection.php</span></li></ul><div><span style="font-family: arial; font-size: medium;"><b>Rate Limits</b></span></div></div></div><div><span style="font-family: arial;">Doing tests it's possible that you exceed <a href="https://weatherlink.github.io/v2-api/rate-limits" target="_blank">the rate limits</a> of 300 API calls per hour, which will make that the "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">realtime.txt</span><span style="font-family: arial;">" file not </span><span style="font-family: arial;">will</span><span style="font-family: arial;"> be updated.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><b>Current conditions</b></span></div><div><span style="font-family: arial;"><span style="font-family: arial;"><span style="background-color: white;">Current conditions, "</span></span><span style="font-family: arial;">currentconditionsmetar34.php",</span><span style="background-color: white; font-family: arial;"> is now updated and don't have any </span><span style="background-color: white; caret-color: rgb(31, 35, 40); color: #1f2328; font-family: arial;">Dark Sky and hardware dependency.</span></span></div><div><br /></div></div><span style="font-family: arial;"></span></div></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com11tag:blogger.com,1999:blog-2016632442552546592.post-18746594678190727842024-01-07T10:32:00.002+01:002024-01-08T19:27:56.060+01:00RPi install Apache/PHP WEB-server<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinL6SKcVDe3gv4sSZrffkjOqQAkAD7zGq4UvFSvmG7g_Z02yfer8q1D7JcakWuI2S0rF7wh68cleQM-m3r94aVNM34l5yd7hW1zfGZv-kZUKu3-k5A35se87U4fyt-q0CzJi8yLFKRX6D0/s1600/Apache2.tiff" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinL6SKcVDe3gv4sSZrffkjOqQAkAD7zGq4UvFSvmG7g_Z02yfer8q1D7JcakWuI2S0rF7wh68cleQM-m3r94aVNM34l5yd7hW1zfGZv-kZUKu3-k5A35se87U4fyt-q0CzJi8yLFKRX6D0/s320/Apache2.tiff" width="215" /></a><span face=""arial" , "helvetica" , sans-serif"></span><span face=""arial" , "helvetica" , sans-serif"><span style="background-color: lime; font-family: arial;">Updated 2024-01-07 ! OK with Bookworm & PHP 8.2 !</span></span><br />
<span face=""arial" , "helvetica" , sans-serif"><span face=""arial" , "helvetica" , sans-serif"><br /></span></span>
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">As a part of one of my project, <a href="http://pysselilivet.blogspot.com/2017/01/install-weather34-with-weatherlink.html">the ultimate Weather site ? Weather34</a>, I needed a WEB-host with PHP.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif">I started up with a fresh
<a href="http://pysselilivet.blogspot.com/2017/02/rpi-raspbian-install-with-mac.html" target="_blank">Raspberry OS Lite SD Card</a> with
<a href="http://pysselilivet.blogspot.com/2016/11/samba-rpi-as-windows-file-server.html" target="_blank">Samba installed</a>.</span></span>
<div>
<span style="font-family: arial;"><br /><span face=""arial" , "helvetica" , sans-serif">Log on, with ssh/terminal to the RaspberryPi(RPi), </span></span><span style="font-family: arial;">in this case hostname "pws01",</span><span style="font-family: arial;"> and update the OS with</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; text-align: left; width: 200px;">
sudo apt update<br />
sudo apt full-upgrade -y<br />
sudo apt clean<br />
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">go on and install the Apache server with</span>
<div>
<span class="s1" style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><b><br /></b></span><span style="background-color: #eeeeee;"><span class="s2" style="font-family: courier; font-size: x-small;">sudo apt install apache2</span></span><br />
<div class="p1">
<br />
<a name='more'></a>
</div>
<div class="p1">
<span style="font-family: arial; font-size: x-large;"><b>Initial test setup</b></span>
</div>
<div class="p1">
<span style="font-family: arial;">Check that the Apache server works with a WEB-browser and
the URL</span>
</div>
<div class="p1">
<span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"><br /></span>
</div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">http://pws01/</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span style="font-family: arial;">And the default Apache2 page will show (See picture above)</span>
</div>
<div class="p1">
<span style="font-family: arial; font-size: small;"><br /></span>
</div>
<div class="p1">
<span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"><span style="font-family: arial;">Apache log files is available at</span> </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">/var/log/apache2</span><span face=""arial" , "helvetica" , sans-serif" style="font-size: small;">
<span style="font-family: arial;">and documentation at
<a href="http://httpd.apache.org/docs/current/" target="_blank">Apache.org</a></span></span>
</div>
<div class="p1">
<span style="font-family: arial;"><br />
<span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"></span></span>
</div>
<div class="p1">
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif" style="font-size: small;">Change permission, for the </span>default Apache user, <span face=""arial" , "helvetica" , sans-serif" style="font-size: small;">to change files within the </span>Apache document root with</span>
</div>
<div class="p1">
<br />
<div>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo chown -R www-data:www-data /var/www/html/</span>
</div>
</div>
<div class="p1">
<div class="p2"><br /></div>
<div class="p2">
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif" style="font-size: x-large;"><b><span>Install PHP</span><span> </span></b></span><span face=""arial" , "helvetica" , sans-serif"><br /></span><span face=""arial" , "helvetica" , sans-serif"><span face=""arial" , "helvetica" , sans-serif" style="font-size: medium;"><b>Remove old PHP ?</b></span></span></span>
</div>
<div class="p2">
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><span face=""arial" , "helvetica" , sans-serif">Maybe You already have an old PHP installation ? Remove it
with</span></span></span><br />
<br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt purge --autoremove '^php.*'</span><br /><br /><span style="font-family: arial;"><span style="font-size: medium;"><b>PHP on Raspberry Pi OS</b></span></span></div><div class="p2"><span style="font-family: arial;"><span>(Select PHP version by your self ? Use <b>PHP 8.1 hints</b> below.)</span></span></div>
<div class="p2">
<span style="font-family: arial;"><br /></span>
</div>
<div class="p2">
<span style="font-family: arial;">Install, standard package, with <br /><br /></span>
</div>
<div class="p2">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt install php libapache2-mod-php</span><br /><br />
</div>
<div class="p2">
<span style="font-family: arial;">Check the install</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span><span style="font-family: courier;"><span style="background-color: #eeeeee; font-size: x-small;">php -v </span></span><br />
<span face=""arial" , "helvetica" , sans-serif" style="background-color: white;"><br /></span>
<span style="background-color: white; font-family: arial;">And something like this will show</span><br />
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><br /></p><div style="background-color: #eeeeee; font-size: x-small; text-align: left; width: 400px;"><p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier;">PHP 8.2.7 (cli) (built: Jun<span class="Apple-converted-space"> </span>9 2023 19:37:27) (NTS)</span></span></p><p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier;">Copyright (c) The PHP Group</span></span></p><p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier;">Zend Engine v4.2.7, Copyright (c) Zend Technologies</span></span></p><p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier;"><span class="Apple-converted-space"> </span>with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies</span></span></p></div>
<div class="p2"><br /></div>
<div class="p2">
<span style="font-family: arial;">Curl is needed in many applications, including the mentioned
Weather34 project, so install
with </span>
</div>
<div class="p2"><br /></div>
<div class="p2">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span style="background-color: transparent; font-variant-ligatures: no-common-ligatures;">sudo apt install php-curl</span></span></div>
</div><div class="p2"><br /></div><div class="p2"><span style="font-family: arial;">To check installed modules use </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">php -m</span></div><div class="p2"><span style="font-family: arial;"><br /></span></div></div><div class="p1">
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif" style="font-size: x-large;"><b>PHP test in WEB-browser</b></span><br /><span face=""arial" , "helvetica" , sans-serif" style="font-size: medium;"><b>Without SAMBA</b></span><br />Jump to "Test" below</span>
</div>
<div class="p1">
<span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"><br /></span><span style="font-family: arial; font-size: medium;"><b>With SAMBA</b></span><br /></div><div class="p1"><span style="font-family: arial;">Samba is a fileserver application for Mac/Windows users and <a href="https://pysselilivet.blogspot.com/2016/11/samba-rpi-as-windows-file-server.html" target="_blank">here you find</a> installation instructions.</span></div><div class="p1"><span style="font-family: arial;"><br /></span></div><div class="p1"><span style="font-family: arial; font-size: small;">Create a Samba share for the default Apache document root which will
make it very simple to add and edit files on the RPi from Your Mac or
PC.</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">sudo nano /etc/samba/smb.conf</span></span><br />
<span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"><br /></span>
<span style="font-family: arial; font-size: small;">add this at the end of the file</span><br />
<span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"><br /></span>
<span style="font-family: courier;"><span style="background-color: #eeeeee; font-size: x-small;">[Apache_folder]</span><br />
<span style="background-color: #eeeeee; font-size: x-small;"> comment = Apache folders </span><br />
<span style="background-color: #eeeeee; font-size: x-small;"> read only = no</span><br />
<span style="background-color: #eeeeee; font-size: x-small;"> locking = no</span><br />
<span style="background-color: #eeeeee; font-size: x-small;"> path = /var/www/html/ </span><br />
<span style="background-color: #eeeeee; font-size: x-small;"> guest ok = no</span></span><br />
<div class="p1"><br /></div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif" style="font-variant-ligatures: no-common-ligatures;">and then add the default Apache user </span></span><span style="font-variant-ligatures: no-common-ligatures;"><br /></span>
<br />
<div class="p1">
<span style="font-family: courier; font-size: x-small;"><span style="background-color: #eeeeee;"><span class="s1"><span style="color: black;">$</span></span><span class="s2"> sudo smbpasswd -a </span></span><span style="background-color: #eeeeee;">www-data</span></span>
</div>
<div class="p1">
<span class="s2" style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">New SMB password:</span></span>
</div>
<div class="p1">
<span style="font-family: courier; font-size: x-small;"><span class="s2" style="background-color: #eeeeee;"><span>Retype new SMB password:</span></span><br />
<span><span class="s2" style="background-color: #eeeeee;"><span>Added user </span></span><span style="background-color: #eeeeee;">www-data</span><span style="background-color: #eeeeee;">.</span></span></span><br />
</div>
</div>
<div class="p1"><br /></div><div class="p1"><span style="font-family: arial; font-size: small;">Finish with a restart of the Samba server</span><br /><span class="s2" face=""arial" , "helvetica" , sans-serif"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span class="s2">sudo</span> systemctl restart smbd</span></div><div class="p1"><br /></div><div class="p1"><span style="font-family: arial; font-size: medium;"><b> Test </b></span><br /><span style="font-family: arial;">Create a file</span><span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"> <span style="font-family: arial;">with PHP code</span></span>
</div>
<div class="p1">
<div class="p1"><br /></div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo sh -c 'echo "<?php phpinfo(); ?>" >
/var/www/html/phpinfo.php'</span>
</div>
<div class="p1"><br /></div>
</div>
<div class="p1">
<span style="font-family: arial;">and then in Your browser use the URL</span>
</div>
<div class="p1">
<span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">http://pws01/phpinfo.php</span><br />
<span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"><br /></span><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif" style="font-size: small;">Information about PHP and the server will show.</span><br />
<br /><b><span style="font-size: medium;">Round up</span></b><br />
<span face=""arial" , "helvetica" , sans-serif">If there is a need for restarting, after a module install?, the Apache server use </span></span><br /><br />
<div style="line-height: normal;">
<span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">sudo service apache2 restart</span></span>
</div>
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span style="font-family: arial; font-size: small;">Now You can move on to install the
<a href="http://pysselilivet.blogspot.com/2017/01/install-weather34-with-weatherlink.html" target="_blank">Weather34 project</a>
or use the WEB-server to something else.</span><span face=""arial" , "helvetica" , sans-serif" style="font-size: small;"><br /></span>
</div>
<div class="p1">
<span style="font-family: arial; font-size: small;"><br /></span>
</div>
<div class="p1">
<span style="font-family: arial; font-size: medium;"><b>PHP 8.1 hints</b></span></div>
<div class="p1"><span style="background-color: white; font-family: courier; font-size: small;">$ sudo wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg</span></div></div></div></div><span style="background-color: white; font-family: courier; font-size: x-small;">$ echo "deb
https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list<br />$ sudo apt update && sudo apt
full-upgrade -y && sudo apt clean<br />$ sudo apt install php8.1
php8.1-curl libapache2-mod-php8.1<br />$ sudo systemctl restart apache2 <br />
Check => http://raspberrypi/<br />$ sudo sh -c 'echo "<?php phpinfo();
?>" > /var/www/html/phpinfo.php'<br />
Check => http://raspberrypi/phpinfo.php</span><br />
Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com2tag:blogger.com,1999:blog-2016632442552546592.post-63796909798001799172024-01-05T09:30:00.002+01:002024-03-04T18:10:39.357+01:00Samba, RPi as Windows file/print server<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD5jtSzylz_1RlcwO5pPS763FsRmt1ATJ8GPrbcXR4bjsXi1kCQLg625-jffIBXzw-R5OxrmgycVWhPRGn1gJpVKMAQpDmNGefp1lyjROAWbvSf6gtZNU9we6wppI1Zc8vQUdxNYGK0IsU/s1600/Homekit.tiff" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD5jtSzylz_1RlcwO5pPS763FsRmt1ATJ8GPrbcXR4bjsXi1kCQLg625-jffIBXzw-R5OxrmgycVWhPRGn1gJpVKMAQpDmNGefp1lyjROAWbvSf6gtZNU9we6wppI1Zc8vQUdxNYGK0IsU/s320/Homekit.tiff" width="320" /></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="background-color: lime;">Updated 2024-01-05 OK with Bookworm !</span></span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">If You want that the Raspberry Pi(RPi), shall appear in MS File Explorer or Mac
Finder, as a File server, the easiest way is to install Samba.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">This also makes it much easier if You want to edit files on the RPi with
editors from Your MS/Apple device. Or maybe moving files from/to the
RPi.</span></span><br />
<span face="arial, helvetica, sans-serif"></span><br />
<a name='more'></a><span style="font-family: arial;"><span style="font-size: x-large;"><b>Intro</b></span></span><div><span style="font-family: arial;">This setup can also be used when you want to <a href="https://pysselilivet.blogspot.com/2020/10/raspberry-and-external-storagedisk.html" target="_blank">share a RPi USB connected storage</a> in the network.</span></div><div><span style="font-family: arial;"><br /></span><div><span style="font-family: arial; font-size: x-large;"><b>Installing</b></span></div><div><span style="font-family: arial;">Log on to the RPi and update</span><div><span style="font-family: arial;"><br /></span></div><div><p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;"><span class="s1"><span style="color: black;">$</span></span><span class="s2"> </span>sudo apt update</span></span></p></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">then install Samba</span><br />
<span style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;"><span class="s1"><span style="color: black;"><br /></span></span></span></span>
<span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;"><span class="s1"><span style="color: black;">$</span></span><span class="s2"> sudo apt install samba</span></span></span><br />
<span style="font-family: times;"><br /></span>
<span style="font-family: arial;">Edit the Samba configuration file so that You have more than "Read Only"
rights.</span><br />
<div class="p1">
<br />
</div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span class="s1">$</span><span class="s2"> sudo nano /etc/samba/smb.conf</span></span>
</div>
<div class="p1">
<span class="s2"></span><br />
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Then find the following part</span><span> </span></span>
</div>
<div class="p1"><br /></div>
<div>
<div style="background-color: #eeeeee; width: 440px;">
<span style="font-size: x-small;"><div style="width: 440px;">
<div style="width: 440px;"><span style="font-family: courier;">
#======================= Share Definitions =======================
</span></div>
<div style="width: 440px;"><span style="font-family: courier;"><br /></span></div>
<div style="width: 440px;"><span style="font-family: courier;">
[homes]
</span></div>
<div style="width: 440px;">
<span style="font-family: courier;"><span> </span>comment = Home Directories
</span></div>
<div style="width: 440px;">
<span style="font-family: courier;"><span> </span>browseable = no
</span></div>
<div style="width: 440px;"><span style="font-family: courier;"><br /></span></div>
<div style="width: 440px;"><span style="font-family: courier;">
# By default, the home directories are exported read-only. Change the
</span></div>
<div style="width: 440px;"><span style="font-family: courier;">
# next parameter to 'no' if you want to be able to write to them.
</span></div>
<div style="width: 440px;"><span style="font-family: courier;"><br /></span></div>
<div style="width: 440px;">
<span style="font-family: courier;"><span> </span>read only = yes </span><span style="font-family: courier new, courier, monospace;">
</span></div>
</div></span>
</div>
<div><span style="font-family: arial;"><br /></span></div><div style="text-align: left;"><span style="font-family: arial;">so change to</span></div><div style="text-align: left;"><span class="s2"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><br /></span></span></div><div style="text-align: left;"><span class="s2"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">read only = no<br /></span></span><span class="s2"><span style="font-family: arial;"><br /></span></span></div><div style="text-align: left;"><span class="s2"><span style="font-family: arial; font-size: x-large;"><b>Printserver</b></span></span></div><div style="text-align: left;"><span class="s2"><span style="font-family: arial;">If you are planning to use the <a href="https://pysselilivet.blogspot.com/2020/10/raspberry-print-server-windowsapple.html" target="_blank">RPi as a print server</a> find the following
part </span> </span></div>
</div>
<div class="p1" style="text-align: left;">
</div>
<div class="p1" style="text-align: left;">
</div>
<br />
<div style="background-color: #eeeeee; text-align: left; width: 440px;">
<span style="font-size: x-small;"><div style="text-align: left; width: 440px;"><span style="font-family: courier;">
# Windows clients look for this share name as a source of downloadable
</span></div>
<div style="width: 440px;"><span style="font-family: courier;"># printer drivers</span></div><div style="width: 440px;"><span style="font-family: courier;"><br /></span></div>
<div style="width: 440px;"><span style="font-family: courier;">[print$]</span></div>
<div style="width: 440px;"><span style="font-family: courier;"> comment = Printer Drivers</span></div>
<div style="width: 440px;"><span style="font-family: courier;"> path = /var/lib/samba/printers</span></div>
<div style="width: 440px;"><span style="font-family: courier;"> browseable = yes</span></div>
<div style="width: 440px;"><span style="font-family: courier;"> read only = yes</span></div>
<div style="width: 440px;"><span style="font-family: courier;"> guest ok = no</span></div>
</span>
</div>
<div><br /></div>
<div><span style="font-family: arial;">and change to</span></div>
<br />
<div class="p1">
<div style="background-color: #eeeeee; width: 100px;">
<span style="font-size: x-small;"><div style="width: 440px;">
<div style="width: 440px;">
<span style="font-family: courier; font-size: x-small;"><div style="width: 440px;">read only = yes</div>
<div style="width: 440px;">guest ok = yes</div></span></div></div></span></div><div style="text-align: left;"><span class="s2"><span style="font-family: arial; font-size: small; font-variant-ligatures: normal;"><br /></span></span></div><div style="text-align: left;"><span class="s2"><span style="font-family: arial; font-size: small; font-variant-ligatures: normal;">and then save the file.<br /></span></span><span class="s2"><span face="arial, helvetica, sans-serif" style="font-variant-ligatures: normal;"><span style="font-family: arial;"><br /></span></span></span></div><div style="text-align: left;"><span class="s2"><span face="arial, helvetica, sans-serif" style="font-variant-ligatures: normal;"><span style="font-family: arial; font-size: x-large;"><b>Add user</b></span></span></span></div><div style="text-align: left;"><span class="s2"><span face="arial, helvetica, sans-serif" style="font-variant-ligatures: normal;"><span style="font-family: arial;">If you intend to use an existing RPi/Linux user, maybe "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">pi</span><span style="font-family: arial;">"?, just use the following command to add </span></span></span><span style="font-family: arial;">"</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">pi</span><span style="font-family: arial;">" as a Samba user and set a password (The command "</span><span style="background-color: #eeeeee; font-family: courier; font-size: small;">smbpasswd</span><span style="background-color: white; font-family: arial;">" has been replaced by "</span><span style="background-color: #eeeeee; font-family: courier; font-size: small;">pdbedit</span><span style="background-color: white; font-family: arial;">")</span></div><div style="text-align: left;"><span style="background-color: white; font-family: arial;"><br /></span></div>
</div>
<span><span style="background-color: white; font-family: arial;">
</span><div style="background-color: #eeeeee; text-align: left; width: 250px;">
<span style="font-family: courier; font-size: x-small;">
$ sudo pdbedit -a pi
</span>
</div>
<div style="background-color: #eeeeee; width: 250px;"><span style="font-family: courier; font-size: x-small;">new SMB password:
</span>
</div>
<div style="background-color: #eeeeee; width: 250px;"><span style="font-family: courier; font-size: x-small;">retype new SMB password:
</span>
</div>
<div style="background-color: #eeeeee; width: 250px;"><span style="font-family: courier; font-size: x-small;">............</span></div></span><span face="arial, helvetica, sans-serif" style="background-color: white;"><div>
<span face="arial, helvetica, sans-serif" style="background-color: white;"><br /></span>
</div><span style="font-family: arial;">
Restart the Samba service</span></span><div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><span class="s3"><br /></span></span>
</div>
<div class="p1">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span class="s3">$</span><span class="s2"> sudo</span> systemctl
restart smbd</span><br />
<span class="s2" face="arial, helvetica, sans-serif"><br /></span>
<span class="s2"></span><span style="font-family: arial;"><span class="s2" face="arial, helvetica, sans-serif">and now You should be up and running and the pi home folder should be
shared</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">The picture above is from a Mac browsing a <a href="http://pysselilivet.blogspot.com/2016/11/homekit-z-wave-telldus-live.html" target="_blank">RPi running Homebridge and 2 plugin</a></span>
</span></div>
<span><span face="arial, helvetica, sans-serif"><div style="font-family: arial;"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span></span></div><div style="font-family: arial;"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: medium;"><b>Other user commands</b></span></span></div><div><span><span face="arial, helvetica, sans-serif"><p style="font-stretch: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;">List the Samba users </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo pdbedit -L</span></span></p><p style="font-stretch: normal; line-height: normal; margin: 0px;"><span style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;">Delete Samba user </span><span style="font-family: Menlo; font-size: 11px;"> </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo </span></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">pdbedit -x<span> pi</span></span></p></span></span></div><div style="font-family: arial;"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span></span></div><b style="font-family: arial;"><span style="font-size: x-large;">Apache share</span></b><br /></span>
<span style="font-family: arial;">The RPi is also running an
<a href="https://pysselilivet.blogspot.com/2017/02/rpi-install-apachephp-web-server.html" target="_blank">Apache server</a>
and therefore I wanted to share its default folder. </span><span style="font-family: arial;">Adding the following to the configuration file</span></span><br />
<div>
<span style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</div>
<div>
<span style="font-family: courier; font-size: x-small; font-variant-ligatures: no-common-ligatures;"><div style="background-color: #eeeeee; font-variant-ligatures: normal; width: 250px;">
[Apache_folder]
</div>
<div style="background-color: #eeeeee; font-variant-ligatures: normal; width: 250px;">
comment = Apache folders
</div>
<div style="background-color: #eeeeee; font-variant-ligatures: normal; width: 250px;">
read only = no
</div>
<div style="background-color: #eeeeee; font-variant-ligatures: normal; width: 250px;">
locking = no
</div>
<div style="background-color: #eeeeee; font-variant-ligatures: normal; width: 250px;">
path = /var/www/html/
</div>
<div style="background-color: #eeeeee; font-variant-ligatures: normal; width: 250px;">
guest ok = no
</div></span>
</div>
<div>
<span style="font-variant-ligatures: no-common-ligatures;"><br /></span>
<span style="font-family: arial; font-variant-ligatures: no-common-ligatures;">And adding the default Apache user </span><br />
<div class="p1"><br /></div>
</div>
<span face="arial, helvetica, sans-serif">
<div>
<span style="font-family: courier; font-size: x-small;"><div style="background-color: #eeeeee; width: 250px;">
$ sudo pdbedit -a www-data</div>
<div style="background-color: #eeeeee; width: 250px;">
New SMB password:
</div>
<div style="background-color: #eeeeee; width: 250px;">
Retype new SMB password:
</div>
<div style="background-color: #eeeeee; width: 250px;">
Added user www-data.
</div>
<div style="background-color: #eeeeee; width: 250px;">
$ sudo systemctl restart smbd</div></span></div></span><span face="arial, helvetica, sans-serif"><span><div style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="font-family: arial;"><br /></span></span></div><span style="font-family: arial;">This makes it easy to edit the files if You log on to the RPi, from Your Mac/PC,
with the "</span></span> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">www-data</span><span face="arial, helvetica, sans-serif">" <span style="font-family: arial;">user.</span></span></div></div></div></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com2tag:blogger.com,1999:blog-2016632442552546592.post-18872188924740721102024-01-03T09:00:00.000+01:002024-01-11T20:03:38.185+01:00SeaTalk1 to NMEA 0183 converter, DIY<div class="separator"></div>
<div style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;">
<img border="0" data-original-height="434" data-original-width="651" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQjfLZKVM_1dYMDUMwl4L4QDXdlzYQTq7PAFYBjgnqwhPNxZATIEoosnreE_Jps1e6HXq6TewCoQHmaIeEqxv84xkqW_hN5zDNkALJ2ericO3lYniJYiIJ-dRdlPmPhA6vWcWrCaCbsk9r/w200-h133/ST1_cable.jpg" width="200" />
</div>
<div>
<span style="font-family: arial; font-size: x-small;"><span style="background-color: lime; font-family: arial; font-size: small;">Updated 2024-01-03 ! </span><span style="background-color: #ffa400; font-family: arial; font-size: small;"> Not for <a href="https://github.com/joan2937/pigpio/issues/589" target="_blank">RPi 5</a> !!</span></span></div>
<div>
<span style="font-family: arial; font-size: x-small;"><span style="font-family: arial; font-size: small;"><br /></span></span>
</div>
<div>
<span style="font-family: arial;"><span style="font-family: arial; font-size: small;">Thanks to Thomas, (the guy with the nice </span><a href="https://www.gedad.de/shop/gecos-wired/#cc-m-product-15562399022" target="_blank">marine interface board</a>)<span style="font-family: arial; font-size: small;">, </span><span style="font-family: arial; font-size: small;">it's now possible </span><span style="font-family: arial; font-size: small;">to decode, one way, the SeaTalk1(ST1) sentences in a pretty simple way.
You just </span><span style="font-family: arial; font-size: small;">use
<a href="https://pysselilivet.blogspot.com/2019/08/openplotter-beta-v2-quick-install-guide.html" target="_blank">OpenPlotter(OP)</a>
and/or <a href="https://signalk.org/" target="_blank">SignalK(SK)</a> and
an </span><a href="https://en.wikipedia.org/wiki/Opto-isolator" target="_blank">Optocoupler</a>.</span>
</div>
<div>
<span style="font-family: arial; font-size: small;"><span style="font-family: arial; font-size: x-small;"><br /></span></span>
</div>
<div>
<span style="font-family: arial;"><span style="font-family: arial; font-size: small;">The thing that made it, is that Thomas</span><span style="font-family: arial; font-size: small;"> </span><span style="font-family: arial; font-size: small;">has released a "how to" and </span><a href="https://github.com/Thomas-GeDaD/Seatalk1-Raspi-reader" target="_blank">Python source code</a>,
<span style="font-family: arial; font-size: small;">that will read the data from a GPIO pin on the Raspberry Pi, (RPi), and
format it so the
<a href="https://github.com/SignalK/signalk-parser-nmea0183" target="_blank">standard parser in SignalK</a>
can translate it to SignalK delta format. It is then</span><span style="font-family: arial; font-size: small;"> available as NMEA 0183. It's even possible to send the data in to a
NMEA 2000 network, with a proper hardware interface.</span></span></div><div><span style="font-family: arial;"><span style="font-family: arial; font-size: small;"><br /></span></span></div><div>
</div>
<div>
<a name='more'></a>
</div>
<div><div class="separator" style="clear: both;"><br /> <b style="font-family: arial; font-size: xx-large; text-align: left;">Hardware</b></div></div>
<div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV1EC2Gw0E2JSL5z0gmQQQmJ1hFJt3AHpq9Dir8O-jQnUkqziRD_w1KG6Bq35x7q7zEyP7nLUBZNtoxhqWYvVQ6TCHHG9MgHcb_ghBpKrpJp-Q8uu_dqnCt4Ix9rXeuVdMuN1KrgCclaV3brGa64Ua4npsTZq0TFsedydluHwwTEQXWMlRlZj0K4GzoqiO/s885/ST1_interface_PCB.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="330" data-original-width="885" height="119" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV1EC2Gw0E2JSL5z0gmQQQmJ1hFJt3AHpq9Dir8O-jQnUkqziRD_w1KG6Bq35x7q7zEyP7nLUBZNtoxhqWYvVQ6TCHHG9MgHcb_ghBpKrpJp-Q8uu_dqnCt4Ix9rXeuVdMuN1KrgCclaV3brGa64Ua4npsTZq0TFsedydluHwwTEQXWMlRlZj0K4GzoqiO/s320/ST1_interface_PCB.jpg" width="320" /></a></div><span style="font-family: arial;">Prerequisites is a Raspberry Pi up and running <a href="https://pysselilivet.blogspot.com/2022/04/openplotter-v3-beta-install-guide.html" target="_blank">OpenPlotter</a> and/or <a href="https://pysselilivet.blogspot.com/2021/05/signal-k-quick-install.html" target="_blank">Signal K</a> and an interface
circuit according to the picture.</span></div><div><span style="font-family: arial;"><font face="arial"><br /></font></span></div><div><span style="font-family: arial;"><font face="arial">The circuit is referring to <a href="https://www.amazon.com/ARCELI-Optocoupler-Isolation-Converter-Photoelectric/dp/B07M78S8LB/">this optocoupler board</a>, but a similar product can of course be used. The LED in the circuit will flicker when there is ST1 traffic. </font></span><span style="background-color: white; caret-color: rgb(36, 41, 46); color: #24292e; font-family: arial;"><font face="arial">Choosing an optocoupler as the hardware interface is a smart way to avoid ground loops and creates electrical isolation from hazardous voltages. This interface is not inverting the signal.</font></span></div><div><span><font face="arial"><div style="font-family: Times;"><div class="separator" style="clear: both; text-align: center;"></div></div><div style="font-family: Times;"><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgetAOtUCFpsg59sWf7z0FtFEjl4StqeJffuB66l_pi3MNBD0M8TEYMpwEDCy03LUuB3JEWBPBLeN_BllBvIiWagJdumjJO9f61I42fBuDWLUkFjOvyOhSXgzTkk3c18EdivwH9lOdUO2HngSrLz9k0HP8gwqjZZTDMD8_AuG4BGDVZG8d3VBIanH0_W1G3/s797/ST1_interface_components.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="196" data-original-width="797" height="79" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgetAOtUCFpsg59sWf7z0FtFEjl4StqeJffuB66l_pi3MNBD0M8TEYMpwEDCy03LUuB3JEWBPBLeN_BllBvIiWagJdumjJO9f61I42fBuDWLUkFjOvyOhSXgzTkk3c18EdivwH9lOdUO2HngSrLz9k0HP8gwqjZZTDMD8_AuG4BGDVZG8d3VBIanH0_W1G3/s320/ST1_interface_components.jpg" width="320" /></a></div><br /></div></div></font></span></div><div><span><font face="arial"><span style="background-color: white; color: #24292e;">If you are building the interface yourself use the second circuit instead. If you don't want any flickering just drop the LED at the input. </span></font></span></div><div><span><font face="arial"><br /></font></span></div><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiseTV8kGYl3GUNAMVwQGBAl1P4bW3fvqnTTXdvpJlaNKroKlF00bwVFCNZsv18px44E1VTu8VqU0RetdMU7f_gQnxQCPS0_NpBSiFVpMhM0_hn9-umVh6UK5AOs1lGEM7SOMQO31hUpnQsHM237L5bMAOqFinc42RB_blhKJfGZE5N7dgUxyg9N8GAWZ3d/s355/ST1_Tr.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="289" data-original-width="355" height="107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiseTV8kGYl3GUNAMVwQGBAl1P4bW3fvqnTTXdvpJlaNKroKlF00bwVFCNZsv18px44E1VTu8VqU0RetdMU7f_gQnxQCPS0_NpBSiFVpMhM0_hn9-umVh6UK5AOs1lGEM7SOMQO31hUpnQsHM237L5bMAOqFinc42RB_blhKJfGZE5N7dgUxyg9N8GAWZ3d/w131-h107/ST1_Tr.jpeg" width="131" /></a><span><font face="arial">The most simple interface, works well on our boat, is where You use a small signal NPN transistor which shifts the DC level, from 12 V DC to 3,3 V DC, and inverts the signal.</font></span></div><div><span><font face="arial"><br /></font></span></div><div><span></span></div><span style="font-family: arial; font-size: x-large;"><b>Software</b></span>
<div><span><font face="arial" size="4"><b>Install</b></font></span></div><div><span><font face="arial">Start, in a terminal/ssh session, with an update and install </font></span>
</div>
<div>
<span style="font-family: arial; font-size: x-small;"><span style="font-family: arial; font-size: x-small;"><br /></span>
</span>
</div>
<div>
<pre style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; text-align: left;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span style="font-family: courier;">s</span><span style="font-family: courier;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">udo apt-get update && </span><span style="font-variant-ligatures: no-common-ligatures;">sudo apt-get install pigpio python-pigpio python3-pigpio</span></span></span></pre>
</div>
<div>
<span style="font-family: arial; font-size: x-small;"><span style="font-family: arial; font-size: x-small;"><br /></span></span>
</div>
<span style="font-family: arial;"><font>and check with </font></span>
<br />
<div>
<span style="font-family: arial; font-size: x-small;"><span style="font-family: arial; font-size: x-small;"><br /></span>
</span>
</div>
<div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-size: x-small; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier;">pigpiod -v</span></span>
</div>
<div class="p1" style="font-family: menlo; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<font size="2"><span style="font-family: arial;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</span>
</font>
</div>
<font><span style="font-family: arial;">
which will return something like
</span>
<br />
</font>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">79</span></span></div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</span>
</div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"></span>
</span>
</div>
<font face="arial"><span>which is the version number, 7.9. Go on getting the Python code
with</span> </font><br />
<div class="p1" style="font-family: helvetica; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><br /> </span>
</div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: xx-small;">w</span><span style="font-family: courier; font-size: x-small;">get
https://raw.githubusercontent.com/MatsA/seatalk1-to-NMEA0183/master/STALK_read.py</span></span>
</div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial;"><span><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span><span><font>The program is set up to match the opto circuit above.</font></span></span></span></span>
</span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial;"><span><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span><span><br /></span></span></span></span>
</span>
</div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial;"><span><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span><span style="font-size: medium;"><b>pigpio</b></span></span></span></span></span></div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial;"><font><span>The Python program is dependent on that the "</span><span style="background-color: #eeeeee; font-size: small;">pigpio</span><span>" library is launched as a demon. Start it with </span></font></span></span> </span><span style="font-family: arial;"> </span>
</div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</span>
</div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"></span>
</span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-size: x-small;"><span style="font-family: courier;">sudo pigpiod</span></span></span><span style="font-family: arial; font-size: small;"> </span><font face="arial"><span style="font-variant-ligatures: no-common-ligatures;">Which</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">starts a socket interface on port 8888 !! which is used by the Python
program.</span></font>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: small;"><br /></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: small;">then start the program wit</span><span style="font-family: arial; font-size: small;">h </span>
</div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</span>
</div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"></span>
</span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;"><span style="font-family: courier;">sudo python STALK_read.py</span></span></span>
</div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: x-small;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial; font-size: x-small;"><br /></span></span>
</span>
</div>
<font><span style="font-family: arial;">if You succeeded You will see something like</span> </font><br />
<br />
<div style="background-color: #eeeeee; text-align: left; width: 200px;">
<div style="background-color: #eeeeee; text-align: left; width: 200px;"><span style="font-family: courier; font-size: x-small;"><span>STALK,11,1,4,5 </span>
</span>
</div>
<span style="font-size: x-small;"><span style="font-family: courier;"> </span>
<div style="background-color: #eeeeee; text-align: left; width: 200px;"><span style="font-family: courier;">STALK,25,4,e8,51,12,33,3</span>
</div>
<div style="background-color: #eeeeee; text-align: left; width: 200px;"><span style="font-family: courier;">STALK,24,2,0,0,20
</span>
</div>
<div style="background-color: #eeeeee; text-align: left; width: 200px;"><span style="font-family: courier;">STALK,26,4,0,0,0,0,20 </span>
</div>
<div style="background-color: #eeeeee; text-align: left; width: 200px;"><span style="font-family: courier;">STALK,9c,31,13,fe
</span>
</div>
</span>
</div>
<pre style="text-align: left;"><div style="white-space: normal;">
<span style="font-family: arial;"><font>showing the decoded ST1 messages. Next step is to check that the messages is sent out as an UDP stream at local host, port 4141. This is done with opening a <b>new</b> terminal/ssh session and issue the command</font></span></div><div>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span style="white-space: normal;">nc -ulkw 0 127.0.0.1 4041</span></span></div></pre>
</div>
<div>
<span style="font-family: arial; font-size: x-small;"> </span>
</div>
<div>
<font><span style="font-family: arial;"><span style="font-family: arial;">and the same list of ST1 messages will appear. Terminate with "Ctrl +
c".</span></span>
</font>
</div>
<div>
<font size="2"><span style="font-family: arial;"><span style="font-family: arial;"><br /></span></span></font>
</div>
<div></div>
<div style="text-align: left;">
<span style="font-family: arial;"><font><b><span style="font-size: x-large;">SignalK</span></b>
</font>
</span>
</div>
<div><span><span><font face="arial" size="4"><b>Connection</b></font></span></span></div><div>
<span style="font-family: arial;"><span style="font-family: arial;"><font>To get the ST1 messages into SignalK, using the optocoupler setup, You have to set up a new
connection in SignalK. Setup according to the picture below. After
restarting SK, check out the ST1 messages in the "Data
Browser".</font></span></span>
</div>
<div>
<br />
</div>
<div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIBgyH0UZuSWsJlXm6ttyseXj1X397JzBOKvJVz7Hn3_NSqBFsf2FXeJ40X0hk6exNTU5BbVL2d9NURW3f24Se0rlWM9vOnvs0iTd5iRfnzsiJ-p_Mo161AgUZ0NxvZpzBeAPQkfvz-SAhQ_ZDtR21rZ5W9kH_728db95wjuneZwPUGnQRqhr_9Gv97xxL/s872/ST1_SK_conn.jpeg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="668" data-original-width="872" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIBgyH0UZuSWsJlXm6ttyseXj1X397JzBOKvJVz7Hn3_NSqBFsf2FXeJ40X0hk6exNTU5BbVL2d9NURW3f24Se0rlWM9vOnvs0iTd5iRfnzsiJ-p_Mo161AgUZ0NxvZpzBeAPQkfvz-SAhQ_ZDtR21rZ5W9kH_728db95wjuneZwPUGnQRqhr_9Gv97xxL/w250-h191/ST1_SK_conn.jpeg" width="250" /></a></div><span style="clear: right; float: right; font-family: arial; font-size: x-small; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="734" data-original-width="1169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK3itFtghRTaXfyKyrQF1t6GsP0TxAsf8X_ku0_vKyRPfGbuVVXFzxTwwu6PE5sujRM85Uli91_yDmZhVRkLU42GzBYdzrVb_wswYcUwx1QZnLYczTYk33l6ie_iBi5vbpbeG04ur_7VcX/s320/SeaTalk_Data_Browser.png" width="320" /></span>
<br />
</div>
<div></div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK3itFtghRTaXfyKyrQF1t6GsP0TxAsf8X_ku0_vKyRPfGbuVVXFzxTwwu6PE5sujRM85Uli91_yDmZhVRkLU42GzBYdzrVb_wswYcUwx1QZnLYczTYk33l6ie_iBi5vbpbeG04ur_7VcX/s1169/SeaTalk_Data_Browser.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a>
</div>
<br /><div><br />
</div>
<div>
<br />
</div>
<div>
<br />
</div>
<div>
<br />
</div>
<div>
<br />
</div>
<div>
<br />
</div>
<div>
<br />
</div>
<div>
<br />
</div>
<div><span style="font-family: arial; font-size: 12px;"><br /></span></div><span style="font-family: arial;"><div><span style="font-family: arial;"><br /></span></div>Terminate the Python process with "Ctrl + c" and kill the "pigpio" daemon with </span><br /><br /><span style="background-color: #cccccc; font-family: courier; font-size: x-small;"> sudo killall pigpiod </span><br /><div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: medium;"><b><br /></b></span></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: medium;"><b>Prepare for "production"</b></span></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<font face="arial">
Move the Python program to a better place
</font>
</div>
<div class="p1" style="font-family: helvetica; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<font size="1"><br /> </font>
</div>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo mv STALK_read.py /usr/local/sbin</span>
<div class="p1" style="font-family: helvetica; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<br />
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><font face="arial" size="4"><b>systemd service</b></font></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<font face="arial"> We will set up "</font><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">STALK_read.py</span><font size="2"><span style="font-family: helvetica;">" </span></font><span style="font-family: arial;"><font>as a </font><a href="https://wiki.debian.org/systemd" target="_blank">systemd service</a><font>, autostart at boot and restart at failure, which also will start
the</font></span><font size="2" style="font-family: helvetica;"> "</font><span style="background-color: #eeeeee; font-family: courier;"><font size="2">pigpio</font></span><font size="2" style="font-family: helvetica;">" </font><font face="arial">daemon. Get the service file </font>
</div>
<div class="p1" style="font-family: helvetica; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<br />
</div>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">wget https://raw.githubusercontent.com/MatsA/seatalk1-to-NMEA0183/master/SeaTalk.service</span>
<div><br /></div>
<span style="font-family: arial;">
and move it to the right place with</span></div><div><br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo mv SeaTalk.service /etc/systemd/system</span><br /><br /><span style="font-family: arial;">then activate it with </span></div>
<div>
<span style="font-family: arial; font-size: x-small;"><br /></span>
</div>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo systemctl daemon-reload && sudo systemctl enable SeaTalk && sudo systemctl restart SeaTalk</span>
<div>
<span style="font-family: arial; font-size: x-small;"><br /></span>
</div>
<span style="font-family: arial;"><div><span style="font-family: arial; font-size: medium;"><b>Check ST 1 messages</b></span></div>Check with </span><br /><br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo systemctl status SeaTalk</span><br /> <br /><span style="font-family: arial;">and something like this will be listed</span><br />
<br />
<div>
<div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: courier; font-size: xx-small;"><span class="s2" style="font-variant-ligatures: no-common-ligatures;">sudo systemctl status SeaTalk</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: courier; font-size: xx-small;"><span class="s3" style="color: #2fb41d; font-variant-ligatures: no-common-ligatures;"><b>●</b></span><span class="s2" style="font-variant-ligatures: no-common-ligatures;">
SeaTalk.service - SeaTalk daemon</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;"><span class="Apple-converted-space"> </span>Loaded:
loaded (/etc/systemd/system/SeaTalk.service; enabled; vendor preset:
enabled)</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: courier; font-size: xx-small;"><span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span class="Apple-converted-space"> </span>Active: </span><span class="s3" style="color: #2fb41d; font-variant-ligatures: no-common-ligatures;"><b>active (running)</b></span><span class="s2" style="font-variant-ligatures: no-common-ligatures;">
since Sun 2020-06-14 11:04:50 CEST; 44s ago</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;"><span class="Apple-converted-space"> </span>Docs:
http://pysselilivet.blogspot.com/2020/06/seatalk1-to-nmea-0183-converter-diy.html</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;"><span class="Apple-converted-space"> </span>Process: 534
ExecStartPre=/usr/local/bin/pigpiod (code=exited,
status=0/SUCCESS)</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;"><span class="Apple-converted-space"> </span>Main PID: 544
(python)</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;"><span class="Apple-converted-space"> </span>Tasks: 8
(limit: 4035)</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;"><span class="Apple-converted-space"> </span>Memory:
7.1M</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;"><span class="Apple-converted-space"> </span>CGroup:
/system.slice/SeaTalk.service</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;"><span class="Apple-converted-space"> </span>├─539 /usr/local/bin/pigpiod</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;"><span class="Apple-converted-space"> </span>└─544 /usr/bin/python /usr/local/sbin/STALK_read.py</span></span>
</div>
<div class="p2" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 13px;">
<span style="font-family: courier; font-size: xx-small;"><span class="s2" style="font-variant-ligatures: no-common-ligatures;"></span><br /></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">Jun 14 11:05:29 zest SeaTalk[544]: $STALK,9c,31,18,ff</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">Jun 14 11:05:29 zest SeaTalk[544]: $STALK,57,70,2</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">Jun 14 11:05:29 zest SeaTalk[544]:
$STALK,58,25,38,1b,64,c,8d,d0</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">Jun 14 11:05:29 zest SeaTalk[544]:
$STALK,84,36,98,88,40,0,ff,2,17</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">Jun 14 11:05:29 zest SeaTalk[544]: $STALK,25,4,e8,51,12,33,3</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">Jun 14 11:05:29 zest SeaTalk[544]: $STALK,24,2,0,0,20</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">Jun 14 11:05:29 zest SeaTalk[544]: $STALK,26,4,0,0,0,0,20</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s2" style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: xx-small;">Jun 14 11:05:29 zest SeaTalk[544]: $STALK,20,1,0,0</span></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: small;"><br /></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: small;">and then check the ST1 messages in "Data Browser". </span>
</div>
</div>
</div>
<div>
<span style="font-family: arial; font-size: x-small;"><br /></span>
</div>
<div>
<span><font face="arial">If You don't want to clutter Your log with the ST1 sentences, just edit
the Python code </font></span>
</div>
<div>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><br /></span>
</div>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo nano /usr/local/sbin/STALK_read.py</span>
<div>
<div class="p1" style="font-family: menlo; font-size: 11px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial;"><font><span><span class="s1" style="font-variant-ligatures: no-common-ligatures;">and make the "</span><span class="s1" style="color: #2eaebb; font-variant-ligatures: no-common-ligatures;"><b>print </b></span><span class="s2" style="font-variant-ligatures: no-common-ligatures;">(data)" line start with an "#" and reactivate the service with the
above commands.</span></span>
</font>
</span></div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial;"><font><span style="font-variant-ligatures: no-common-ligatures;"><br /></span>
</font>
</span></div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-variant-ligatures: no-common-ligatures;"><font>Now You are ready for "production" !</font></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-variant-ligatures: no-common-ligatures;"><font size="2"><br /></font></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-variant-ligatures: no-common-ligatures;"><font size="6"><b>Remarks</b></font></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b style="font-variant-ligatures: no-common-ligatures;"><span style="font-family: arial; font-size: medium;">Change port</span></b></div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-variant-ligatures: no-common-ligatures;">If You want to change the daemon to another port You have to
</span><a href="http://abyz.me.uk/rpi/pigpio/pigpiod.html" style="font-family: arial; font-variant-ligatures: no-common-ligatures;" target="_blank">change the pigpiod.service file</a><span style="font-family: arial; font-variant-ligatures: no-common-ligatures;"> with the -p option, and the
</span><a href="http://abyz.me.uk/rpi/pigpio/python.html#pigpio.pi" style="font-family: arial; font-variant-ligatures: no-common-ligatures;" target="_blank">Python program</a><span style="font-family: arial; font-variant-ligatures: no-common-ligatures;">. </span></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-variant-ligatures: no-common-ligatures;"><font><br /></font></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-variant-ligatures: no-common-ligatures;"><font size="4"><b>Signal K</b></font></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-variant-ligatures: no-common-ligatures;"><font><span style="background-color: #04ff00;">Please note !</span> With help
from </font></span><font face="arial">@tkurki I added </font><span style="font-family: arial; font-size: small;">this conversion feature to the standard SK server, V1.32. Documentation
<a href="https://github.com/SignalK/signalk-server/blob/master/docs/src/setup/seatalk/seatalk.md" target="_blank">found here</a>.</span></div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: small;"><br /></span>
</div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: medium;"><b>Open plotter</b></span></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: small;">This setup will soon be added to <a href="https://openplotter.readthedocs.io/en/latest/gpio/gpio_app.html" target="_blank">the documentation</a> but in the meantime please check <a href="https://forum.openmarine.net/showthread.php?tid=3029" target="_blank">this post</a> in the OP forum.</span></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><br /></div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: medium;"><b>Fixes</b></span>
</div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: small;"><span style="background-color: #04ff00;">2020-08-18</span> The "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">STALK_read.py</span><span style="font-family: arial; font-size: small;">" program is updated with 2 bug fixes !! These are also applied to the SK
server version.</span>
</div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: small;"><span style="background-color: #04ff00;">2021-02-18</span> </span><span style="font-family: arial; font-size: small;">The "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">STALK_read.py</span><span style="font-family: arial; font-size: small;">" updated.</span></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: small;"><span style="background-color: #04ff00;">2022-11-03</span> </span><span style="background-color: #eeeeee; font-family: courier; font-size: small;">SeaTalk.service</span><span style="font-family: arial;"> updated.</span></div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: small;"><span style="background-color: #04ff00;">2023-07-29</span><span style="background-color: white;"> Hardware interface updated at input to the optocoupler board. </span></span></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><b><span style="font-family: arial; font-size: medium;"><br /></span></b></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<b><span style="font-family: arial; font-size: medium;">WiFi converter</span>
</b></div>
<div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span style="font-family: arial; font-size: small;">Why don't use the above setup with a
<a href="https://www.raspberrypi.org/products/raspberry-pi-zero-w/" target="_blank">Raspberry Zero W</a>, with the one transistor interface, to get ST1 input, via WiFi, to Your
SK server ?</span>
</div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: small;"><br /></span></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: medium;"><b>Hardware tuning</b></span></div><div class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span style="font-family: arial; font-size: small;">The mentioned hardware solution worked in my environment but Marco have done a deeper analyze, with an oscilloscope, which can <a href="https://github.com/marcobergman/seatalk_convert" target="_blank">be checked out here</a>. This post update, done 2023-07-29, is taken that info in consideration.</span></div>
</div>
Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com34tag:blogger.com,1999:blog-2016632442552546592.post-83807842057280612862023-12-06T00:30:00.006+01:002023-12-14T18:51:03.437+01:00Raspberry Pi OS install with Mac/Windows/Linux
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><div>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzPHcVSZwP-ho4LpeqXTLdt7g9-SwIHR9drFW1gpyVyhiI-MCH4-jUO1jfSencYwITX-TMiLU86MM_gwDwhYOL1qgN6PDymM7bRC1CC0-OAtEgYQudOFIBtSAmRFzAlR6dpWm50qrMA8U1VhUAmpEVUBcV5os4G4sCbMFmrqRPGZqDZeBcexJT-AgY3FYM/s915/RPi_imager.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="544" data-original-width="915" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzPHcVSZwP-ho4LpeqXTLdt7g9-SwIHR9drFW1gpyVyhiI-MCH4-jUO1jfSencYwITX-TMiLU86MM_gwDwhYOL1qgN6PDymM7bRC1CC0-OAtEgYQudOFIBtSAmRFzAlR6dpWm50qrMA8U1VhUAmpEVUBcV5os4G4sCbMFmrqRPGZqDZeBcexJT-AgY3FYM/w261-h155/RPi_imager.png" width="261" /></a></div><span style="background-color: #04ff00;">Updated 2023-12-06 !</span></div></span></span><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span face="arial, helvetica, sans-serif">When starting up a new project with Raspberry Pi I like to start up fresh
and with a minimal OS. </span></span><span style="font-family: arial;">Therefore i always use Raspberry Pi OS(ROS) Lite and then <a href="https://pysselilivet.blogspot.com/2017/11/raspbian-lite-with-gui-rdp-vnc.html" rel="nofollow" target="_blank">adding what I need</a>. </span>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">Doing it right You don't have to use an external display, keybord and
mouse, just a "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">ssh</span><span style="font-family: arial;">" </span><span style="font-family: arial;">client.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">Flash to a SSD ? Check
<a href="https://pysselilivet.blogspot.com/2021/11/raspberry-4-usb-ssd-boot-in-60-seconds.html" target="_blank">this post</a>.</span>
</div>
<div>
<span face="arial, helvetica, sans-serif"><span style="font-family: arial;"><br /></span></span>
</div>
<div>
<a name='more'></a>
<div>
<span style="font-family: arial; font-size: x-large;"><b>Intro</b></span>
</div>
<div>
<span style="font-family: arial;">If you been using ROS before you know that there always been a default,
active, user "pi" when installing. This have now, 2022-04,
<a href="https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/" target="_blank">changed</a>
and you have to use the </span><span style="font-family: arial;"> </span><a href="https://www.raspberrypi.com/documentation/computers/getting-started.html#using-raspberry-pi-imager" style="font-family: arial;" target="_blank">Raspberry Pi Imager</a><span style="font-family: arial;">(RPiI) and set a user.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">With RPiI, >=v1.8.x, you also select hardware and will get a recommendation for preferable OS version. </span>
</div>
<br />
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Flash the SD card</b></span></span>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Use RPiI and follow
<a href="https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system" target="_blank">these instructions</a>.</span></span>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span></span>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">Choose from one of the 2 versions with either 32 or 64 bit OS</span>
<div style="font-family: -webkit-standard;">
<ul>
<li>
<span style="font-family: arial;">ROS, with desktop and recommended software</span>
</li>
<li>
<span style="font-family: arial;">ROS lite, minimal OS without desktop</span>
</li>
</ul>
</div></span></span>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">If you just want the images they are
<a href="https://www.raspberrypi.com/software/operating-systems/" target="_blank">found here</a>.</span></span>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span></span>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Nice to know is that </span></span><span style="font-family: arial;">RPiI </span><span style="font-family: arial;">stores the OS image in</span><span style="font-family: arial;">;</span>
</div>
<div>
<ul style="text-align: left;">
<li>
<span style="font-family: arial;">Windows<span> => </span></span><span style="font-family: arial;">C:\Users\<username>\AppData\Local\Raspberry
Pi\Imager\cache</span>
</li>
<li>
<span style="font-family: arial;">Mac<span> </span><span> </span><span> => </span></span><span style="font-family: arial;">/Users/<username>/Library/Caches/Raspberry\ Pi/Imager</span>
</li>
</ul>
</div>
<div>
<div>
<span style="font-family: arial;"><b><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><div>
<b><span face="arial, helvetica, sans-serif" style="font-size: x-large;">RPi boot settings</span></b>
</div></span></b></span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_tWNWdpyqPSADITlWxVBWUjaSHVkmXyzW6TTFyUK92TPW-bSWfUT0D4ccgVPcVAcMtMRNFHdDJs7jgDxC17rfV4gX3Zb0ePHZgA-c6ilRjehOc76ZNlLE6_irn1pnrAxsYP-jmM64Z5g/s1600/Finder+Raspbian.tiff" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_tWNWdpyqPSADITlWxVBWUjaSHVkmXyzW6TTFyUK92TPW-bSWfUT0D4ccgVPcVAcMtMRNFHdDJs7jgDxC17rfV4gX3Zb0ePHZgA-c6ilRjehOc76ZNlLE6_irn1pnrAxsYP-jmM64Z5g/s320/Finder+Raspbian.tiff" width="320" /></a>
</div>
<div>
<span style="font-family: arial;">Using the RPiI, <b>advanced options</b>, you have probably set;</span>
</div>
<div>
<ul style="text-align: left;">
<li><span style="font-family: arial;">Hostname</span></li>
<li><span style="font-family: arial;">Enable SSH</span></li>
<li>
<span style="font-family: arial;">Set a username and password</span>
</li>
<li><span style="font-family: arial;">Configure wireless lan</span></li>
<li><span style="font-family: arial;">Local settings</span></li>
</ul>
</div>
<div>
<span style="font-family: arial;">Browse the content of the SD card and You will see a nice structure of
files and folders.</span>
</div>
<div>
<span style="font-family: arial;">
<span face="arial, helvetica, sans-serif"><br /></span><span face="arial, helvetica, sans-serif">If you didn't active SSH above you can still, old way, create an
<b>empty file</b> with the name "ssh", <b>no extension</b>, in the
root of the SD card. This will enable ssh before it is actually
configured. </span><span face="arial, helvetica, sans-serif">(See picture)</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">You now have to unmount the SD card.</span><br /></span>
<br />
<span style="font-family: arial;">Plug the SD card into Your RPi, connect the LAN cable.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;"><b>Connect the mouse, keyboard, screen and power. Log on and continue
with the configuration below.</b></span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial; font-size: large;"><b><span>OR</span> </b></span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;"><b>Use headless just connecting the power</b></span><br />
<div class="p1">
<span class="s1"><br /></span>
</div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">It will boot, green led flashes, and after about 2 minutes it should
be visible in Your routers list over connected devices with the name
"raspberrypi".</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">Or just check with a ping in the Mac Terminal or similar for other
OS</span></span><br />
<br />
<div style="background-color: #eeeeee; text-align: left; width: 400px;">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">$ ping raspberrypi</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">PING raspberrypi.lan (192.168.1.79): 56 data bytes</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">64 bytes from 192.168.1.79: icmp_seq=0 ttl=64 time=247.129 ms</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">64 bytes from 192.168.1.79: icmp_seq=1 ttl=64 time=8.676 ms</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">64 bytes from 192.168.1.79: icmp_seq=2 ttl=64 time=3.914 ms</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">
</span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">64 bytes from 192.168.1.79: icmp_seq=3 ttl=64 time=1.865 ms</span>
</div>
<br />
<span style="font-family: arial;">Start Mac Terminal, or
<a href="https://www.putty.org/" target="_blank">Windows putty</a>, and
logon with "ssh" and default password "raspberry"</span><br />
<br />
<div style="background-color: #eeeeee; text-align: left; width: 625px;">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">$ ssh pi@raspberrypi
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">The authenticity of host 'raspberrypi (192.168.1.79)' can't be
established.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">ECDSA key fingerprint is
SHA256:lNY6d3pAK5TDO5XLma3k2w0IgOkGBcs1wa1T7QGaXjk.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Are you sure you want to continue connecting (yes/no)? yes
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Warning: Permanently added 'raspberrypi' (ECDSA) to the list of known
hosts.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Warning: the ECDSA host key for 'raspberrypi' differs from the key
for the IP address '192.168.1.79'
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Offending key for IP in /Users/xxxxx/.ssh/known_hosts:5
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Are you sure you want to continue connecting (yes/no)? yes
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">pi@raspberrypi's password:
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">The programs included with the Debian GNU/Linux system are free
software; </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">the exact distribution terms for each program are described in the
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">individual files in /usr/share/doc/*/copyright.
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">permitted by applicable law.
</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">SSH is enabled and the default password for the 'pi' user has not
been changed. </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">This is a security risk - please login as the 'pi' user and type
'passwd' to set a new password.</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">
</span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">pi@raspberrypi:~ $</span>
</div>
<br />
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">If the name doesn't work with the ssh command use the IP from the
routers device list instead.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">As You see in the log I have used this RPi before and the router is
assigning it the same IP but with a new fingerprint(New OS). The
easiest way to solve the problem is just to empty the file
"known_hosts" on Your Mac.</span><br /> </span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;"><br /><font><span>First update the installation with</span></font></span><br /><br /><font face="courier" size="2" style="background-color: #eeeeee;">$ sudo apt update && sudo apt full-upgrade -y && sudo
apt clean</font><br /></span>
<span face="arial, helvetica, sans-serif"><br /></span>
</div>
<div>
<span style="font-family: arial;">If you didn't use the "Advanced options" or want to change/add anything
start the basic setup. Use up and down arrow to move, left right arrow
to select and Enter to confirm</span><br />
<br />
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo raspi-config</span><br /><span face="arial, helvetica, sans-serif"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKyMV0HjGPOipnCyvDwErMRBE8DEO2KslNpYlxvlswczIdI75xeJ7rwR5q6HQWgq2913t6PbbWU6yF9tFQ0GowqT4OJD6pUOiTl75B9tyTGgZv4fO-LZ-8a_8Yox5R9VMW2CcDGSlHUaYX/s864/Raspi-config.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="270" data-original-width="864" height="125" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKyMV0HjGPOipnCyvDwErMRBE8DEO2KslNpYlxvlswczIdI75xeJ7rwR5q6HQWgq2913t6PbbWU6yF9tFQ0GowqT4OJD6pUOiTl75B9tyTGgZv4fO-LZ-8a_8Yox5R9VMW2CcDGSlHUaYX/w400-h125/Raspi-config.png" width="400" /></a>
</div>
<br />
<span style="font-family: inherit;"><br /></span>
</div>
<div>
<span style="font-family: inherit;"><br /></span>
</div>
<div>
<span style="font-family: inherit;"><br /></span>
</div>
<div>
<span style="font-family: inherit;"><br /></span>
</div>
<div>
<span style="font-family: inherit;"><br /></span>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">And go through, at least, the following items</span>
</div>
<div>
<span face="arial, helvetica, sans-serif"><br /></span><span face="arial, helvetica, sans-serif"><div>
<span style="font-family: courier; font-size: x-small;"><span>1 System Options<span style="white-space: pre;"> </span></span>
</span></div>
<div>
<span style="font-family: courier; font-size: x-small;"><span><span style="white-space: pre;"> </span>S3 Change User
Password</span>
</span></div>
<div>
<span style="font-family: courier; font-size: x-small;"><span><span style="white-space: pre;"> </span>S4 Hostname</span>
</span></div>
<div>
<span style="font-family: courier; font-size: x-small;"><span>3 Interface options</span>
</span></div>
<div>
<span style="font-family: courier; font-size: x-small;"><span><span style="white-space: pre;"> I</span>2 SSH</span>
</span></div>
<div>
<span style="font-family: courier; font-size: x-small;"><span>5 Localisations options</span>
</span></div>
<div>
<span style="font-family: courier; font-size: x-small;"><span> <span style="white-space: pre;"> </span>L1 Locale
(Swedish sv_SE ISO-8859-1)</span>
</span></div>
<div>
<span style="font-family: courier; font-size: x-small;"><span> <span style="white-space: pre;"> </span>L2
Timezone*</span>
</span></div>
<div>
<span style="font-family: courier; font-size: x-small;"><span> <span style="white-space: pre;"> </span>L3
Keyboard</span>
</span></div>
<div>
<span style="font-family: courier; font-size: x-small;"><span style="white-space: pre;"> </span>L4 WLAN Country</span>
</div></span><font><div style="font-family: arial;"> </div></font>
<div>
<font face="arial">then reboot </font><br />
<br /><font face="courier" style="background-color: #eeeeee;"><span style="font-size: x-small;"> $ sudo reboot</span><br /></font>
<br /><font face="arial" size="6"><b>Remarks</b></font>
</div>
<div>
<span style="font-family: arial; font-size: medium;"><b>FTP</b></span>
</div>
<div>
<font face="arial">Raspberry FTP can be found here </font><a href="https://downloads.raspberrypi.org"><span style="font-family: arial;">https://downloads.raspberrypi.org</span></a>
</div>
<div><br /></div>
<div>
<b style="font-family: arial;"><span style="font-size: medium;">OS images</span></b>
</div>
<div><span style="font-family: arial;">Lite</span></div>
<div>
<a href="https://downloads.raspberrypi.org/raspios_lite_armhf/images/"><span style="font-family: arial;">https://downloads.raspberrypi.org/raspios_lite_armhf/images/</span></a>
</div>
<div><br /></div>
<div><span style="font-family: arial;">Full</span></div>
<div>
<span style="font-family: arial;"><a href="https://downloads.raspberrypi.org/raspios_full_armhf/images/">https://downloads.raspberrypi.org/raspios_full_armhf/images/</a></span>
</div>
<div><br /></div>
<div>
<span style="font-family: Helvetica; font-size: 12px;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: medium;"><b>Headless WiFi install</b></span>
</div>
<div><span style="font-family: arial;">Use the RPi Imager to set it up.</span></div><div><span style="font-family: arial;"><br /></span></div><div>
</div>
<div>
<font face="arial" size="4"><b>Suite value</b></font>
</div>
<div>
<font face="arial">There could be a notice </font><br />
<br /><font face="courier" size="2" style="background-color: #eeeeee;">
xxxxx InRelease' changed its 'Suite' value from 'testing' to
'stable' </font>
</div>
<div>
<font face="courier" size="2" style="background-color: #eeeeee;"><br /></font>
</div>
<div>
<font face="arial" style="background-color: white;">which is solved with using </font>
</div>
<div>
<font face="courier" size="2" style="background-color: #eeeeee;"><br /></font>
</div>
<div>
<font face="courier" size="2" style="background-color: #eeeeee;">$ sudo apt-get update --allow-releaseinfo-change</font><br />
<div class="p1"><br /></div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"></span>
<span face="arial, helvetica, sans-serif"><div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Additional software</b></span></span>
</div>
You should also check
<a href="http://pysselilivet.blogspot.com/2016/11/samba-rpi-as-windows-file-server.html" target="_blank">Samba, RPi as a Windows fileserver</a>, RPi as a
<a href="http://pysselilivet.blogspot.com/2017/02/rpi-install-apachephp-web-server.html" target="_blank">Apache webserver with PHP</a> and
<a href="https://pysselilivet.blogspot.com/2017/11/raspbian-lite-with-gui-rdp-vnc.html" target="_blank">Rasbian lite with GUI, VNC, RDP, Chrome</a>.</span><br />
<br />Ready for
<a href="https://pysselilivet.blogspot.com/2020/10/raspberry-pi-1-2-3-4-usb-ssd-boot.html" target="_blank">USB boot </a>? Use an USB SSD, or other USB drive, to improve performance !<br /><br />
<b><span face="arial, helvetica, sans-serif">Checking SD-cards</span></b><br /><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">Connect the card reader, with the SD card inserted, to Your
client and format the card with </span><span face="arial, helvetica, sans-serif"><a href="https://www.sdcard.org/">SD Formatter</a> and use
the "Owerwrite Formate" option. This will also check that the SD
card is OK.<br /></span></span></span><br />
</div>
</div>
</div>
</div>
Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com3tag:blogger.com,1999:blog-2016632442552546592.post-35981605691356941322023-12-05T01:49:00.004+01:002024-02-15T19:55:15.749+01:00SDR calibrate with kalibrate-rtl<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJVCdjs2edtgqunxUXWRmeaOb1E2hmOAe0HPerQKW93zE68zxYWOcqTxbJhW_dJhh4znan9OTrNDK_ceOUM8q0qfQABhyAMhK00H4O7ZhzUUXO2YyiyqN6mvJNRKwnJ5pR3teNcNAFor46/s1600/2019-07_Nooelec.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span face=""arial" , "helvetica" , sans-serif"><img border="0" data-original-height="318" data-original-width="399" height="159" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJVCdjs2edtgqunxUXWRmeaOb1E2hmOAe0HPerQKW93zE68zxYWOcqTxbJhW_dJhh4znan9OTrNDK_ceOUM8q0qfQABhyAMhK00H4O7ZhzUUXO2YyiyqN6mvJNRKwnJ5pR3teNcNAFor46/s200/2019-07_Nooelec.png" width="200" /></span></a>
</div>
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><div>
<span face=""arial" , "helvetica" , sans-serif"><span style="background-color: lime;">Updated 2023-12-05 !! OK, with Bookworm (32/64 bit) !!</span></span></div>
<div>
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
</div>
To optimize the reception with SDR:s, Software Defined Radios, it is
important to receive on the proper frequency. Due to variations in
production there could be deviations.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif">The calibration could be done against standard GSM transmitters which are
providing a stable reference frequency.</span></span><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Another way is found in the<a href="https://pysselilivet.blogspot.com/2023/12/ais-receiver-and-dispatcher-best.html" rel="nofollow" target="_blank"> AIS-catcher application</a> and use the information supplied in the graphs "Frequency Shift". </span></div><div>
<div style="text-align: center;">
<span style="background-color: yellow; font-family: arial;"><br /></span>
</div>
<a name='more'></a><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><b><span style="font-size: medium;">Introduction</span></b><br /></span></span>
<div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">It would be wise to let the dongle reach its working temperature, 30 minutes ?, before the calibration takes place.</span></span></div><div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><br /></span></span></div><div>
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">On this blog I have used 3 different software packages,
<a href="https://pysselilivet.blogspot.com/2019/01/ais-for-raspberry-with-map-and.html" rel="nofollow" target="_blank">Package A</a>, <a href="https://pysselilivet.blogspot.com/2018/06/ais-reciever-for-raspberry.html" rel="nofollow" target="_blank">Package B</a> and <a href="https://pysselilivet.blogspot.com/2023/12/ais-receiver-and-dispatcher-best.html" rel="nofollow" target="_blank">the best AIS-catcher</a> to receive AIS information, on a Raspberry Pi(RPi), from passing
ships.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif">I'm using 2 different SDR dongles, the <a href="https://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/" target="_blank">RTL-SDR V3</a> and <a href="https://support.nooelec.com/hc/en-us/articles/360005889913-NESDR-Nano-Series" target="_blank">NooElec NESDR Nano 3</a> which both can be used with the software
<a href="https://github.com/steve-m/kalibrate-rtl" target="_blank">kalibrate-rtl</a> to get the frequency offset.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif">The fantastic </span><a href="http://sailoog.com/openplotter" target="_blank">OpenPlotter(OP) project</a><span face=""arial" , "helvetica" , sans-serif"> with guys </span><a href="http://forum.openmarine.net/member.php?action=profile&uid=25" target="_blank">Sailoog</a><span face=""arial" , "helvetica" , sans-serif">/</span><a href="http://forum.openmarine.net/member.php?action=profile&uid=84" target="_blank">e-sailing</a><span face=""arial" , "helvetica" , sans-serif"> have done a </span><a href="https://launchpad.net/~openplotter/+archive/ubuntu/openplotter/+packages" target="_blank">package</a><span face=""arial" , "helvetica" , sans-serif"> which is very easy to use. </span><span face=""arial" , "helvetica" , sans-serif">I really recommend the OP method, Install A,</span><span face=""arial" , "helvetica" , sans-serif"> </span><span face=""arial" , "helvetica" , sans-serif">compared with installing from source. (If You are using OP use
the </span><span face=""arial" , "helvetica" , sans-serif">app "SDR VHF" instead)</span><br />
<br />
<span face=""arial" , "helvetica" , sans-serif" style="font-size: medium;"><b>Update OS</b></span><br /><span face=""arial" , "helvetica" , sans-serif">Open a terminal window/ssh to the RPi and start with a update of the
OS</span></span><br />
<span style="font-family: "menlo"; font-size: 11px;"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span>$ </span><span>sudo apt update && sudo apt full-upgrade -y && sudo apt
clean</span></span><br /><br />
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif" style="font-size: x-large;"><b>Installation A, from OP package</b></span><br /><span face=""arial" , "helvetica" , sans-serif">Start with dependencies for KALIBRATE-RTL</span><br /></span>
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: courier;"><span style="font-size: x-small;">$ </span><span face=""arial" , "helvetica" , sans-serif"><span style="font-size: x-small;">sudo apt install librtlsdr-dev librtlsdr0 libfftw3-double3 libfftw3-dev
libfftw3-bin</span></span></span>
<div>
<span face=""arial" , "helvetica" , sans-serif"><span style="font-family: courier new, courier, monospace; font-size: x-small;"><br /></span></span>
<span style="font-family: arial;">Choose a <a href="https://launchpad.net/~openplotter/+archive/ubuntu/openplotter/+sourcepub/11585464/+listing-archive-extra" target="_blank">package file</a> for Your OS. For RPi, <b>32 bit</b>, download </span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ wget
https://launchpad.net/~openplotter/+archive/ubuntu/openplotter/+files/kalibrate-rtl_0.4.2.2-stable_armhf.deb</span>
<div><br /></div>
<div>
<span style="font-family: arial;">install with </span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo dpkg -i kalibrate-rtl_0.4.2.2-stable_armhf.deb</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">For 64 bit </span></span></div><div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><br /></span></span></div><div><span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ wget https://launchpad.net/~openplotter/+archive/ubuntu/openplotter/+files/kalibrate-rtl_0.4.2.2-stable_arm64.deb</span></span></div><div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><br /></span></span></div><div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">install with </span></span></div><div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><br /></span></span></div><div><span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo dpkg -i kalibrate-rtl_0.4.2.2-stable_arm64.deb</span></span></div><div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><br /></span></span></div><div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">And go on with "Check install" below</span></span></div><div><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><br /></span></span></div><div><span style="font-family: arial;">
<span face=""arial" , "helvetica" , sans-serif" style="font-size: x-large;"><b>Installation B, from source</b></span><br /><span face="arial, helvetica, sans-serif">The software have not been maintained for some time but there
are </span><a href="https://github.com/steve-m/kalibrate-rtl/network" target="_blank">several forks</a><span face="arial, helvetica, sans-serif"> and
<a href="https://github.com/hayguen/kalibrate-rtl" target="_blank"><span>hayguen</span></a></span><span face="arial, helvetica, sans-serif"> is used here.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif">Install some dependencies </span><br />
</span>
<ul style="text-align: left;">
<li><span face=""arial" , "helvetica" , sans-serif"><span style="font-family: arial;">Bookworm/Bullseye/Buster/Stretch OS</span> </span></li><ul><li><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo apt install librtlsdr-dev libtool
libfftw3-dev</span></li></ul>
<li><span face=""arial" , "helvetica" , sans-serif"><span style="font-family: arial;">Stretch also add</span> </span></li><ul><li><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo apt install m4 automake</span></li></ul>
</ul>
<span style="font-family: arial;">then download</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ wget
https://github.com/hayguen/kalibrate-rtl/archive/master.zip</span>
</div>
<div>
<span style="font-family: courier new, courier, monospace; font-size: x-small;"><br /></span>
</div>
<div>
<span style="font-family: arial;">and unzip the actual software</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
<span style="font-family: courier;"><span style="background-color: #eeeeee; font-size: x-small;">$ </span><span style="background-color: #eeeeee; font-size: x-small;">unzip master.zip && </span><span style="background-color: #eeeeee; font-size: x-small;">mv kalibrate-rtl-master </span><span style="background-color: #eeeeee; font-size: x-small;">kalibrate-rtl</span></span><br />
<br />
<span style="font-family: arial;">Install/compile with
<span style="background-color: red;">(For Buster please check remark below !)</span></span><br /><br /></div><div>
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; text-align: left; width: 150px;">
$ cd kalibrate-rtl<br />
$ bash bootstrap<br />
$ bash configure<br />
$ make<br />
$ sudo make install<br />
</div>
</div>
<div>
<br />
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif" style="font-size: medium;"><b>Check install</b></span><br />Check the installation showing help for the program with<br /></span>
<br />
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ <span style="font-variant-ligatures: no-common-ligatures;">kal -h</span></span><br />
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style>
<br />
<span style="font-family: arial;"><b><span face=""arial" , "helvetica" , sans-serif" style="font-size: medium;">Calibration</span></b><br /><span face=""arial" , "helvetica" , sans-serif">Check
<a href="https://en.wikipedia.org/wiki/GSM_frequency_bands" target="_blank">which GSM bands</a>
are available in Your place.</span><br />
<br />
<span face=""arial" , "helvetica" , sans-serif">Living in EU I will use GSM900 and the command</span></span><br />
<br />
<div style="background-color: #eeeeee; text-align: left; width: 400px;">
<span class="s1" style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><b>$</b></span><span class="s2" style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> sudo kal -s GSM900</span><br />
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Found 1 device(s):</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>0:<span class="Apple-converted-space"> </span>Generic RTL2832U OEM</span></span>
</div>
<div class="p2">
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="s2"></span><br /></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Using device 0: Generic RTL2832U OEM</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Found Rafael Micro R820T tuner</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Exact sample rate is: 270833.002142 Hz</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">[R82XX] PLL not locked!</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">kal: Scanning for GSM-900 base stations.</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">GSM-900:</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>chan: <span class="Apple-converted-space"> </span>44 (943.8MHz + 3.197kHz)<span class="Apple-converted-space"> </span>power: <span class="Apple-converted-space"> </span>52359.35</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>chan: <span class="Apple-converted-space"> </span>58 (946.6MHz + 3.014kHz)<span class="Apple-converted-space"> </span>power: <span class="Apple-converted-space"> </span>98282.66</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>chan: <span class="Apple-converted-space"> </span>71 (949.2MHz + 3.248kHz)<span class="Apple-converted-space"> </span>power: <span class="Apple-converted-space"> </span>34079.74</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>chan: <span class="Apple-converted-space"> </span>79 (950.8MHz + 2.675kHz)<span class="Apple-converted-space"> </span>power: <span class="Apple-converted-space"> </span>34617.79</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>chan: <span class="Apple-converted-space"> </span>81 (951.2MHz + 3.682kHz)<span class="Apple-converted-space"> </span>power: <span class="Apple-converted-space"> </span>26689.15</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>chan: <span class="Apple-converted-space"> </span>85 (952.0MHz + 2.968kHz)<span class="Apple-converted-space"> </span>power: <span class="Apple-converted-space"> </span>32904.71</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>chan: <span class="Apple-converted-space"> </span>88 (952.6MHz + 2.717kHz)<span class="Apple-converted-space"> </span>power: <span class="Apple-converted-space"> </span>90496.63</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>chan: <span class="Apple-converted-space"> </span>90 (953.0MHz + 3.777kHz)<span class="Apple-converted-space"> </span>power: <span class="Apple-converted-space"> </span>33726.00</span></span>
</div>
<div class="p1"></div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">...chan 119</span></span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> </span>
</div>
</div>
<br />
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">We now see that the offset is around -3 ppm(Parts Per Million). For
channel 58, strongest channel, => 3,014/943800 = 0,00000319.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif">Confirm this with</span></span><br />
<br />
<div style="background-color: #eeeeee; text-align: left; width: 400px;">
<span class="s1" style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><b>$</b></span><span class="s2" style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> sudo kal -c 58</span><br />
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Found 1 device(s):</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="Apple-converted-space"> </span>0:<span class="Apple-converted-space"> </span>Generic RTL2832U OEM</span></span>
</div>
<div class="p2">
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span class="s2"></span><br /></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Using device 0: Generic RTL2832U OEM</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Found Rafael Micro R820T tuner</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Exact sample rate is: 270833.002142 Hz</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">[R82XX] PLL not locked!</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">kal: Calculating clock frequency offset.</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Using GSM-900 channel 58 (946.6MHz)</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Tuned to 946.600000MHz (reported tuner error: 0Hz)</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">average<span class="Apple-tab-span"> </span><span class="Apple-tab-span"></span>[min, max]<span class="Apple-tab-span"> </span>(range, stddev)</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">+ 3.038kHz<span class="Apple-tab-span"> </span><span class="Apple-tab-span"></span>[3013, 3060]<span class="Apple-tab-span"> </span>(46, 12.023702)</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">overruns: 0</span></span>
</div>
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">not found: 0</span></span>
</div>
<br />
<div class="p1">
<span class="s2"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">average absolute error: -3.190 ppm</span></span>
</div>
</div>
<br />
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">Go through the channels with the highest gain and wright down an
average.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span> </span><span face=""arial" , "helvetica" , sans-serif"><span style="font-family: arial;">If using</span> </span><span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace; font-size: x-small;">aisdeco2</span><span face=""arial" , "helvetica" , sans-serif">
<span style="font-family: arial;">add</span></span>
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace; font-size: x-small;">--freq-correction -3.2</span><span face=""arial" , "helvetica" , sans-serif">
<span style="font-family: arial;">to the call</span></span><br />
<br />
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace; font-size: x-small;">sudo aisdeco2 --freq-correction -3.2 --udp 127.0.0.1:10110</span><br />
<div class="p1">
<br /><span style="font-family: arial;"> And using rtl_ais add</span> <span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace; font-size: x-small;">-p -3.2</span> <span style="font-family: arial;">to the call </span><br />
<br />
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace; font-size: x-small;">sudo rtl_ais -R on -n -p -3.2</span>
</div>
<div class="p1">
<br />
</div>
<div class="p1">
<span style="font-family: arial;"><b><span face=""arial" , "helvetica" , sans-serif" style="background-color: red; font-size: medium;">Remark</span></b>
</span>
</div>
<div class="p1">
<span style="font-family: arial;">Please note that there is a bug in Buster so You have to edit the
file</span> <span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace; font-size: x-small;">/usr/lib/arm-linux-gnueabihf/pkgconfig/librtlsdr.pc</span>
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">before compiling the program</span></span>
</div>
<span style="font-family: arial;">
<br />
<span face=""arial" , "helvetica" , sans-serif">Save a copy and edit</span></span><br />
<br />
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace; font-size: x-small;">$ sudo cp /usr/lib/arm-linux-gnueabihf/pkgconfig/librtlsdr.pc
/usr/lib/arm-linux-gnueabihf/pkgconfig/librtlsdr_old.pc</span><br />
<span style="background-color: #eeeeee; font-family: "courier new" , "courier" , monospace; font-size: x-small;">$ sudo nano /usr/lib/arm-linux-gnueabihf/pkgconfig/librtlsdr.pc</span><br />
<br />
<span style="font-family: arial;">so that the file contains the following info</span><br />
<br />
<div style="background-color: #eeeeee; text-align: left; width: 400px;">
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">prefix=/usr</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">exec_prefix=${prefix}</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">libdir=${exec_prefix}/lib/arm-linux-gnueabihf</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">includedir=${prefix}/include</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Name: RTL-SDR Library</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Description: C Utility Library</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Version: 0.6.0</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Cflags: -I${includedir}/</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Libs: -L${libdir} -lrtlsdr</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Libs.private: -lusb-1.0 </span>
</div>
<br />
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}</style><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}</style><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style>
</div>
</div>
<div>
<div>
<span style="font-family: arial;"> If You did a "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">make</span><span style="font-family: arial;">", and got the error, before the change of the "</span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">librtlsdr.pc</span></span><span style="font-family: arial;">" do a </span>"<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">make clean</span>" <span style="font-family: arial;">and then a "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">make</span><span style="font-family: arial;">" again </span>
</div>
</div>
<div><br /></div>
</div>
</div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com8tag:blogger.com,1999:blog-2016632442552546592.post-77551228086406865442023-12-01T11:15:00.010+01:002024-03-01T11:49:39.745+01:00Signal K quick install<p style="text-align: left;"></p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikCzzIca65ogz_LV6LcffddRsRS8gg3i3Nseb_b21quV3d_RDs7fpA4dLO1mQ8iY36bK5kUYc3TgqknE7Q60fTOYzCpSMINXMcVYSCIlQDQVQvsTTu89y3PgwA1BBJsPSZm4iRWNtxcLZx/s419/SignalK.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="419" data-original-width="120" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikCzzIca65ogz_LV6LcffddRsRS8gg3i3Nseb_b21quV3d_RDs7fpA4dLO1mQ8iY36bK5kUYc3TgqknE7Q60fTOYzCpSMINXMcVYSCIlQDQVQvsTTu89y3PgwA1BBJsPSZm4iRWNtxcLZx/w57-h200/SignalK.png" width="57" /></a>
</div>
<div style="text-align: left;"><span style="font-family: arial;"><span style="background-color: #04ff00;">Updated 2023-12-01 !</span></span></div><div style="text-align: left;"><span style="font-family: arial;"><br /></span></div><div style="text-align: left;"><span style="font-family: arial;">I have got some questions installing, just, <a href="https://signalk.org" target="_blank">Signal K</a>(SK) so will do a
summary, on a Raspberry Pi, with links.</span></div><div style="text-align: left;"><span style="font-family: arial;"><br /></span><span style="font-family: arial;"><span>Signal K is the hub to receive data, from different devices in different
data formats, and send it on to different equipment, or databases, in
different formats. Most common for standard marine equipment are the old NMEA 0183 and the newer NMEA 2000 protocol which is also handled. </span></span></div><div style="text-align: left;"><span style="font-family: arial;"><span><br /></span></span><span style="font-family: arial;"><span><span style="font-family: arial;">Besides the SK "hub" function developers </span><span style="font-family: arial;">have <a href="https://www.npmjs.com/search?q=signalk" target="_blank">created </a></span><span style="font-family: arial;"><a href="https://www.npmjs.com/search?q=signalk" target="_blank">plugins</a> for different purposes. This is due to that </span><span style="font-family: arial;">SK is open-source ! Sharing is caring !</span></span></span></div><div style="text-align: left;"><span style="font-family: arial;"><span><br /></span></span></div><div style="text-align: left;"><span style="font-family: arial;"><span>In
<a href="https://pysselilivet.blogspot.com/2018/03/nmea-wifi-gateway.html" target="_blank">this post</a>
you can check the devices I'm using connected to the SK server and also my setup.</span></span></div><div style="text-align: left;"><span style="font-family: arial;"><span><br /></span></span><a name='more'></a><span style="font-family: arial;"><span style="font-size: large;"><b>Intro and OpenPlotter</b></span></span></div><div style="text-align: left;"><span style="font-family: arial;">If you want an </span><b style="font-family: arial;">advanced</b><span style="font-family: arial;"> </span><span style="font-family: arial;">open-Source</span><span style="font-family: arial;"> </span><b style="font-family: arial;">navigation</b><span style="font-family: arial;"> </span><span style="font-family: arial;">application please check</span><span style="font-family: arial;"> </span><a href="https://opencpn.org" style="font-family: arial;" target="_blank">OpenCPN</a><span style="font-family: arial;">(OC).</span></div><div><div><span style="font-family: arial;"><p style="font-family: -webkit-standard;"><span><span style="font-family: arial;">So why mention OC when this post concerns SK ?</span></span></p></span></div><div><span style="font-family: arial;">It could be that the best solution for you is to use both SK and OC.
</span><a href="https://pysselilivet.blogspot.com/2020/07/understandinstall-openplotteropencpnsig.html" style="font-family: arial;" target="_blank">Check this post</a><span style="font-family: arial;">
where another software package, <a href="https://openmarine.net/openplotter" target="_blank">OpenPlotter</a>, is doing the total installation of both.</span><p></p>
<div style="text-align: left;"><span style="font-family: arial; font-size: large;"><b>SK install<br /></b></span><span style="caret-color: rgb(68, 68, 68); font-family: arial;">There is a good </span><a href="https://github.com/SignalK/signalk-server/blob/master/docs/src/installation/raspberry_pi_installation.md" style="caret-color: rgb(68, 68, 68); font-family: arial;" target="_blank">SK installation instruction</a><span style="caret-color: rgb(68, 68, 68); font-family: arial;"> but will do a compact one here, where ju start with a RPi update</span></div><div style="caret-color: rgb(68, 68, 68); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: left;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><br /></span></div><div style="caret-color: rgb(68, 68, 68);"><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;"><span class="s2">s</span>udo apt update && sudo apt full-upgrade -y && sudo apt clean</span></span><br /><span style="font-family: arial; font-size: 13px;"><br /></span><span style="font-family: arial;">Via ssh/terminal <a href="https://github.com/nodesource/distributions#installation-instructions" target="_blank">install Node.js(V18) and NPM</a> </span></div><div style="caret-color: rgb(68, 68, 68);"><br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash<br />sudo apt install nodejs && sudo npm install -g npm@lates<br /></span><br /><span style="font-family: arial;">and check the install with</span></div><div style="caret-color: rgb(68, 68, 68);"><span style="font-family: arial; font-size: 13px;"><br /></span></div><div style="caret-color: rgb(68, 68, 68);"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">node -v && npm -v</span></div><div style="caret-color: rgb(68, 68, 68);"><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px;"><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Install Bonjour (mDNS)</span></div><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px;"><br /></div><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">sudo apt install libnss-mdns avahi-utils libavahi-compat-libdnssd-dev</span></span><div><br /><span style="font-family: arial;">Install the SK server with </span><br /><span style="font-family: courier; font-size: x-small;"><span style="background-color: #eeeeee;"><br /></span><span style="background-color: #eeeeee;">sudo npm install -g signalk-server</span></span><br /><span face="Arial, Tahoma, Helvetica, FreeSans, sans-serif" style="font-size: 13px;"><span face="arial, helvetica, sans-serif"></span></span><span face="arial, helvetica, sans-serif"><br /><span style="font-family: arial;">(There could be some <b>warnings</b> but it's OK)</span></span></div><div><span face="arial, helvetica, sans-serif"><span style="font-family: arial;"><br /></span></span></div></div>
<div style="caret-color: rgb(68, 68, 68);"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="color: #444444;"><b><span style="font-size: large;">Testing</span></b><br /></span><span face="arial, helvetica, sans-serif">Test the server with a sample logfile</span></span><br /><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">signalk-server --sample-nmea0183-data</span></span><br /><span face="arial, helvetica, sans-serif"><br /><span style="font-family: arial;">In a WEB browser check with, (If You are using another Hostname, change)</span></span><br /><span face="Arial, Tahoma, Helvetica, FreeSans, sans-serif" style="font-size: 13px;"><br /></span><span style="background-color: #eeeeee;"><a href="http://raspberrypi:3000/"><span style="font-family: courier; font-size: x-small;">http://raspberrypi:3000/</span></a></span><br /><span face="Arial, Tahoma, Helvetica, FreeSans, sans-serif" style="font-size: 13px;"><br /></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">and the <a href="https://github.com/SignalK/signalk-server/blob/master/README.md#opening-the-signal-k-server-admin-ui" target="_blank">SK dashboard</a> will show. In the upper left corner click on "Webapps => @signalk/freeboard-sk"</span><span face="arial, helvetica, sans-serif">, (FSK)</span><span face="arial, helvetica, sans-serif"> and a world map will open with a boat symbol in the south of Finland. Zoom in and watch the boat approaching Österby.</span></span></div><div style="caret-color: rgb(68, 68, 68); text-align: left;"><br /></div><div style="caret-color: rgb(68, 68, 68); text-align: left;"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><b><span style="font-size: large;">Configuration</span></b><br /></span></span><div><span style="font-family: arial;">Terminate the SK server with "Ctrl + C" and run the SK server configuration</span></div><div><span face="arial, helvetica, sans-serif"><span style="font-family: arial;"><br /></span></span><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">sudo signalk-server-setup</span></span><span face="Arial, Tahoma, Helvetica, FreeSans, sans-serif" style="font-size: 13px;"><br /></span><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">and <a href="https://github.com/SignalK/signalk-server/blob/master/docs/src/installation/raspberry_pi_installation.md#run-the-setup-script" target="_blank">set up the app</a> following the instructions. (Don't use SSL to keep it simple.)<br /></span><span style="font-family: arial;"><b><br /></b></span></div><div><span style="font-family: arial;"><b><span style="font-size: large;">Admin account and connections</span><br /></b></span><span style="font-family: arial;">In <a href="https://github.com/SignalK/signalk-server/blob/master/docs/src/setup/configuration.md#configuring-signal-k-server" target="_blank">this link</a> you can learn more.</span><span style="font-family: arial;"><span><br /></span></span></div></div><p style="text-align: left;">
</p>
<div style="caret-color: rgb(68, 68, 68);"><span style="font-family: arial; font-size: large;"><b>Offline charts<br /></b></span><span style="font-family: arial;">The charts that are displayed are online charts and if you use the application offline you can </span><a href="https://pysselilivet.blogspot.com/2021/09/signal-k-charts-offline-online.html" style="font-family: arial;" target="_blank">download offline charts</a><span style="font-family: arial;">.</span></div><div style="caret-color: rgb(68, 68, 68);"><span><div class="markdown-heading" style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328; font-family: arial; position: relative;"><h3 class="heading-element" style="box-sizing: border-box; line-height: 1.25; margin-bottom: 16px; margin-top: 24px;"><span face="-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"" style="font-size: 1.25em; font-weight: var(--base-text-weight-semibold, 600);">Migrate a Signal K server</span><br /><span style="font-weight: normal;"><span style="font-size: small;">This method was used to migrate a SK server, Raspberry pi, from Bullseye, Node 16 to Bookworm Node 20. On the source SK server update the server and all plugins. The following objects are needed on the target SK server</span></span></h3></div><ul style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"><li style="box-sizing: border-box;"><span><code style="border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/package.json</span></code><span style="font-family: arial;">, file</span></span></li><li style="box-sizing: border-box; margin-top: 0.25em;"><span><code style="border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/settings.json</span></code><span style="font-family: arial;">, file</span></span></li><li style="box-sizing: border-box; margin-top: 0.25em;"><span><code style="border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/plugin-config-data</span></code><span style="font-family: arial;">, directory</span></span></li></ul><p style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328; font-family: arial; margin-bottom: 16px; margin-top: 0px;">Create a target server installing Signal K, logon and then remove/rename</p><ul style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"><li style="box-sizing: border-box;"><span><code style="border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/node_modules</span></code><span class="Apple-converted-space" style="font-family: arial;"> </span><span style="font-family: arial;">(Will disable the installed plugins)</span></span></li><li style="box-sizing: border-box; margin-top: 0.25em;"><span><code style="border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/settings.json</span></code><span class="Apple-converted-space" style="font-family: arial;"> </span><span style="font-family: arial;">(SK server settings)</span></span></li><li style="box-sizing: border-box; margin-top: 0.25em;"><span><code style="border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/package.json</span></code><span class="Apple-converted-space" style="font-family: arial;"> </span><span style="font-family: arial;">(Node.js metadata)</span></span></li></ul><p style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328; margin-bottom: 16px; margin-top: 0px;"><span style="font-family: arial;">Restore the files</span><span class="Apple-converted-space" style="font-family: arial;"> </span><code style="border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">settings.json</span></code><span class="Apple-converted-space" style="font-family: arial;"> </span><span style="font-family: arial;">and</span><span class="Apple-converted-space" style="font-family: arial;"> </span><code style="border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">package.json</span></code><span style="font-family: arial;">, from the source server, to target server in folder</span><span class="Apple-converted-space" style="font-family: arial;"> </span><code style="border-radius: 6px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/</span></code></p></span><p style="box-sizing: border-box; caret-color: rgb(31, 35, 40); margin-bottom: 16px; margin-top: 0px;"><span><span style="color: #1f2328; font-family: arial;">In</span><span class="Apple-converted-space" style="color: #1f2328; font-family: arial;"> </span><code style="border-radius: 6px; box-sizing: border-box; color: #1f2328; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/</span></code><span class="Apple-converted-space" style="color: #1f2328; font-family: arial;"> </span><span style="color: #1f2328; font-family: arial;">run</span><span class="Apple-converted-space" style="color: #1f2328; font-family: arial;"> </span><code style="border-radius: 6px; box-sizing: border-box; color: #1f2328; margin: 0px; padding: 0.2em 0.4em; white-space-collapse: break-spaces;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">npm install</span></code></span> <span style="font-family: arial;">which will install all the plugins listed in </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">package.json</span></p><p style="caret-color: rgb(68, 68, 68); text-align: left;"><span style="font-family: arial;">Remove/rename </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/plugin-config-data</span><span style="font-family: arial;"> (Plugin settings)<br /></span><br /><span style="font-family: arial;">Restore the </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">plugin-config-data</span><span style="font-family: arial;"> folder, from the source server, to target server in folder </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$HOME/.signalk/</span></p></div><div style="text-align: left;"><span><p style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328; font-family: arial; margin-bottom: 16px; margin-top: 0px;">Restart the SK target server and check the result.</p><p style="box-sizing: border-box; caret-color: rgb(31, 35, 40); color: #1f2328; margin-bottom: 16px; margin-top: 0px;"><span style="font-family: arial;">A nice way to copy data from one server to another is using command </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">scp</span><span style="font-family: arial;"> which demands that </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">ssh</span><span style="font-family: arial;"> is activated on both SK servers. So for example use below command copying the folder </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">plugin-config-data</span><span style="font-family: arial;">.</span></p><p style="box-sizing: border-box; margin-bottom: 16px; margin-top: 0px;"><span style="color: #1f2328; font-family: courier; font-size: x-small;"><span style="background-color: #eeeeee; caret-color: rgb(31, 35, 40);">pi@source:~/.signalk $ scp -r plugin-config-data pi@target.local:</span></span></p></span></div><div style="caret-color: rgb(68, 68, 68);"><div style="text-align: left;"><span style="font-family: arial;"><span style="font-size: large;"><b>Remark</b></span></span></div><div><span style="font-family: arial;">And don't forget to check out the embedded <a href="https://www.npmjs.com/package/@signalk/signalk-node-red" target="_blank">NodeRed(NR) plugin</a> that will handle "any" input to be used with SK and forwarded to your NMEA devices (With appropriate hardware). NR should be installed via SK app store.</span></div></div><p style="text-align: left;"><span style="font-family: arial;"><span>Enjoy !</span></span></p><p style="text-align: left;">
</p>
</div></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com0tag:blogger.com,1999:blog-2016632442552546592.post-34193641180779787772023-11-09T10:00:00.006+01:002023-12-18T18:27:43.779+01:00AIS receiver & dispatcher with OpenSeaMap<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Rc2fvVWaGoJEsR8sUO6FDxbQad_aZKcwVQ7iAaLB7DxOcGmgzbIKXLVwGZ773uYh5dWElEiudqBfsXfkSoHSuBnwH5cY-th5GcDGT1Vyk18D3VTfl0YpTRjfEcqOQWribGz3s9qVPref/s1600/AIS_SK.001.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Rc2fvVWaGoJEsR8sUO6FDxbQad_aZKcwVQ7iAaLB7DxOcGmgzbIKXLVwGZ773uYh5dWElEiudqBfsXfkSoHSuBnwH5cY-th5GcDGT1Vyk18D3VTfl0YpTRjfEcqOQWribGz3s9qVPref/s200/AIS_SK.001.jpeg" width="200" /></a><span><span style="font-family: arial;"><div>
<span face="arial, helvetica, sans-serif"><span style="background-color: lime;">Updated 2023-11-09 !</span></span>
</div>
<div>
<span face="arial, helvetica, sans-serif"><br /></span>
</div>
The
<a href="https://pysselilivet.blogspot.com/search?q=ais&max-results=20&by-date=true" target="_blank">AIS posts on this blog</a>
have been very popular so this post will be a follow up which will enable
You to show AIS targets, including AtoN:s, on <a href="https://www.openseamap.org/index.php?id=openseamap&L=1" target="_blank">OpenSeaMap</a>, (OSM), together with buoys and beacons.</span><br />
<span style="font-family: arial;"><br /></span>
<span style="font-family: arial;">The application showing the map is
<a href="http://signalk.org/" target="_blank">SignalK</a>, (SK) a OpenSource
project for marine use. </span><br />
<span style="font-family: arial;"><br /></span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">With the "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><a href="https://www.npmjs.com/package/ais-forwarder" target="_blank">ais-forwarder</a></span><span style="font-family: arial;">" plugin you could send/dispatch the NMEA AIS data to<span style="background-color: white; color: #444444;"> </span><a href="https://www.marinetraffic.com/en/p/expand-coverage" style="background-color: white; color: #3778cd;" target="_blank">Marinetraffic</a><span style="background-color: white; color: #444444;"> or </span><a href="https://stations.vesselfinder.com/become-partner" style="background-color: white; color: #3778cd;" target="_blank">Vesselfinder</a><span style="background-color: white; color: #444444;">. Another</span> </span><a href="https://pysselilivet.blogspot.com/2019/10/ais-dispatcher-stand-alone.html" rel="nofollow" style="font-family: arial;" target="_blank">AIS-dispatcher</a><span style="font-family: arial;">.</span></span></span><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">The best AIS application ? <a href="https://pysselilivet.blogspot.com/2023/12/ais-receiver-and-dispatcher-best.html" rel="nofollow" target="_blank">is found here</a> !<br /></span>
<span face="arial, helvetica, sans-serif"></span>
<br />
<a name='more'></a><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: large;"><b id="Install">Install</b> </span><br /><span face="arial, helvetica, sans-serif">Starting fresh with a
<a href="https://pysselilivet.blogspot.com/2017/02/rpi-raspbian-install-with-mac.html" target="_blank">Raspberry Pi OS</a>
? </span><span face="arial, helvetica, sans-serif">You just have to install the Raspberry Pi OS Lite version, no GUI, or
other software packages, since SK has its own WEB-server.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Install the server software, <b>Signal K</b>, using <a href="https://pysselilivet.blogspot.com/2021/05/signal-k-quick-install.html" rel="nofollow" target="_blank">these instructions</a> and after that continue below.</span></span></div><div><div><div><span style="font-family: arial;">
<span face="arial, helvetica, sans-serif"><br /><span style="font-size: large;"><b>Connecting AIS receiver</b></span><br /></span>
<span face="arial, helvetica, sans-serif">Now You can
<a href="https://pysselilivet.blogspot.com/2020/05/ais-reciever-for-raspberry-pi-2-channel.html" target="_blank">add the USB AIS receiver</a> or any other AIS source.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif"><b>Center Vessel via file</b></span>
<span face="arial, helvetica, sans-serif"><br /></span><span face="arial, helvetica, sans-serif">In FSK You can
<span style="background-color: white;">"Center Vessel" </span>in
the Map. (Click on the square symbol to the left.) If You don't have a
GPS connected its pretty easy to create a fake position with a
<a href="https://gpsd.gitlab.io/gpsd/NMEA.html#_gll_geographic_position_latitude_longitude" target="_blank">NMEA 0183 GLL sentence</a>.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">A raw GLL, without checksum, could be, (In this case the beacon at
Kronborg Castle, Denmark) </span><br /></span>
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">GPGLL,5602.358,N,1237.341,E,000000,A,M</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">Change to Your Latitude/Longitude and copy the sentence to the input
field at this WEB-site</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><a href="https://nmeachecksum.eqth.net/">https://nmeachecksum.eqth.net</a></span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">Which will create an output of</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">$GPGLL,5602.358,N,1237.341,E,000000,A,M*75</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">Create a file with </span><br />
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">cd ~/.signalk && nano position.log</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">and paste the GLL sentence, exit and save.</span><br />
<span face="arial, helvetica, sans-serif"><br /><b>SK Data Connections</b><br /></span>
<span face="arial, helvetica, sans-serif">In the SK admin GUI go to ”Server => Data Connections”</span><span class="Apple-converted-space" face="arial, helvetica, sans-serif"> </span><span face="arial, helvetica, sans-serif">and add</span><span class="Apple-converted-space" face="arial, helvetica, sans-serif"> </span><br />
</span>
<ul>
<li>
<span style="font-family: arial;">Input type: File Stream</span>
</li>
<li><span style="font-family: arial;">Enabled: Yes</span></li>
<li><span style="font-family: arial;">ID: Position</span></li>
<li><span style="font-family: arial;">Data Type: NMEA 0183</span></li>
<li>
<span style="font-family: arial;">File Name: position.log</span>
</li>
</ul>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Click on "Apply" and then "Restart", in the upper right corner, and
check Your position in FSK.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif"><b>Center Vessel via Node-Red</b></span><br /><span face="arial, helvetica, sans-serif">Another way, low CPU load, is using the
<a href="https://www.npmjs.com/package/@signalk/signalk-node-red" target="_blank">Node-Red plugin</a>. Import, to NR, the flow below and it will send the position and
true course over ground once a minute.</span></span><span face="arial, helvetica, sans-serif"><br /></span>
<br />
<div style="background-color: #eeeeee; text-align: left; width: 600px;">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">[{"id":"fd361496.69e0b8","type":"change","z":"d9a5f13f.6387f","name":"Set
navigation/position/","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"longitude\":12.622315,\"latitude\":56.03929}","tot":"json"},{"t":"set","p":"topic","pt":"msg","to":"navigation.position","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":40,"wires":[["45f769a.37bfb18"]]},{"id":"45f769a.37bfb18","type":"signalk-send-pathvalue","z":"d9a5f13f.6387f","name":"","source":"","x":590,"y":40,"wires":[]},{"id":"4c2f5356.3f5af4","type":"inject","z":"d9a5f13f.6387f","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":40,"wires":[["fd361496.69e0b8","976e0876.f8084"]]},{"id":"976e0876.f8084","type":"change","z":"d9a5f13f.6387f","name":"Set
navigation/courseOverGroundTrue","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"topic","pt":"msg","to":"navigation.courseOverGroundTrue","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":100,"wires":[["45f769a.37bfb18"]]}]</span>
</div>
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">If You don't wan't North up in the map, You can just adjust the
course and click on "Show Heading Up" Please note that the course is
in
<a href="https://en.wikipedia.org/wiki/Radian" target="_blank">radians</a>.</span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="font-size: xx-large;"><span style="font-size: small;"><br /></span></span></span></span><span style="font-family: arial;"><b><span style="font-size: large;">Dispatcher</span><span style="font-size: x-large;"><style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style></span></b></span></div><div><span style="font-family: arial;"><b>Install</b></span></div><div><span style="font-family: arial;">As said above the "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><a href="https://www.npmjs.com/package/ais-forwarder" target="_blank">ais-forwarder</a></span><span style="font-family: arial;">" plugin will forward VDM/VDO messages. Install and check the dokumentation.</span></div><div><span style="font-family: arial;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBbFQQ7PjirJ-x8UGLQ0hGjrd0qmJ1hiGplE5r2QAIdBT9ei3oMrLVa2dslwkCWZv4pKm1YJAj3e10ldW6lwwXskr4L0jcRyR0-D3vg4HBzutvCSqrU76mTGs70W0F6E6yX79A1Fw2hcE4KD7aiLI5Ajo1_1qD700x6tYYuJMqo_NT1mY2tdEo5qkx0xi9/s665/AIS_forwarder.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="665" data-original-width="663" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBbFQQ7PjirJ-x8UGLQ0hGjrd0qmJ1hiGplE5r2QAIdBT9ei3oMrLVa2dslwkCWZv4pKm1YJAj3e10ldW6lwwXskr4L0jcRyR0-D3vg4HBzutvCSqrU76mTGs70W0F6E6yX79A1Fw2hcE4KD7aiLI5Ajo1_1qD700x6tYYuJMqo_NT1mY2tdEo5qkx0xi9/w151-h152/AIS_forwarder.png" width="151" /></a></div><span style="font-family: arial;"><b>Test</b></span></div><div><span style="font-family: arial;">To test the dispatcher function you could <a href="https://github.com/SignalK/signalk-server/blob/master/docs/src/setup/configuration.md#set-up-data-connections" target="_blank">set up a connection</a> type "File Stream" with the sample file for NMEA 2000. Since the ship tracking sites just accepts NMEA 0183 you also have to install the "</span><span style="font-family: courier; font-size: x-small;"><a href="signalk-n2kais-to-nmea0183" style="background-color: #eeeeee;" target="_blank">signalk-n2kais-to-nmea0183</a></span><span style="font-family: arial;">" plugin. Set "</span><span style="background-color: #eeeeee; caret-color: rgb(21, 27, 30); color: #151b1e;"><span style="font-family: courier; font-size: x-small;">NMEA 0183 Out Events</span></span><span face="-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"" style="background-color: white; caret-color: rgb(21, 27, 30); color: #151b1e; font-size: 14px;">" </span><span style="background-color: white; caret-color: rgb(21, 27, 30); color: #151b1e;"><span style="font-family: arial;">to "</span></span><span style="color: #151b1e;"><span style="caret-color: rgb(21, 27, 30);"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">nmea0183ais</span><span face="-apple-system, system-ui, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, Liberation Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"><span style="background-color: white; font-size: 14px;">".</span></span></span></span></div><div><span style="color: #151b1e;"><span style="caret-color: rgb(21, 27, 30);"><span face="-apple-system, system-ui, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, Liberation Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"><span style="background-color: white; font-size: 14px;"><br /></span></span></span></span></div><div><span style="color: #151b1e; font-family: arial;"><span style="caret-color: rgb(21, 27, 30);"><span style="background-color: white;">Setup the forwarder as picture and at a command line check with </span></span></span></div><div><span style="color: #151b1e; font-family: arial;"><span style="caret-color: rgb(21, 27, 30);"><span style="background-color: white;"><br /></span></span></span></div><div><p class="p1" style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">nc -ul 5556</span></span></p></div><div><br /></div>
</div>
</div>
</div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com7tag:blogger.com,1999:blog-2016632442552546592.post-90571336245955293912023-11-08T17:27:00.004+01:002023-11-09T10:28:49.367+01:00Raspberry Pi watchdog made simple<p></p>
<div class="separator" style="clear: both; text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh06E5E-qSB8wJygK5dTO6hgOVs2rtt4DL9aMwNSaSyc5YaGfBtFaWhlqd_E_kWvwVMMuSJ9lVoU8wAY7iYiBfQyNKF7fWUAdDO4aNd8U-bPysdEKoi8f608xsROrKSMmIL8ppJTRfoon5j/s784/watchdog.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="734" data-original-width="784" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh06E5E-qSB8wJygK5dTO6hgOVs2rtt4DL9aMwNSaSyc5YaGfBtFaWhlqd_E_kWvwVMMuSJ9lVoU8wAY7iYiBfQyNKF7fWUAdDO4aNd8U-bPysdEKoi8f608xsROrKSMmIL8ppJTRfoon5j/w183-h172/watchdog.jpg" width="183" /></a>
</div>
</div>
<span style="font-family: arial;"><div><span style="background-color: lime;">Updated 2023-11-08 for Bookworm !</span></div>
<div><br /></div>
<div>
The purpose of a watchdog timer(WD) is very
<a href="https://en.wikipedia.org/wiki/Watchdog_timer" target="_blank">well described here</a>
but a more practical answer is;
</div></span>
<p></p>
<div>
<span style="font-family: arial;"><b>If your Raspberry Pi(RPi) "freezes", or hangs, it will automagically
reboot within a very short time.</b></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">This is made with a combination of hardware and software which is all ready
available, on the RPi, and just have to be enabled.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">After some hours Googling and testing these are my findings !</span>
</div>
<div><br /></div>
<div>
<span><a name='more'></a></span><span style="font-family: arial; font-size: x-large;"><b>Intro</b></span>
</div>
<div>
<span style="font-family: arial;">There are different ways activating a WD function, including installing
packages, but
<a href="https://raspberrypi.stackexchange.com/questions/108080/watchdog-on-the-rpi4" target="_blank">this "native" way</a>
seems to be the most simple.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">You can check the devices involved with</span>
</div>
<div><br /></div>
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; text-align: left; width: 400px;">
$ ls -al /dev/watchdog*<br />
crw------- 1 root root 10, 130 Oct 1 14:17 /dev/watchdog<br />
crw------- 1 root root 250, 0 Oct 1 14:17 /dev/watchdog0<br />
</div>
<div><br /></div>
<div>
<span style="font-family: arial;">and the hardware involved are
<a href="https://www.raspberrypi.org/documentation/computers/processors.html" target="_blank">the processors on the RPI</a>.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">The WD is a
<a href="https://wiki.debian.org/systemd/" target="_blank">systemd</a>
process so you can use the "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">systemctl</span><span style="font-family: arial;">" command to show the <b>default</b> setup.</span>
</div>
<div></div>
<div><br /></div>
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; text-align: left; width: 350px;">
<div style="width: 250px;">$ systemctl show | grep -i watchdog</div>
<div style="width: 350px;">
WatchdogLastPingTimestampMonotonic=18446744073709551615
</div>
<div style="width: 250px;">RuntimeWatchdogUSec=0</div>
<div style="width: 250px;">RuntimeWatchdogPreUSec=0</div>
<div style="width: 250px;">RebootWatchdogUSec=10min</div>
<div style="width: 250px;">KExecWatchdogUSec=0</div>
<div style="width: 250px;">ServiceWatchdogs=yes</div>
</div>
<div></div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">The info "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">RuntimeWatchdogUSec=0</span><span style="font-family: arial;">" </span><span style="font-family: arial;">tells us that the WD isn't active. Must be greater than 0.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: x-large;"><b>Enable the Watchdog</b></span>
</div>
<div><span style="font-family: arial;">The WD is enabled by editing</span></div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo nano /etc/systemd/system.conf</span><br /></span><span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">where the different parameters are <a href="https://manpages.debian.org/bookworm/systemd/systemd-system.conf.5.en.html" target="_blank">described here</a> and </span><span style="font-family: arial;">in my case I choose</span>
</div>
<div>
<span>
<div style="font-family: arial;"><br /></div>
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; text-align: left; width: 200px;">
RuntimeWatchdogSec=10<br />RebootWatchdogSec=2min<br />
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">
which means that <b>if</b> the WD hardware will not be contacted within 10
seconds the reboot process will start and the second parameter ensures
that the reboot takes place even if a clean reboot attempt times out.
</div>
<div style="font-family: arial;"><br /></div>
<div>
<span style="font-family: arial;">Please note that the value "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">RuntimeWatchdogSec</span><span style="font-family: arial;">" must be <= 15, since the RPi processors can't handle a greater
value.</span>
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">
<b><span style="font-size: x-large;">Start the Watchdog</span></b>
</div>
<div style="font-family: arial;">
After a <b>reboot</b> you can check the new values with the above command
and also confirm that the WD process have started. Use
</div>
<div style="font-family: arial;"><br /></div>
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; text-align: left; width: 600px;">
$ dmesg | grep watchdog<br />
[ 3.125165] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer<br />
[ 5.200029] systemd[1]: Hardware watchdog 'Broadcom BCM2835 Watchdog
timer', version 0<br />
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">or using the above command again</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; width: 350px;">
<div style="width: 250px;">
<div style="width: 250px;">$ systemctl show | grep -i watchdog</div>
<div style="width: 250px;">WatchdogDevice=/dev/watchdog0</div>
<div style="width: 350px;">
WatchdogLastPingTimestamp=Wed 2023-11-08 23:09:24 CET
</div>
<div style="width: 350px;">
WatchdogLastPingTimestampMonotonic=336868708
</div>
<div style="width: 250px;">RuntimeWatchdogUSec=10s</div>
<div style="width: 250px;">RuntimeWatchdogPreUSec=0</div>
<div style="width: 250px;">RebootWatchdogUSec=2min</div>
<div style="width: 250px;">KExecWatchdogUSec=0</div>
<div style="width: 250px;">ServiceWatchdogs=yes</div>
</div>
</div>
<div style="font-family: -webkit-standard;"></div>
</div>
<div style="font-family: arial;"><br /></div><div style="font-family: arial;">or on Bookworm </div><div style="font-family: arial;"> </div><div style="background-color: #eeeeee; font-family: courier; font-size: x-small; width: 600px;">$ journalctl -b --no-pager | grep Watchdog</div><div style="background-color: #eeeeee; font-family: courier; font-size: x-small; width: 600px;"><div style="width: 600px;">Nov 09 10:14:41 test systemd[1]: Using hardware watchdog 'Broadcom BCM2835 Watchdog timer', version 0, device /dev/watchdog0</div><div style="width: 600px;">Nov 09 10:14:41 test systemd[1]: Watchdog running with a timeout of 10s.</div><div style="width: 600px;">Nov 09 10:15:05 test rtkit-daemon[802]: Watchdog thread running.</div></div><div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">
<b><span style="font-size: x-large;">Testing ?</span></b>
</div>
<div style="font-family: arial;">
If you dare 😉 you can test the WD function, creating a kernel
panic, <a href="https://www.ibm.com/support/pages/forcing-fake-kernel-panic-testing" target="_blank">with the commands</a>
</div>
<div style="font-family: arial;"><br /></div>
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; text-align: left; width: 300px;">
$ sudo su<br />/home/pi# echo 1 > /proc/sys/kernel/sysrq<br />/home/pi#
echo "c" > /proc/sysrq-trigger<br />
client_loop: send disconnect: Broken pipe<br />
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">
It's said that a
<a href="https://en.wikipedia.org/wiki/Fork_bomb" target="_blank">fork bomb</a>
also can test the WD but it seems that process limit parameters are set,
in later RPi OS, so it limits the amount of forks. Some processes are
terminated and restarted but no reboot.
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">
<span style="font-size: x-large;"><b>Remark</b></span>
</div>
<div style="font-family: arial;">
As mentioned above there also is a
<a href="https://packages.debian.org/bullseye/watchdog" target="_blank">watchdog package</a>
with extended features available, edited in <a href="https://linux.die.net/man/5/watchdog.conf">watchdog.conf</a>, such as;
</div>
<div style="font-family: arial;">
<div>
<ul style="text-align: left;">
<li>Temperature Sensors</li>
<li>Load Averages</li>
<li>Network Monitoring</li>
<li>Network "ping"</li>
<li>File Monitoring</li>
<li>Memory Test</li>
</ul>
</div>
</div>
<div style="font-family: arial;">
where set thresholds for these will restart the RPi.
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">Install with </div>
<div style="font-family: arial;"><br /></div>
<div>
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo apt install watchdog</span>
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">
and check out
<a href="https://www.crawford-space.co.uk/old_psc/watchdog/Linux-Watchdog.html" target="_blank">a very nice site</a>
explaining it all.
</div>
<div style="font-family: arial;"><br /></div>
<div>
<b><span style="font-family: arial; font-size: medium;">A second thought</span></b>
</div>
<div style="font-family: arial;">
I was first very interested in this watchdog package, handling a RPi Zero
WiFi going down, but thought that a reboot was a little "to much" if just
the WiFi is disconnected.
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;">
<a href="https://pysselilivet.blogspot.com/2021/10/raspberry-pi-reboot-or-restart-network.html" target="_blank">This post</a>
handles how to check the WiFi and, if not connected, turn the
<b>interface</b> down/up.
</div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;"><br /></div>
<div style="font-family: arial;"><b>Jessie info</b> </div>
<div style="font-family: arial;">Default setup</div>
<div style="font-family: arial;"><br /></div>
<div>
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; width: 250px;">
$ systemctl show | grep -i watchdog<br />RuntimeWatchdogUSec=0<br />ShutdownWatchdogUSec=10min<br />ServiceWatchdogs=yes<br />
</div>
<div style="font-family: arial;"><br /></div>
<div>
<span style="font-family: arial;"><a href="https://manpages.debian.org/jessie/systemd/systemd-system.conf.5.en.html" target="_blank">Parameters</a>
in </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">/etc/systemd/system.conf</span>
</div>
<div>
<span style="background-color: #eeeeee; font-family: courier; font-size: small;"><br /></span>
</div>
</div>
<div style="font-family: arial;">
<div style="background-color: #eeeeee; font-family: courier; font-size: x-small; width: 200px;">
RuntimeWatchdogSec=10<br />ShutdownWatchdogSec=2min<br />
</div>
<div><br /></div></div></span>
</div>
<div></div>
Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com6tag:blogger.com,1999:blog-2016632442552546592.post-3611316256285037312023-11-06T10:00:00.012+01:002023-12-16T20:27:39.867+01:00NMEA WiFi gateway<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;">
<tbody>
<tr>
<td style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEdluWUYUg_NPQRggCyWzyLVTJkd7uO525fxkb6QtA3Lts00_axiU2vb3Ogov-86G9eOXOG5iuI8AGaBoDjx4Mht9LO-RD1txCTRMLnDiU2WVxCoaGAXUAElPzSk8MDryzlerD24KPhyXP/s1600/IMG_0194.png" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="WillhelmSK" border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEdluWUYUg_NPQRggCyWzyLVTJkd7uO525fxkb6QtA3Lts00_axiU2vb3Ogov-86G9eOXOG5iuI8AGaBoDjx4Mht9LO-RD1txCTRMLnDiU2WVxCoaGAXUAElPzSk8MDryzlerD24KPhyXP/w200-h150/IMG_0194.png" title="WillhelmSK" width="200" /></a>
</td>
</tr>
<tr>
<td class="tr-caption" style="text-align: center;"><br /></td>
</tr>
</tbody>
</table>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="background-color: lime;">Updated 2023-11-06 !</span></span><span style="font-family: arial;"><br /></span>
<p></p>
<p>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">I have searched for a solution transmitting the NMEA data, from the
navigation network, via WiFi, to for example </span><a href="https://itunes.apple.com/us/app/transas-isailor/id398456162?mt=8" target="_blank">iSailor</a><span face="arial, helvetica, sans-serif"> or other Tablet/Phone applications.</span></span><span style="font-family: arial;"><br /></span>
</p>
<p>
<span style="font-family: arial;">Most of these applications just accepts NMEA0183(N1) but many boats are
also using SeaTalk 1(ST1) and NMEA2000(N2K).</span>
</p>
<p>
<span style="font-family: arial;">This post will cover, kept compact, my best findings covering both a DIY
and a commercial approach to handle the different protocols.<br /><br /></span>
</p>
<p><span></span></p>
<a name='more'></a>
<div>
<span style="font-family: arial;"><span style="font-size: x-large;"><b>DYI approach</b></span><br /><b><span style="font-size: medium;">OpenCPN</span></b></span>
</div>
<div>
<span style="font-family: arial;"><a href="https://opencpn.org" target="_blank">OpenCPN</a>(OC) is a chart
plotter navigation software for Win/Mac/Linux/Raspberry Pi(RPi). It's
very <a href="https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual" target="_blank">well documented</a> and have many add ons and can handle different chart formats. The
"only" drawback is that OC can't handle N2K as input, but it's solved since
<a href="https://pysselilivet.blogspot.com/2020/07/understandinstall-openplotteropencpnsig_24.html" target="_blank">OC accepts Signal K data</a>
as input.</span>
</div>
<p></p>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><b><span style="font-size: medium;">Signal K</span><br /></b></span></span><span style="font-family: arial;"><a href="http://signalk.org/" target="_blank">Signal K</a>(SK) started up
as an open dataformat for marine use but now there are many nice
<a href="https://www.npmjs.com/search?q=keywords%3Asignalk-node-server-plugin" target="_blank">plugins</a>. It was made for Linux, <a href="https://github.com/SignalK/signalk-server/blob/master/docs/src/installation/raspberry_pi_installation.md#installation-on-raspberry-pi" target="_blank">including RPi</a>, from the beginning, but there also is a
<a href="https://github.com/SignalK/signalk-server-windows" target="_blank">Win port</a>.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: medium;"><b>OpenPlotter</b></span></span>
</div>
<div>
<span style="font-family: arial;">If you want to wrap these 2 mentioned software packages together you really
shall use <a href="https://openmarine.net/openplotter" target="_blank">OpenPlotter</a>(OP). It's an open source package which makes it simple to install.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;"><div>
<span style="font-family: arial; font-size: medium;"><b>Hardware</b></span>
</div>
<div>
<span style="font-family: arial;">In the OP documentation, <a href="https://openplotter.readthedocs.io/en/latest/description/features.html" target="_blank">feature list</a>, you will find some of the available hardware.</span>
</div>
<div><br style="font-family: Times;" /></div></span>
</div>
<div>
<span style="font-family: arial; font-size: medium;"><b>Further reading</b></span>
</div>
<div>
<span style="font-family: arial;">I have done <a href="https://pysselilivet.blogspot.com/2020/07/understandinstall-openplotteropencpnsig.html" target="_blank">2 posts</a> which explains a little more how things are put together. Included
how to send N2K to OpenCPN via SK.</span>
</div>
<div><br /></div>
<span style="font-family: arial; font-size: x-large;"><b>Commercial solution</b></span>
<div>
<span style="font-family: arial;"><a href="https://www.yachtd.com/" target="_blank">Yacht devices</a> are doing nice gadgets for the marine network. If you have a mixed
environment with both ST1, N1 and N2K I recommend the <a href="https://www.yachtd.com/products/wifi_router.html" target="_blank">YDNR-02</a>. It will broadcast, via WiFi, N1 data to your Tablet/Phone
app. </span><span style="font-family: arial;">They also have other </span><a href="https://www.google.com/search?q=site%3Ayachtd.com+wifi" style="font-family: arial;" target="_blank">WiFi gateways</a><span style="font-family: arial;"><span style="clear: right; float: right; font-family: arial; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="322" data-original-width="462" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAdsoyZtC-QzKbbqpyhyROVEt9OO3528_9LcRw3nrmLKCALCZ1v_LtuwEaWcULMSG6zVoErXG2Gz49eqt6u1OtPFtKdj0TGgf8F-pHlh7OtzVTL7ZtiX4xdSh16rZYD3-EIu3eLPFJ4vsC/s320/RPi.jpg" width="320" /></span> for less complicated environment.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<span style="font-family: arial; font-size: x-large;"><b>My solution</b></span>
<div>
<span style="font-family: arial;">In our motor yacht I'm using a Raymarine MFD and an Apple iPad,
with <a href="https://apps.apple.com/se/app/w%C3%A4rtsil%C3%A4-isailor/id398456162" target="_blank">iSailor</a>, for navigation purposes.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial; font-size: large;"><b>Software, basic</b></span>
</div>
<div>
<span style="font-family: arial;">A Raspberry Pi, RPi OS Lite, with just Signal K,
<a href="https://pysselilivet.blogspot.com/2021/05/signal-k-quick-install.html" target="_blank">install SK</a> ?, is used to collect data from different sources and the <a href="https://pysselilivet.blogspot.com/2018/04/boat-navigation-network.html" target="_blank">navigation network</a>. </span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">The <a href="https://itunes.apple.com/us/app/wilhelmsk/id1150499484?mt=8" target="_blank">WilhelmSK</a>, iOS tablet/phone/watch, application, is used to display the
additional data from the network/sources. One of several customized layouts
is found above. Please note that the app can connect to several other
hardware and a listing is found at the end of this post.</span>
</div>
<div><br /></div>
<div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial; font-size: large;"><b>Hardware</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><b style="font-family: -webkit-standard;"><span style="font-family: arial;">NMEA 2000/Seatalk NG</span></b><b> to USB</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://actisense.com/products/ngt-1-nmea-2000-to-pc-interface/" target="_blank">Actisense NGT-1</a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<b><span style="font-family: arial;"><br /></span></b>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<b><span style="font-family: arial;">Raspberry Pi CAN hat(NMEA 2000/Seatalk NG)</span></b>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://www.waveshare.com/2-ch-can-hat.htm" target="_blank">Waveshare CAN hat,</a> <a href="https://pysselilivet.blogspot.com/2022/05/waveshare-can-hat-with-signal-k.html" target="_blank">install =></a><br /></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<b><span style="font-family: arial;"><br /></span></b>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<b><span style="font-family: arial;">ST1 to ST NG converter</span></b>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://www.amazon.com/s?k=raymarine+e22158" target="_blank">Raymarine converter</a> (Discontinued)</span></div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<a href="https://pysselilivet.blogspot.com/2020/06/seatalk1-to-nmea-0183-converter-diy.html" style="font-family: arial;" target="_blank">SeaTalk DIY interface</a>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><b>N2K to WiFi</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://www.yachtd.com/products/wifi_gateway.html" target="_blank">Yacht Devices YDWG 02</a>,<span class="Apple-converted-space"> </span><a href="https://pysselilivet.blogspot.com/2019/05/nmea-wifi-gateway-ii.html" target="_blank">install =></a> </span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><b><br /></b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><b>Volvo Penta engine gateway to N2K</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://www.yachtd.com/products/engine_gateway.html" target="_blank">Yacht Devices YDEG 04</a>, <a href="https://pysselilivet.blogspot.com/2017/08/volvo-penta-nmea-2000-gateway.html" target="_blank">install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div><div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;"><span style="font-family: arial;"><b>Multi input AIS receiver and dispatcher, the best ! </b></span></div><div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;"><span style="font-family: arial;"><a href="https://aiscatcher.org" target="_blank">AIS-Catcher</a>, <a href="The best AIS application ? is found here !" rel="nofollow" target="_blank">Install =></a></span></div><div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;"><br /></div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><b>SDR receiver, 2 channel AIS input</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://support.nooelec.com/hc/en-us/articles/360005889913-NESDR-Nano-Series" target="_blank">NooElec NESDR Nano 3</a>, </span><a href="https://pysselilivet.blogspot.com/2020/05/ais-reciever-for-raspberry-pi-2-channel.html" style="font-family: arial;" target="_blank">install =></a>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><b>Digital switching</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://shelly.cloud/products/shelly-1-smart-home-automation-relay/" target="_blank">Shelly 1</a>, <a href="https://pysselilivet.blogspot.com/2021/01/signalk-switch-with-nodered-and.html" target="_blank">install =></a> <br /></span>
</div>
</div>
<div><br /></div>
<div>
<span style="font-family: arial;"><b>Temperature measure I</b></span>
</div>
<div>
<span style="font-family: arial;"><a href="https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf" target="_blank">DS18B20</a>,
<a href="https://pysselilivet.blogspot.com/2018/07/signalk-measuring-temperature.html" rel="nofollow" target="_blank">install =></a></span>
</div>
<div><br /></div>
<div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><b>Temperature measure II</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://shelly.cloud/products/shelly-1-smart-home-automation-relay/" target="_blank">Shelly 1</a>, <a href="https://pysselilivet.blogspot.com/2020/07/signalk-measuring-temperature-ii.html" target="_blank">install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div><div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;"><b style="font-family: arial;">Temperature measure III</b></div><div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;"><span style="font-family: arial;"><a href="https://ruuvi.com/products/" target="_blank">RuuviTag</a></span><span face="-webkit-standard">, </span><span style="font-family: arial;"><a href="https://www.npmjs.com/package/signalk-ruuvitag-plugin" target="_blank">install =></a></span></div><div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;"><br /></div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<b><span style="font-family: arial;">Measure temperature in wet exhaust systems</span></b>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf" target="_blank">DS18B20</a>, <a href="https://pysselilivet.blogspot.com/2018/09/exhaust-temperature-measure-boat.html" rel="nofollow" target="_blank">install</a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;"><br /></div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<b><span style="font-family: arial;">Measure temperature, N2K devices, in wet exhaust systems II</span></b>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://www.yachtd.com/products/thermometer.html" target="_blank">Yacht Devices YDTC - 13</a>, <a href="https://pysselilivet.blogspot.com/2022/06/nmea-2000-temperature-sensor-wet-exhaust.html" target="_blank">install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><b>Battery monitor</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://www.victronenergy.com/battery-monitors/smart-battery-shunt" target="_blank">Victron SmartShunt</a>, <a href="https://pysselilivet.blogspot.com/2021/02/victron-vedirect-with-raspberry.html" target="_blank">install =></a></span>
</div>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><b>Voltage measurement</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://www.adafruit.com/product/1085" target="_blank">ADS1115</a>,
<a href="https://pysselilivet.blogspot.com/2021/02/raspberry-pi-measuring-voltage.html" target="_blank">install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<b><span style="font-family: arial;">Boat and travel router</span></b>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://teltonika-networks.com/product/rut240/" target="_blank">Teltonika RUT 240</a>,
<a href="https://pysselilivet.blogspot.com/2021/05/teltonika-router-rut-240-quick-setup.html" target="_blank">install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<div style="text-size-adjust: auto;">
<span style="font-family: arial;"><b>Security alarm</b></span>
</div>
<div style="font-family: -webkit-standard; text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://teltonika-networks.com/product/rut240/" target="_blank">Teltonika RUT 240</a>, <a href="https://pysselilivet.blogspot.com/2023/06/teltonika-router-as-security-alarm.html" target="_blank">install =></a></span>
</div>
<div style="font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial; font-size: large;"><b>Additional software</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><b>GPS synching RPi system clock</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://en.wikipedia.org/wiki/Network_Time_Protocol" target="_blank">Local NTP</a>,
<a href="https://pysselilivet.blogspot.com/2021/05/ntp-server-on-raspberry-linuxoffline.html" target="_blank">install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<b><span style="font-family: arial;">RPi system info and PWM fan control</span></b>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://www.raspberrypi.org" target="_blank">Raspberry Pi</a>,
<a href="https://pysselilivet.blogspot.com/2019/07/node-red-raspberry-control.html" target="_blank">install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><b>Eniro charts in SK(Nordic)</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://pasjon.eniro.se/#map=10/56.039/12.615" target="_blank">Eniro charts,</a>
<a href="https://pysselilivet.blogspot.com/2020/11/eniro-charts-using-signalk-freeboard.html" target="_blank">install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><b>OpenPlotter, administration shell for navigation soft/hardware</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://openmarine.net/openplotter" target="_blank">Openplotter</a>,
<a href="https://pysselilivet.blogspot.com/2019/08/openplotter-beta-v2-quick-install-guide.html" target="_blank">install =></a> </span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><b>Raspberry Pi watchdog</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://en.wikipedia.org/wiki/Watchdog_timer" target="_blank">Watchdog</a>,
<a href="https://pysselilivet.blogspot.com/2021/10/raspberry-pi-watchdog-made-simple.html" target="_blank">install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><b>Restart network when lost</b></span>
</div>
<div style="text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://en.wikipedia.org/wiki/Ping_(networking_utility)" target="_blank">No ping response</a>, <a href="https://pysselilivet.blogspot.com/2021/10/raspberry-pi-reboot-or-restart-network.html" style="caret-color: rgb(0, 0, 0);" target="_blank">Install =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><b>Victron monitoring software</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://www.victronenergy.com/live/venus-os:start" target="_blank">Venus OS,</a>
<a href="https://pysselilivet.blogspot.com/2022/01/victron-monitoring-solution-venus-on.html" target="_blank">Install on a Raspberry =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><b>Creating log files during the boat trip</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><a href="https://pysselilivet.blogspot.com/2022/02/read-and-write-nmea-files-openplotter.html" target="_blank">Blog post =></a></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div style="caret-color: rgb(0, 0, 0); text-size-adjust: auto;">
<span style="font-family: arial;"><b>Another Wilhelm SK layout, used when at anchor</b></span>
</div>
<div style="caret-color: rgb(0, 0, 0); font-family: -webkit-standard; text-size-adjust: auto;">
<br />
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEnhyphenhyphenV0Url0Faa2BgSXmzX45xVpkJ3MAJb3MT36KNmEk-Mm9xQzTalehYhpcjLiBhioHWthrzpx9n3x3Hovg9aWCLhefPjWdartrHlSXFGpd0z4pr-zEb9laiCTUAh1TlOAPGqYvJnG2tM/s2048/WSK.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEnhyphenhyphenV0Url0Faa2BgSXmzX45xVpkJ3MAJb3MT36KNmEk-Mm9xQzTalehYhpcjLiBhioHWthrzpx9n3x3Hovg9aWCLhefPjWdartrHlSXFGpd0z4pr-zEb9laiCTUAh1TlOAPGqYvJnG2tM/w400-h300/WSK.PNG" width="400" /></a>
</div>
<br />
<div><div><span style="font-family: arial;">The Wilhelm SK app can also connect directly to some devices:</span></div><div><ul style="text-align: left;"><li><span style="font-family: arial;">NMEA 0183 over TCP or UDP. (from for example, Digital Yacht's Smart WLN10)</span></li><li><span style="font-family: arial;">Any modern Navico (Lowrance, Simnet or B&G) GoFree MFDs</span></li><li><span style="font-family: arial;">NMEA 2000 via Yacht Device's YDWG-02</span></li><li><span style="font-family: arial;">NMEA 2000 via Actisense W2k-1</span></li><li><span style="font-family: arial;">Victron Venus GX or CCGX</span></li><li><span style="font-family: arial;">Victron VRM</span></li><li><span style="font-family: arial;">Chetco SeaSmart Devices</span></li><li><span style="font-family: arial;">Chetco HelmSmart</span></li></ul><div><span style="font-family: arial;"><br /></span></div></div></div><div><span style="font-family: arial;"><br /></span></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com4tag:blogger.com,1999:blog-2016632442552546592.post-65017485253257584762023-11-05T15:02:00.001+01:002023-11-09T00:25:27.916+01:00SignalK, measuring temperature<div><span style="background-color: lime; font-family: arial; font-variant-ligatures: normal; orphans: 2; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;">Updated 2023-11-05 !</span></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Mwr-JxwH6QH7qo8wU9o03vTc0TXzMDUQtUmZb-mN0_kA7Pt_UANum4wcv9HNq1l72AZRWp3RMSulLpRyFiyry2tK2utTFovNFdFjSXhyphenhyphenoJJumAnqCOXCzgJY5eWW-iy6Mh7XBQkX4NGL/s1600/Temp_DS18B20+.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span face="arial, helvetica, sans-serif"></span></a><span face="arial, helvetica, sans-serif"></span><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJxJoOxsj1Zd64D5EFLESPoCc-E19hVp5WRVkHLt0TE78pXzpWiinafCbrJ7DHe-JlpqZSZZ_wd9dhHPIBaEOn8wsH8Jn-1dymCT5BlKo_INwUh2RZFvWXJUO7v_ZW25lvh2AqpaiH4f_q/s1600/Temp_measure.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: arial;"><img border="0" height="87" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJxJoOxsj1Zd64D5EFLESPoCc-E19hVp5WRVkHLt0TE78pXzpWiinafCbrJ7DHe-JlpqZSZZ_wd9dhHPIBaEOn8wsH8Jn-1dymCT5BlKo_INwUh2RZFvWXJUO7v_ZW25lvh2AqpaiH4f_q/s400/Temp_measure.jpeg" width="400" /></span></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">An introduction to the SignalK, Marine application, is given <a href="https://pysselilivet.blogspot.com/2018/03/nmea-wifi-gateway.html" target="_blank">here</a>.</span></span><br />
<br />
<span face="arial, helvetica, sans-serif">A very easy way to measure temperature with Raspberry Pi, RPi, is to connect one wire (1W) <a href="https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf" target="_blank">DS18B20</a> (DS)temperature sensors direkt to the RPi GPIO.</span><br />
</span><div>
<span face="arial, helvetica, sans-serif" style="font-family: arial;"><br /></span></div>
<div>
<font face="arial"><span>Here <a href="https://pysselilivet.blogspot.com/2018/07/signalk-measuring-temperature.html" target="_blank">You find a post</a> where the temperatures are transfered via WiFi</span>
</font><span face="arial, helvetica, sans-serif"></span><br /><br />
<a name='more'></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Using the <a href="https://github.com/SignalK/signalk-node-red" target="_blank">NodeRed(NR) plugin</a>, in SignalK(SK), will forward the temperature measure to a SignalK path, despite You maybe don't have </span><span face="arial, helvetica, sans-serif">any advanced programming skills.</span><br />
<br />
<span face="arial, helvetica, sans-serif">You can even send the temperature on to a NMEA 2000/0183 network with sufficient hardware.</span><br />
<span face="arial, helvetica, sans-serif"></span><br />
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj360Sg8FsV_Z2sbzU3hMW5UKrBEuCj3SdDG6kVJW3sMKCFmeom_OlqWWbe2A661Q2nu2SVt7yXpFqWoGd8hjmuqGsa2RzQTCEd5CTQKkculTgdNylSuiEyXSdij1H-yAQafHCzSb5XasA6/s1600/DS18B20.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: arial;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj360Sg8FsV_Z2sbzU3hMW5UKrBEuCj3SdDG6kVJW3sMKCFmeom_OlqWWbe2A661Q2nu2SVt7yXpFqWoGd8hjmuqGsa2RzQTCEd5CTQKkculTgdNylSuiEyXSdij1H-yAQafHCzSb5XasA6/s200/DS18B20.jpeg" width="200" /></span></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Start with installing the DS hardware following the instructions in this <a href="https://pysselilivet.blogspot.com/2018/07/homekit-measuring-temperature-with.html" target="_blank">post, Basic setup</a>.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
</span><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">NR is browser-based editor for the Internet of Things and is installed in SK as a plugin,</span> </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">@signalk/signalk-node-red</span><span face="arial, helvetica, sans-serif">, <span style="font-family: arial;">via the admin UI.</span></span></span><span style="font-family: arial;"><br />
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgbnGvIcSQvf6B28p9rnIMVtJu7lKn3zyZ8nhVTuB_4ezpVoWURbSbs5n1o4FsROnGgCiLiHrPjd_qEHci4LArdsEVq4M52BggGGswRZ5z_wiOGuOnlvg7iBuUPgmgozM8W7WiCIxv0H1V/s1600/Dashboard_Webapps_2.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: arial;"><img border="0" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgbnGvIcSQvf6B28p9rnIMVtJu7lKn3zyZ8nhVTuB_4ezpVoWURbSbs5n1o4FsROnGgCiLiHrPjd_qEHci4LArdsEVq4M52BggGGswRZ5z_wiOGuOnlvg7iBuUPgmgozM8W7WiCIxv0H1V/s320/Dashboard_Webapps_2.jpeg" width="320" /></span></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">Here is a <a href="https://www.youtube.com/watch?v=vYreeoCoQPI" target="_blank">link</a> to a quick NR intro and the link to <a href="https://nodered.org/" target="_blank">NR website</a>.</span></span><br />
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span></span><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">In NR, opened via admin UI(Webapps), install the node module</span> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;"><a href="https://flows.nodered.org/node/node-red-contrib-ds18b20-sensor" target="_blank">node-red-contrib-ds18b20-sensor</a></span></span><br />
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif" style="font-family: arial;">Then copy <a href="https://gist.github.com/MatsA/26c9b63124cf3762b4d142bd1d9c409e" target="_blank">this flow</a> to Your clipboard and import it to NR.</span></span><br />
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">The flow is started every 5 seconds, change to what is appropriate in Your case, with the</span> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">inject</span><span face="arial, helvetica, sans-serif"> <span style="font-family: arial;">node.</span></span></span><br />
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">The</span> </span></span><span face="arial, helvetica, sans-serif"> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">rpi-ds18b20</span><span face="arial, helvetica, sans-serif"> <span style="font-family: arial;">node will create an array with detected DS sensors.</span></span><span style="font-family: arial;"><br />
<span face="arial, helvetica, sans-serif"><br /></span>
</span><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">The</span> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">split</span><span face="arial, helvetica, sans-serif"> <span style="font-family: arial;">node will create a separate message for every detected DS sensor.</span></span></span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif"><span style="font-family: arial;">In the</span> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">function</span><span face="arial, helvetica, sans-serif"> <span style="font-family: arial;">node, values are changed with Java code.</span></span><span style="font-family: arial;"><br /></span>
<br />
<div style="background-color: #eeeeee; text-align: left; width: 400px;">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">tempIn = msg.payload.temp + 273.15;</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">tempDsId = msg.payload.file</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">switch(tempDsId) {</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> case "28-0417a20e6dff" :</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> SkPath = "propulsion.starboard.exhaustTemperature"; </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> break;</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> case "28-051693ec41ff" :</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> SkPath = "propulsion.port.exhaustTemperature"; </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> break;</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> case "28-123493ec41ff" :</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> SkPath = "environment.inside.engineRoom.temperature"; </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> break;</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> default:</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"> return msg[null]; </span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">}</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">msg = {};</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">msg.payload = tempIn;</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">msg.topic = SkPath;</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">msg.DsId = tempDsId;</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">return msg;</span></div>
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">The program fetches the actual temperature, converts it from Celsius to Kelvin, and the DS serial number(DS id).</span></span><br />
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">The next part matches the actual DS id and sets the appropriate <a href="https://signalk.org/specification/1.7.0/doc/vesselsBranch.html" target="_blank">SignalK path</a>. </span></span><span face="arial, helvetica, sans-serif">Here You should change so it matches Your setup. </span></span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">If no match the node will return</span> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">null</span><span face="arial, helvetica, sans-serif">.</span><br />
<span style="font-family: arial;"><br />
</span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">The last part just sets the output preparing for the last node</span> </span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">signalk-send-pathvalue</span><span face="arial, helvetica, sans-serif" style="background-color: white;"> <span style="font-family: arial;"> which</span></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"> is sending the values to the SK Node server.</span><br />
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4rFkqBSfnMPSByRb4XPd305IBUw464JW_5gQVq19dQwm_3IQIkWSUD2K9OtP6b4XJJE2YROxOu1zrujZKYIUhw8RYz9nZ8yUl3ZS0cwJy3KBVmpNdMACsd29RLOUImeBwt00mc9ejlwFE/s1600/Engine_temperature.jpeg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: arial;"><img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4rFkqBSfnMPSByRb4XPd305IBUw464JW_5gQVq19dQwm_3IQIkWSUD2K9OtP6b4XJJE2YROxOu1zrujZKYIUhw8RYz9nZ8yUl3ZS0cwJy3KBVmpNdMACsd29RLOUImeBwt00mc9ejlwFE/s320/Engine_temperature.jpeg" width="320" /></span></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span face="arial, helvetica, sans-serif">In my case an Actisense NTG-1 is installed and I want to display the </span></span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">"engineRoom temperature" in my N2K instruments. The</span> </span><span style="background-color: #eeeeee; color: #151b1e;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;">signalk-to-nmea2000</span></span><span style="font-family: arial;"><span style="color: #151b1e;"> </span><span style="caret-color: rgb(21, 27, 30); color: #151b1e;"><span face="arial, helvetica, sans-serif">plugin, in Node Server, will do the job.</span></span><br />
<span style="caret-color: rgb(21, 27, 30); color: #151b1e;"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span style="caret-color: rgb(21, 27, 30); color: #151b1e;"><span face="arial, helvetica, sans-serif">In the Plugin Config click "Active" and enable "Engine Room Temperature" and then "Submit".</span></span><br />
<span style="caret-color: rgb(21, 27, 30); color: #151b1e;"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span style="caret-color: rgb(21, 27, 30); color: #151b1e;"><span face="arial, helvetica, sans-serif">130312, mentioned in the config, is the N2K pgn that will be created.</span></span><br />
<span style="caret-color: rgb(21, 27, 30); color: #151b1e;"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span style="caret-color: rgb(21, 27, 30); color: #151b1e;"><span face="arial, helvetica, sans-serif">Setup is complete and You will see the temperature in Your N2K instruments.</span></span><br />
<span style="caret-color: rgb(21, 27, 30); color: #151b1e;"><span face="arial, helvetica, sans-serif"><br /></span></span>
<span style="caret-color: rgb(21, 27, 30); color: #151b1e;"><span face="arial, helvetica, sans-serif">My instruments hadn't the possibility to display the exhaust temperatures so instead I used the nice </span></span><a href="https://itunes.apple.com/us/app/wilhelmsk/id1150499484?mt=8" target="_blank">WilhelmSK</a> <span face="arial, helvetica, sans-serif">app diskussed <a href="https://pysselilivet.blogspot.com/2018/03/nmea-wifi-gateway.html" target="_blank">here</a>.<span style="color: #151b1e;"> </span></span><br />
<span face="arial, helvetica, sans-serif"><span style="color: #151b1e;"><br /></span></span>
<span face="arial, helvetica, sans-serif" style="color: #151b1e;"><span style="background-color: lime; caret-color: rgb(21, 27, 30);">A <a href="https://pysselilivet.blogspot.com/2018/09/exhaust-temperature-measure-boat.html" target="_blank">SignalK/Node-Red post</a> setting up alarm for exhaust/temperature</span></span></span></div><div><br /></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com2tag:blogger.com,1999:blog-2016632442552546592.post-30292463631628892222023-11-04T09:00:00.004+01:002023-12-16T19:01:32.647+01:00AIS for Raspberry with Map, Dispatcher<div class="separator"><div style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx_rZPQpyNBeagFvw_8TmQtaSKj0nStf9m1b8pa3qaZTI93vP7YgMUv9lf60-MaDSQDDuU2xrU2ipXt7gQrs9hdSNhpCeHlqKewJGFjgGjV5bE-YO2_LT9ZXYDio5m2HJgXy6l0RmVsKCA/s320/rpiais_map.png" width="320" /></div></div><div><div style="font-family: arial;"><span style="font-family: arial;"><span style="background-color: lime;">Updated 2023-11-04, </span></span><span style="background-color: lime;">OK</span><span style="background-color: #04ff00;"> with Bookworm 32 bit !</span></div><div style="font-family: arial;"><span style="background-color: #ffa400;"> Not Bookworm 64 Bit !</span></div></div><div><span style="font-family: arial;"><span style="background-color: lime;"><br /></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">This is a setup, on a Raspberry Pi(RPi), with a software package, AIS Dispatcher, from </span><a href="http://www.aishub.net/" target="_blank">http://www.aishub.net</a><span face="arial, helvetica, sans-serif"> which includes</span></span></div><div>
<ul>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg5hyphenhyphenY3PE8U1xD8bjfZVWNz-DCbfNZKw1wgmtOsh2SBi1xvXPDfSQF98Q9SfINkhE8tdIFP7PZniJ_KD4bhlq-xS-FyOgTWPSVhUWpd4DgdgjDwbpwfs1ZOcequ-XbJJAJlJNVNT83Qe0f/s1600/RTL-SDR.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: arial;"></span></a>
<li><span style="font-family: arial;">receiving and processing of all standard AIS messages</span></li>
<li><span style="font-family: arial;">streaming raw AIS feeds to multiple destinations</span></li>
<li><span style="font-family: arial;">advanced monitoring of device status, coverage and message statistics</span></li>
<li><span style="font-family: arial;">embedded electronic map with all received vessels</span></li></ul><div><span style="font-family: arial;">The best AIS application ? </span><a href="https://pysselilivet.blogspot.com/2023/12/ais-receiver-and-dispatcher-best.html" rel="nofollow" style="font-family: arial;" target="_blank">is found here</a><span style="font-family: arial;"> !</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><span><a name='more'></a></span></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Introduction</b></span></span></div><div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">An alternative application, <span style="background-color: #04ff00;">OK with Bookworm 32/64 bit</span>, could be the SW package <a href="https://pysselilivet.blogspot.com/2019/10/ais-receiver-with-openseamap.html" target="_blank">AIS receiver with OpenSeaMap</a> where you also can see </span></span><span style="background-color: white; color: #444444;"><span style="font-family: arial;">AtoN:s</span></span><span style="background-color: white; color: #444444; font-family: arial; font-size: 13px;">,</span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"> </span></span><span style="background-color: white; color: #444444;"><span style="font-family: arial;">buoys and beacons. There are also plugins available for AIS forwarding.</span></span></div><div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg5hyphenhyphenY3PE8U1xD8bjfZVWNz-DCbfNZKw1wgmtOsh2SBi1xvXPDfSQF98Q9SfINkhE8tdIFP7PZniJ_KD4bhlq-xS-FyOgTWPSVhUWpd4DgdgjDwbpwfs1ZOcequ-XbJJAJlJNVNT83Qe0f/s1600/RTL-SDR.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: arial;"><img border="0" data-original-height="425" data-original-width="425" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg5hyphenhyphenY3PE8U1xD8bjfZVWNz-DCbfNZKw1wgmtOsh2SBi1xvXPDfSQF98Q9SfINkhE8tdIFP7PZniJ_KD4bhlq-xS-FyOgTWPSVhUWpd4DgdgjDwbpwfs1ZOcequ-XbJJAJlJNVNT83Qe0f/s200/RTL-SDR.jpg" width="100" /></span></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="background-color: red;"><br /></span>
<span face="arial, helvetica, sans-serif" style="background-color: white;"><span face="arial, helvetica, sans-serif">On the same RPi I have installed;</span></span></span></div><div><ul style="text-align: left;"><li><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="background-color: white;"><span face="arial, helvetica, sans-serif">AIS dispatcher application</span></span></span></li><li><span style="font-family: arial;"><a href="https://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/" target="_blank">RTL-SDR dongle</a>, approx 30 €, </span><span style="font-family: arial;">or the even better </span><a href="https://support.nooelec.com/hc/en-us/articles/360005889913-NESDR-Nano-Series" style="font-family: arial;" target="_blank">NooElec NESDR Nano 3</a><span style="font-family: arial;">, </span><span style="font-family: arial;">as the AIS receiver</span></li><li><span style="font-family: arial;">An application with </span><span style="font-family: arial;">2 channel support which is interfacing the dongle, decoding the information, and sending NMEA 0183(N1) data to AIS dispatcher</span></li></ul></div><div><span></span></div><div><b style="font-family: arial; font-size: xx-large;">Starting fresh ?</b></div><div><span style="font-family: arial;">The applications needs a computer running Linux and if you want to start from scratch, with a RPi, here is <a href="https://pysselilivet.blogspot.com/2017/02/rpi-raspbian-install-with-mac.html" target="_blank">a how to</a>.</span><span style="font-family: arial;"><br /><br />
<span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Installation of </b></span></span><span style="font-family: arial;"><span style="font-size: x-large;"><b>AIS Dispatcher</b></span></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span><span face="arial, helvetica, sans-serif">Follow <a href="https://www.aishub.net/ais-dispatcher?tab=linux" target="_blank">the instructions</a> where the installation is ending with </span></span></div>
<div><br /></div><div><p class="p1" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">........</span></p><p class="p1" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">........</span></p><p class="p1" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">Install complete</span></p><p class="p1" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">By default web interface is accessible at http://IPADDRESS:8080/</span></p><p class="p1" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">To change default listening host/port check "/home/ais/etc/aiscontrol.cfg"</span></p><p class="p1" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">To disable auto start execute "loginctl disable-linger ais"</span></p><p class="p2" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px; min-height: 13px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;"></span><br /></p><p class="p1" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">:: Available IP Addresses</span></p><p class="p1" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">eth0 <span class="Apple-converted-space"> </span>DOWN<span class="Apple-converted-space"> </span></span></p><p class="p1" style="font-family: Menlo; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 11px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: normal; margin: 0px;"><span class="s1" style="font-variant-ligatures: no-common-ligatures;">wlan0<span class="Apple-converted-space"> </span>UP <span class="Apple-converted-space"> </span>192.168.68.110/24<span class="Apple-converted-space"> </span></span></p></div><div><br /></div><div><br /></div>
<div><span style="font-family: arial; font-size: x-large;"><b>Application for the RTL-SDR</b></span></div><div><span style="font-family: arial; font-size: medium;"><b>Alternative 1</b></span></div><div><span style="font-family: arial;">A software package, <b><i>recommended</i></b>, which is used by <a href="https://pysselilivet.blogspot.com/2019/08/openplotter-beta-v2-quick-install-guide.html" target="_blank">OpenPlotter</a> is <a href="https://pysselilivet.blogspot.com/2020/05/ais-reciever-for-raspberry-pi-2-channel.html" target="_blank">found here</a>.</span></div><div><span style="font-family: arial; font-size: medium;"><u><b><br /></b></u></span></div><div><span style="font-family: arial; font-size: medium;"><b>Alternative 2</b><span style="background-color: #ffa400;">(Note !! this app is not available anymore)</span><b> </b></span></div><div><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">An older package, which is working well is </span><a href="http://xdeco.org/" target="_blank">aisdeco2</a>.</span></div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">Install some dependences for the aisdeco2 software, with</span></span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;">$</span><span style="font-family: "courier new", courier, monospace; font-size: x-small;"> </span><span style="font-family: "courier new", courier, monospace; font-size: x-small;">sudo apt-get install librtlsdr-dev</span></span></div>
<div>
<div class="p1">
<span face="arial, helvetica, sans-serif" style="font-size: small;"><br /></span></div>
</div>
<div>
<span style="font-family: arial;">On Your PC or Mac <a href="https://drive.google.com/open?id=1B1O2cseigoGNRFzP9Ii3a2QZq_uBSJmP" target="_blank">download the </a><a href="https://drive.google.com/open?id=1B1O2cseigoGNRFzP9Ii3a2QZq_uBSJmP" target="_blank">aisdeco2 software</a></span></div>
<div>
<span style="font-family: arial;"><br /></span></div>
<div>
<span style="font-family: arial;">In this download You will get a readme file with info about the package</span></div>
<div>
<span style="font-family: arial;"><br /></span></div>
<div>
<span style="font-family: arial;">Copy the "</span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">aisdeco2</span><span style="font-family: arial;">" file to the RPi, with the hostname "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">rpiais</span><span style="font-family: arial;">". On a Mac with following command which will put the file in pi home folder</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee;"><span style="font-family: "courier new", courier, monospace; font-size: x-small;">$</span><span style="font-family: "courier new", courier, monospace; font-size: x-small;"> </span><span style="font-family: "courier new", courier, monospace; font-size: x-small;">scp aisdeco2 pi@rpiais:</span></span></div>
<div>
<span face="arial, helvetica, sans-serif"><br /></span></div>
<div>
<span style="font-family: arial;">In a ssh session on the RPi issue the command</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">$ sudo mv aisdeco2 /usr/local/bin</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">which will move the program to the right place. </span></div>
<div>
<span style="font-family: arial;"><br /></span></div>
<div>
<span style="font-family: arial;">Plugin the RTL-SDR dongle, with a connected antenna, to the RPi and then the command </span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">$ sudo aisdeco2 --udp 127.0.0.1:10110</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">which will show something like </span></div>
<br />
<div style="background-color: #eeeeee; text-align: left; width: 600px;">
<span style="font-family: "courier new", courier, monospace; font-size: x-small;"><span style="font-variant-ligatures: no-common-ligatures;">2019-01-26 19:15:38.303</span><span class="Apple-converted-space" style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">INFO </span><span class="Apple-converted-space" style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures;">AiSDeco2 v.20180430</span></span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Found Rafael Micro R820T tuner</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">[R82XX] PLL not locked!</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Supported Gains (dB):.. 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Freq: 162.000 MHz</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Freq Correction: 0 ppm</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">Gain: Auto</span><br />
<span style="font-family: "courier new", courier, monospace; font-size: x-small;">2019-01-26 19:16:16.383 INFO !AIVDM,1,1,,A,13o1h>00280qdj:P61hdBqpR0D2?,0*60</span></div>
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">The "</span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">--udp 127.0.0.1:10110</span><span style="font-family: arial;">" in the command line means that the N1 output should be sent as UDP from local host, IP 127.0.0.1, on port 10110.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span style="font-family: arial;">The last line is an AIS N1 output "</span><span style="background-color: #eeeeee; font-family: "courier new", courier, monospace; font-size: x-small;">!AIVDM,1,1,,A,13o1.......</span><span style="font-family: arial;">"</span><br />
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiScUUZysUIzO2aA2hHYeYTi8rpUBYKLwBUngdGXyV6RYH-woGSW9zSarwlUQFLDXi9VJ3aD_dlwataYIb7thwXQik_P0-F8x43L79m0XP0Pq5MqWWrd4SZ_ELELZkJEl_nHtZ-MMdi1KI/s1600/rpiais_config.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiScUUZysUIzO2aA2hHYeYTi8rpUBYKLwBUngdGXyV6RYH-woGSW9zSarwlUQFLDXi9VJ3aD_dlwataYIb7thwXQik_P0-F8x43L79m0XP0Pq5MqWWrd4SZ_ELELZkJEl_nHtZ-MMdi1KI/s200/rpiais_config.png" width="180" /></a>
<div class="p1">
<br />
<span style="font-family: arial;">Let the program run</span><br />
<span face="arial, helvetica, sans-serif"><br /></span><span style="font-family: arial; font-size: x-large;"><b>AIS Dispatcher configuration</b></span>
<span face="arial, helvetica, sans-serif"><br /></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif">Open the GUI </span><span face="arial, helvetica, sans-serif">and complete the configuration with "Input" according to the picture and the rest according to Your setup.</span></span></div>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">If the aisdeco2 program is listing any N1 messages the vessels should appear in the GUI map. See above picture.</span></span><br />
<span face="arial, helvetica, sans-serif"><br /></span><span style="font-family: arial;"><span face="arial, helvetica, sans-serif" style="font-size: x-large;"><b>Dispatcher</b></span><br /><span face="arial, helvetica, sans-serif">One purpose with the AIS dispatcher software is to dispatch, send, AIS information to Vessel tracking sites like</span><br />
</span><ul>
<li><a href="https://www.vesselfinder.com/" target="_blank"><span style="font-family: arial;">Vesselfinder</span></a></li>
<li><span style="font-family: arial;"><a href="https://www.marinetraffic.com/" target="_blank">Marinetraffic</a></span></li>
</ul>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif">If You do this You probably will get an "Premium" account and can retrieve information from the sites. Sign up and You will get a web address and a port number which will be used in the </span>AIS Dispatcher "Configuration => Output"</span><br />
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCmXQ3Krouo5ZSGDlhfLR-XZb-zh75fgFDMOtjcuPg3JoMCGjXXOBGTEvUXJk3A2PiiiJZU8XKNmAGLHsQCPA1wun2ZneIgeLu7Q8SGHyyPVBRMBxBqiG1_0LEIe5sc7DPlTqZanYQ9Rk_/s1600/Ska%25CC%2588rmavbild+2019-02-05+kl.+20.37.48.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span style="font-family: arial;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCmXQ3Krouo5ZSGDlhfLR-XZb-zh75fgFDMOtjcuPg3JoMCGjXXOBGTEvUXJk3A2PiiiJZU8XKNmAGLHsQCPA1wun2ZneIgeLu7Q8SGHyyPVBRMBxBqiG1_0LEIe5sc7DPlTqZanYQ9Rk_/s200/Ska%25CC%2588rmavbild+2019-02-05+kl.+20.37.48.png" width="180" /></span></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">Another way using this software could be installing it on a <a href="https://www.raspberrypi.org/products/raspberry-pi-zero-w/" target="_blank">Raspberry Pi Zero W</a> and use it as a standalone AIS receiver/dispatcher on Your boat or at home. As a source for maybe</span><br />
</span><ul>
<li><span style="font-family: arial;"><a href="https://pysselilivet.blogspot.com/2019/08/openplotter-beta-v2-quick-install-guide.html" target="_blank">OpenPlotter, OpenCPN or SignalK</a></span></li>
<li><span style="font-family: arial;"><a href="https://apps.apple.com/se/app/wärtsilä-isailor/id398456162" target="_blank">iSailor</a></span></li>
</ul>
<div>
<span style="font-family: arial;">Adding an output in AIS Dispatcher with UDP output, port 10001, and host IP/name to Your iPhone/iPad, with iSailor installed, the setup will be as enclosed picture.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial; font-size: x-large;"><b>Remarks</b></span></div><div><b style="font-family: arial;">Monitor failure</b></div><div><span style="font-family: arial;">In <a href="https://pysselilivet.blogspot.com/2021/10/signl4-automated-alerting-with-free.html" target="_blank">this post</a> I built an application that sends an alert if no AIS message haven't appeared within a certain time.</span></div><div><span style="font-family: arial;"><br /></span></div><div><b style="font-family: arial;">Improve receiving range?</b></div><div><span style="font-family: arial; font-size: x-large;"><span face="arial, helvetica, sans-serif" style="font-size: medium;">Calibrate ! </span><a href="https://pysselilivet.blogspot.com/2019/08/sdr-calibrate-with-kalibrate-rtl.html" style="font-size: medium;" target="_blank">Instructions in this post</a></span></div><div><br /></div><div><span style="font-family: arial;"><b>UDP as input</b></span></div><div><span style="font-family: arial;">Using UDP as input gave me problem specifying the specific IP adress, but using IP "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">0.0.0.0</span><span style="font-family: arial;">" made it work ?</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial; font-size: medium;"><b>Old rPiAIS</b></span></div><div><span style="font-family: arial;">This post was initially written for the older software </span><span style="-webkit-text-stroke-color: rgb(0, 0, 0); font-family: arial;"><a href="https://www.aishub.net/rpiais" target="_blank">rPiAIS</a>, which didn't work with RPi 4, but updated for the mentioned AIS dispatcher. (The GUI is almost the same)</span></div>
</div>
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
</style></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com32tag:blogger.com,1999:blog-2016632442552546592.post-1384721909002344882023-10-30T09:00:00.007+01:002023-11-09T00:25:49.531+01:00RuuviTag and Node-Red<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmkccPW6wSzV9YBSxckoQHkTy3TTLgGdFqgit6Cwmc481NPzBjAbnXn2gJErcR6EtznG1jnrNhQ6Ajkv3-v6Mq-YzfH67_8SZVZ0TMxsSC9nh1qmD70gaTBD3LSaGJMeYg9E4Y3TDHB6TO/s1600/RuuviTag.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><span face=""arial" , "helvetica" , sans-serif"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmkccPW6wSzV9YBSxckoQHkTy3TTLgGdFqgit6Cwmc481NPzBjAbnXn2gJErcR6EtznG1jnrNhQ6Ajkv3-v6Mq-YzfH67_8SZVZ0TMxsSC9nh1qmD70gaTBD3LSaGJMeYg9E4Y3TDHB6TO/s320/RuuviTag.png" width="148" /></span></a><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif"><div><span face=""arial" , "helvetica" , sans-serif"><span style="background-color: lime;"> Updated 2023-10-30 ! OK with Bookworm ! New simple install ! </span></span></div><div><span face=""arial" , "helvetica" , sans-serif"><br /></span></div>For a new project I needed a small wireless temperature sensor, there You don't have to change battery so often, and this gave the <a href="https://ruuvi.com/ruuvitag-specs/" target="_blank">RuuviTag</a>.</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif">Having used Node-Red(NR) on Raspberry Pi before, the first application was this dashboard. </span></span><span style="background-color: #04ff00; font-family: arial;">Tested and works with with Node.js V18 !</span><div><div><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp8LwmmMLFAZ8Ja3HNHNAdbjmB8qybiu4dvs_zhb4W_eaAPJHkHZVS3A45YuAYNbVZgegvfEVQExQ_f6tuX5glz8vZP0g-qZulp_a3w3PAkqXgKSkvBCXufp-QPPTj_k389WpoOzWncz_G/s1600/IMG_0335.jpeg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp8LwmmMLFAZ8Ja3HNHNAdbjmB8qybiu4dvs_zhb4W_eaAPJHkHZVS3A45YuAYNbVZgegvfEVQExQ_f6tuX5glz8vZP0g-qZulp_a3w3PAkqXgKSkvBCXufp-QPPTj_k389WpoOzWncz_G/s320/IMG_0335.jpeg" width="320" /></a><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif"><br /></span><span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span face=""arial" , "helvetica" , sans-serif"><br /></span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span><span face=""arial" , "helvetica" , sans-serif"><br /></span>
<br /></div><div>
<a name='more'></a><span face=""arial" , "helvetica" , sans-serif"><br /></span></div><div><br /></div><div><span style="font-family: arial; font-size: x-large;"><b>Installing</b></span></div><span style="font-family: arial;"><div><span style="font-family: arial; font-size: medium;"><b>Update OS</b></span></div>Always start updating with </span><div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small; font-variant-ligatures: no-common-ligatures;"><br /></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt update && <span style="font-variant-ligatures: no-common-ligatures;">sudo apt full-upgrade</span> -y && sudo apt clean</span><br />
<span face=""arial" , "helvetica" , sans-serif"><br /></span><span style="font-family: arial; font-size: medium;"><b>NodeRed install ?</b></span></div><div><span style="font-family: arial;">Do a<span class="Apple-converted-space"> </span><a href="https://pysselilivet.blogspot.com/2018/11/node-red-quick-install.html" rel="" style="box-sizing: border-box; color: #0366d6; text-decoration-line: none; text-decoration: none;" target="_blank">Node-red installation</a>, if you are missing one, including the dashboard </span><span style="background-color: #eeeeee; white-space: nowrap;"><span style="font-family: courier; font-size: x-small;">node-red-dashboard</span></span><span class="Apple-converted-space" style="font-family: arial;">.</span></div><div><span class="Apple-converted-space" style="font-family: arial;"><br /></span></div><div><b><span style="font-family: arial; font-size: medium;"><span class="Apple-converted-space">Check </span>Bluetooth</span></b></div><div><span style="font-family: arial;">Check the interface with</span></div><div>
<span style="background-color: #eeeeee; color: #24292e; font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="background-color: #eeeeee; color: #24292e; font-family: courier; font-size: x-small;">hciconfig</span><br />
<div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-size-adjust: auto;">
<span face=""arial" , "helvetica" , sans-serif"><br /></span>
<span style="font-family: arial;"><b style="font-size: large;">Installing necessary SW<br /></b>Dependencies </span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-size-adjust: auto;"><span style="background-color: #eeeeee;"><span style="font-family: courier; font-size: x-small;">sudo apt install libbluetooth-dev libudev-dev</span></span></div>
<div style="box-sizing: border-box; margin-bottom: 16px; text-size-adjust: auto;"><span style="caret-color: rgb(36, 41, 46); color: #24292e; font-family: arial;">Grant the node binary "cap_net_raw" privileges, so it can start/stop BLE advertising, with command</span></div><div style="box-sizing: border-box; margin-bottom: 16px; text-size-adjust: auto;"><span style="caret-color: rgb(36, 41, 46); color: #24292e;"><p class="p1" style="color: black; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;"><span class="s1" style="background-color: #eeeeee; font-family: courier; font-size: x-small; font-variant-ligatures: no-common-ligatures;">sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)</span></p></span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span style="font-family: arial;">Install the</span><code style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><a href="https://www.npmjs.com/package/@abandonware/noble" target="_blank">noble</a></span></code><span class="Apple-converted-space" style="font-family: arial;"> </span><span style="font-family: arial;">package from command line </span></div>
<div style="background-color: #eeeeee; text-align: left; width: 300px;">
<span style="font-family: courier; font-size: x-small;"><span>cd ~/.node-red</span><br />
<span>npm install @abandonware/noble</span><br /></span></div>
<div><br /></div><div><span style="caret-color: rgb(36, 41, 46); color: #24292e; font-family: arial;">Via the NR GUI install <a href="https://flows.nodered.org/node/node-red-contrib-ble-sense" target="_blank">node-red-contrib-ble-sense</a>.</span></div><br />
<div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-size-adjust: auto;">
<span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">Restart NR</span></span><code style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo systemctl restart nodered</span></code><span face=""arial" , "helvetica" , sans-serif"><span style="font-family: arial;">and check the installed Node via the NR GUI. It will appear in the Node list below "BLE Sense", named</span> </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">BLE Scanner.</span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-size-adjust: auto;"><span style="font-family: arial;">Download, import and deploy t</span><span style="font-family: arial;">he NR flow(</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">RuuviTag.json</span><span style="font-family: arial;">) <a href="https://github.com/MatsA/RuuviTag" target="_blank">from Github</a> and check it out.</span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span face=""arial" , "helvetica" , sans-serif"><span style="font-family: arial; font-size: x-large;"><b>Remarks<br /></b></span><span style="font-family: arial;"><b>Received data</b><br />Please note that you can receive several broadcasts <b>from the same sensor</b> during the 5 seconds of scan. </span></span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span face=""arial" , "helvetica" , sans-serif"><span style="font-family: arial;"><b>More than one Ruuvi Tag ?</b><br /></span></span><span style="font-family: arial;">The flow works for </span><span style="font-family: arial;"><b>ONE</b></span><span style="font-family: arial;"> tag ! </span><span style="font-family: arial;">If you want to receive several tags distinguish on the value </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">mac</span><span style="font-family: arial;"> which is the individual MAC id. A </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">switch</span><span style="font-family: arial;"> node could be one way to handle it ?!</span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span style="font-family: arial;"><b>Error<br /></b></span><span style="color: #24292e; font-family: arial;">If you get, after for example an upgrade, "</span><span style="background-color: #eeeeee; color: #24292e; font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;">Unable to start BLE scan</span><span style="color: #24292e; font-family: arial;">" in the RPi syslog run the "</span><span style="background-color: #eeeeee; color: #24292e; font-family: courier; font-size: x-small;">setcap</span><span style="color: #24292e; font-family: arial;">" command mentioned above.</span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span style="font-family: arial;">Check <a href="https://pysselilivet.blogspot.com/2019/10/bluetooth-beacon-ble-and-raspberry-pi.html" target="_blank">this post</a> to get som more info at errors.</span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span style="font-family: arial;"><b><span style="font-size: medium;">Ruuvi station app</span></b><br />With the <a href="https://apps.apple.com/us/app/ruuvi-station/id1384475885" target="_blank">iOS app</a> you now can update the firmware in the Ruuvi TAG.</span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span style="font-family: arial;"><b><span style="font-size: medium;">Format</span></b><br />The RuuviTags can output </span><a href="https://github.com/ruuvi/ruuvi-sensor-protocols/blob/master/broadcast_formats.md" style="font-family: arial;" target="_blank">several formats</a><span style="font-family: arial;">, but </span><a href="https://github.com/ruuvi/ruuvi-sensor-protocols/blob/master/dataformat_05.md" style="font-family: arial;" target="_blank">this one</a><span style="font-family: arial;"> is in actual production. This</span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span style="background-color: #eeeeee; caret-color: rgb(36, 41, 46); color: #24292e; font-family: courier; font-size: x-small;">99040510604390c68c0034ffcc0418a1b6044230c9ea85c7aacb</span><span face=""arial" , "helvetica" , sans-serif"><br /></span></div><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span face=""arial" , "helvetica" , sans-serif"><span style="font-family: arial;">is an output caught after the</span><span style="font-family: arial;"> scan node. </span></span><span style="font-family: arial;">The </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">05</span><span style="font-family: arial;"> direct after </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">9904</span><span style="font-family: arial;"> is the code for the dataformat.</span></div><p style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span style="font-family: arial; font-size: x-large;"><b>Old flow<br /></b></span><span style="font-family: arial;">Install dependencies</span></p><p style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span style="font-family: courier; font-size: x-small;"><span style="background-color: #eeeeee;">sudo apt install libbluetooth-dev libudev-dev</span><span style="background-color: #eeeeee;"> git</span></span></p><p style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span style="font-family: arial;">Install the</span><code style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><a href="https://www.npmjs.com/package/@abandonware/noble" target="_blank">noble</a></span></code><span class="Apple-converted-space" style="font-family: arial;"> </span><span style="font-family: arial;">package, the latest updated</span><span class="Apple-converted-space" style="font-family: arial;"> </span><code style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><a href="https://github.com/MatsA/node-red-contrib-noble" target="_blank">node-red-contrib-noble</a></span></code><span class="Apple-converted-space" style="font-family: arial;"> </span><span style="font-family: arial;">node and the</span><span style="font-size: x-small;"><code style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; margin: 0px; padding: 0.2em 0.4em;"><span style="background-color: #eeeeee; font-family: courier;"><a href="https://github.com/ojousima/node-red" target="_blank">node-red-contrib-ruuvitag</a></span></code></span><span style="font-family: arial;">node</span></p><div style="box-sizing: border-box; caret-color: rgb(36, 41, 46); color: #24292e; margin-bottom: 16px; text-align: left; text-size-adjust: auto;"><span><div style="background-color: #eeeeee; color: black; font-family: Times; width: 300px;"><span style="font-family: courier; font-size: x-small;"><span>cd ~/.node-red</span><br /><span>npm install @abandonware/noble</span><br /><span>npm install MatsA/node-red-contrib-noble</span><br /><span></span><span>npm install ojousima/node-red</span></span></div><br style="color: black; font-family: Times;" /><div style="box-sizing: border-box; margin-bottom: 16px; text-size-adjust: auto;"><span style="font-family: arial;"><span face=""arial" , "helvetica" , sans-serif">Restart NR,</span></span><code style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Times; margin: 0px; padding: 0.2em 0.4em;"><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo systemctl restart nodered</span></code><span style="font-family: Times;"><span style="font-family: arial;">, and check the installed Nodes via the NR GUI. It will appear in the Node list below "advanced", named</span> </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">scan ble</span><span style="font-family: Times;"> <span style="font-family: arial;">and</span> </span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">ruuvitag</span><span style="font-family: Times;">.</span><br /><span style="font-family: Times;"><br /></span><span style="font-family: arial;">The NR flow(</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">RuuviTag_old.json</span><span style="font-family: arial;">), shown dashboard above, can be <a href="https://github.com/MatsA/RuuviTag" target="_blank">downloaded from GitHub</a>.</span></div><div style="box-sizing: border-box; font-family: Times; margin-bottom: 16px; text-size-adjust: auto;"><span style="font-family: arial;"><br /></span></div></span></div>
</div></div>Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com7tag:blogger.com,1999:blog-2016632442552546592.post-59281203322620775312023-10-26T11:47:00.011+02:002023-10-27T14:55:28.893+02:00Homebridge made simple, Homebridge<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwx6EVn1Y2XXAwtlxb3kVmKPKw_eaYEgXD3WJkkDUlgkT3SdLbjPeo41019VZCG5vDnpMEP1tMjMmOQDXTcvR9pw9rIPPub8DTT6dCjLMEXFD8d8NGYV1ZLyTShuwtFMxySr_1Dr09Ekp/s1600/2020-05_HB.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwx6EVn1Y2XXAwtlxb3kVmKPKw_eaYEgXD3WJkkDUlgkT3SdLbjPeo41019VZCG5vDnpMEP1tMjMmOQDXTcvR9pw9rIPPub8DTT6dCjLMEXFD8d8NGYV1ZLyTShuwtFMxySr_1Dr09Ekp/s320/2020-05_HB.png" width="320" /></a><span style="font-family: arial;"><div>
<span style="font-family: arial;"><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span face="arial, helvetica, sans-serif" style="background-color: lime;">Updated 2023-10-26 !</span></span><br /></span></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<span face="arial, helvetica, sans-serif"><a href="https://pysselilivet.blogspot.com/2016/11/homekit-z-wave-telldus-live.html" target="_blank">HomeBridge</a>(HB) is the software where You make Your home automation devices appear in
the
<a href="https://apps.apple.com/us/app/home/id1110145103" target="_blank">Apple Home App</a>
as native products. In this post a
<a href="https://www.raspberrypi.org/" target="_blank">Raspberry Pi</a> is used as the HB server.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">There has really been big improvements in the installation process and I
think the HB version is better/easier than
<a href="https://pysselilivet.blogspot.com/2019/09/homebridge-made-simple-hoobs.html" target="_blank">HOOBS</a>.</span><br />
<span face="arial, helvetica, sans-serif"><br />Migrate from HOOBS ?!
<a href="https://github.com/homebridge/homebridge-raspbian-image/wiki/How-To-Migrate-From-HOOBS-To-Homebridge" target="_blank">Link</a><br /></span>
<span face="arial, helvetica, sans-serif"></span><br /> </span><a name='more'></a><span style="font-family: arial;"><span face="arial, helvetica, sans-serif"><span style="font-size: x-large;"><b>Homebridge images</b></span><br /></span></span>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">There are
<a href="https://github.com/homebridge/homebridge-raspbian-image/releases" target="_blank">images available</a>, with good
<a href="https://github.com/homebridge/homebridge-raspbian-image/wiki/Getting-Started" target="_blank">instructions</a>, but this post will handle a manually install with Raspberry Pi
OS.</span><br />
<span face="arial, helvetica, sans-serif"><br /><b><span style="font-size: x-large;">Manually install</span></b><br /></span>
<span face="arial, helvetica, sans-serif">If You want to start from scratch, with a new SD card, there are <a href="https://pysselilivet.blogspot.com/2017/02/rpi-raspbian-install-with-mac.html" target="_blank">instructions here</a> how to install the Raspberry Pi OS. Please note that its sufficient with a RPi OS <b>Lite</b> install since HB have its own web-server. </span><br />
<span face="arial, helvetica, sans-serif"><br /></span><span face="arial, helvetica, sans-serif">Then I followed
<a href="https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Raspbian" target="_blank">these instructions</a> to install HB.</span><br /></span><span face="arial, helvetica, sans-serif"><br /><span style="font-family: arial; font-size: medium;"><b>Autostart</b></span><br /></span><span style="font-family: arial;">A <b><a href="https://wiki.debian.org/systemd" target="_blank">systemd</a></b>
service will be installed which will autostart the HB server at power on and
restart it at failure. Could be checked with </span>
</div>
<div>
<br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo systemctl status homebridge</span><br /><br /><b style="font-family: arial;"><span style="font-size: medium;">WEB UI</span></b>
</div>
<div>
<span style="font-family: arial;"><span face="arial, helvetica, sans-serif">At the end of the installation the URL link to the UI will be shown.
Something like</span></span>
</div>
<div><br /></div>
<div>
<span style="background-color: #eeeeee; font-variant-ligatures: no-common-ligatures;"><span style="font-family: courier; font-size: x-small;">http://192.168.1.nn:8581</span></span>
</div>
<div>
<span face="arial, helvetica, sans-serif"><br /></span><span face="arial, helvetica, sans-serif"><span style="font-family: arial;">where You create a new user and add the password.</span></span>
</div>
<div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;"><span style="font-size: x-large;"><b>Homebridge plugins</b></span><br />
<span face="arial, helvetica, sans-serif">And now You are done and can
<a href="https://github.com/homebridge/homebridge-raspbian-image/wiki/Getting-Started#step-5-install-and-configure-plugins" target="_blank">install the plugins</a>
that fits Your usage. This is done in the UI, clicking on the tab
"Plugins" and then search for, as an example, the "RING" plugin.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">Install and then click on "NPM" where You will get help for the
settings part. Complete the installation with restarting the server and
check the log window.</span><br />
<span face="arial, helvetica, sans-serif"><br /></span>
<span face="arial, helvetica, sans-serif">Additional help can be found in the
<a href="https://github.com/homebridge/homebridge/wiki" target="_blank">WiKi</a> and checking the
<a href="https://pysselilivet.blogspot.com/search/label/HomeKit" rel="nofollow" target="_blank">other HB posts</a>
in this blog.</span></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;"><b><span style="font-size: x-large;">Add to the HOME app</span></b><br />In the home app click on the "+" sign in the upper right part, "Add
Accessory => Scan a Setup Code"<br />Scan the code, in the WEB UI to
the upper left, with the camera, on your iPhone/iPad, and then "Add to
home".</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span id="update" style="font-family: arial; font-size: x-large;"><b>Update homebridge</b></span>
</div>
<div><span style="font-family: arial;">I always recommend to check that a backup is present, HB settings, before you upgrade.
It's simple and done via the GUI and the meny up to the right.
"Backup/Restore => Scheduled Backups". If not create a backup file, and then download to your computer.</span></div>
<div>
<span style="font-family: arial;"><br /></span>
</div><div><span style="font-family: arial;">Another way to backup is to <a href="https://pysselilivet.blogspot.com/2017/11/rpi-clone-raspberry-boot-disk.html" rel="nofollow" target="_blank">create a bootable copy</a> of your total setup.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Homebridge <a href="https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Raspbian#updating" target="_blank">update documentation</a>.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span><div style="font-family: -webkit-standard;"><span style="font-family: arial;">Start with a Raspberry Pi OS update from command line</span></div><div style="font-family: -webkit-standard;"><span style="font-family: arial;"><br /></span></div><div><span style="font-size: x-small;"><span style="font-variant-ligatures: normal; orphans: 2; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;"><span style="background-color: #eeeeee; color: #400bd9; font-family: courier; font-variant-ligatures: no-common-ligatures;"><b>$</b></span><span style="background-color: #eeeeee; font-family: courier; font-variant-ligatures: no-common-ligatures;"> </span></span><span style="background-color: #eeeeee; font-family: courier; font-variant-ligatures: normal; orphans: 2; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;">sudo apt update && </span><span style="background-color: #eeeeee; font-family: courier; font-variant-ligatures: no-common-ligatures; orphans: 2; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;">sudo apt full-upgrade</span><span style="background-color: #eeeeee; font-family: courier; font-variant-ligatures: normal; orphans: 2; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2;"> -y && sudo apt clean</span></span></div><div style="font-family: arial;"><br /></div></span></div>
<div>
<span style="font-family: arial;">Then update HB via the GUI or the manual way via command line.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">I had a problem that after an upgrade of "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">homebridge-config-ui-x</span><span style="font-family: arial;">" the GUI didn't work. So after a manual reinstall "</span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">sudo apt-get install homebridge</span><span style="font-family: arial;">" and a restored backup, of the settings, everything was up running again.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">In some cases it could be that the update function don't cover all
packages but with the below command you will be notified.</span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="background-color: #cccccc; font-family: courier;"><p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variant: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span style="color: #400bd9; font-variant-ligatures: no-common-ligatures;"><b>$</b></span><span style="font-variant-ligatures: no-common-ligatures;">
npm outdated -g --depth=0</span>
</p>
<p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variant: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span style="font-variant-ligatures: no-common-ligatures; text-decoration: underline;">Package</span><span style="font-variant-ligatures: no-common-ligatures;">
</span><span style="font-variant-ligatures: no-common-ligatures; text-decoration: underline;">Current</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures; text-decoration: underline;">Wanted</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures; text-decoration: underline;">Latest</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="font-variant-ligatures: no-common-ligatures; text-decoration: underline;">Location</span><span style="font-variant-ligatures: no-common-ligatures;">
</span><span style="font-variant-ligatures: no-common-ligatures; text-decoration: underline;">Depended by</span>
</p>
<p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variant: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span style="color: #b42419; font-variant-ligatures: no-common-ligatures;">corepack</span><span style="font-variant-ligatures: no-common-ligatures;">
0.18.0 </span><span style="color: #2fb41d; font-variant-ligatures: no-common-ligatures;">0.22.0</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c814c9; font-variant-ligatures: no-common-ligatures;">0.22.0</span><span style="font-variant-ligatures: no-common-ligatures;"> node_modules/corepack
global</span>
</p>
<p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variant: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span style="color: #b42419; font-variant-ligatures: no-common-ligatures;">homebridge-config-ui-x</span><span style="font-variant-ligatures: no-common-ligatures;">
4.51.0 </span><span style="color: #2fb41d; font-variant-ligatures: no-common-ligatures;">4.51.1</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c814c9; font-variant-ligatures: no-common-ligatures;">4.51.1</span><span style="font-variant-ligatures: no-common-ligatures;"> node_modules/homebridge-config-ui-x global</span>
</p>
<p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variant: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span style="color: #b42419; font-variant-ligatures: no-common-ligatures;">node-red</span><span style="font-variant-ligatures: no-common-ligatures;"> 3.0.2
</span><span style="color: #2fb41d; font-variant-ligatures: no-common-ligatures;">3.1.0</span><span style="font-variant-ligatures: no-common-ligatures;">
</span><span style="color: #c814c9; font-variant-ligatures: no-common-ligatures;">3.1.0</span><span style="font-variant-ligatures: no-common-ligatures;"> node_modules/node-red
global</span>
</p>
<p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-size: 11px; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variant: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span style="color: #b42419; font-variant-ligatures: no-common-ligatures;">npm</span><span style="font-variant-ligatures: no-common-ligatures;">
9.6.7 </span><span style="color: #2fb41d; font-variant-ligatures: no-common-ligatures;">10.2.1</span><span style="font-variant-ligatures: no-common-ligatures;"> </span><span style="color: #c814c9; font-variant-ligatures: no-common-ligatures;">10.2.1</span><span style="font-variant-ligatures: no-common-ligatures;"> node_modules/npm
global</span>
</p></span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<span style="font-family: arial;">The update command for npm is </span>
</div>
<div>
<span style="font-family: arial;"><br /></span>
</div>
<div>
<p style="font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variant: normal; font-variation-settings: normal; line-height: normal; margin: 0px;">
<span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span style="color: #400bd9; font-variant-ligatures: no-common-ligatures;"><b>$</b></span><span style="font-variant-ligatures: no-common-ligatures;">
sudo npm install -g npm@latest</span></span>
</p>
</div>
<div>
<div>
<span style="font-family: arial;"><br /></span>
</div><div><span style="font-family: arial;">Please note that Node.js 18.x, or greater, should be used. Help for <a href="https://github.com/homebridge/homebridge/wiki/How-To-Update-Node.js" target="_blank">upgrading Node.js</a> !</span></div><div><span style="font-family: arial;"><br /></span></div>
<div>
<span style="font-family: arial; font-size: x-large;"><b>Additional hints</b></span>
</div>
<div>
<span><span><span style="font-family: arial; font-size: medium;"><b>Check log</b></span><br />
<div style="font-family: arial;">
<font face="arial">If You have problems with the UI You can check the HB log in a
terminal/ssh session with </font>
</div>
<div style="font-family: arial;">
<font face="arial, helvetica, sans-serif"><br /></font>
</div>
<div>
<p class="p1" style="font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;">
<span class="s1" style="background-color: #eeeeee; font-family: courier; font-variant-ligatures: no-common-ligatures;"><font size="2">$ cat /var/lib/homebridge/homebridge.log</font></span><span face="arial, helvetica, sans-serif"><span><span style="font-family: courier; font-size: small;"> </span><span style="font-family: arial;">or</span><span style="font-family: courier; font-size: small;"> </span></span><span style="font-family: courier; font-size: small;"> </span></span><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;"><span style="font-variant-ligatures: no-common-ligatures;">$ </span><span style="font-variant-ligatures: no-common-ligatures;">sudo hb-service logs</span></span>
</p>
</div></span></span><span style="font-family: arial; font-size: medium;"><br /><b>Authentication</b></span>
</div>
<div>
<span style="font-family: arial;">If You want to disable authentication change, in the WEB UI, "Settings
=> UI Settings => Advanced => Homebridge Config UI X
Authentication" to "None"</span><br /><br /><b style="font-family: arial;"><span style="font-size: medium;">CLI functions</span></b><br /><span style="font-family: arial;">To show the additional functions in the "hb-service" command just type </span><br /><br /><span style="background-color: #eeeeee; font-family: courier; font-size: x-small;">$ sudo hb-service</span><br /><br /><span style="font-family: arial;"><b><span style="font-size: medium;">Port number</span></b><br />If You want to change the default port number for the UI please
use one above 1024, due to permissions.<br /><br /><b><span style="font-size: medium;">User Homebridge</span></b><br />Please note that the HB application us running with user
"homebridge". From install log<br /></span><br /><span style="font-family: courier; font-size: x-small;">Adding system user `homebridge' (UID 115) ...<br />Adding new group
`homebridge' (GID 125) ...<br />Adding new user `homebridge' (UID 115)
with group `homebridge' ...<br />Creating home directory
`/home/homebridge' ...</span><br /><br /><span style="font-family: arial; font-size: x-large;"><b>HOOBS</b></span><br /><span style="font-family: arial;">And as said it's simple to migrate from HOOBS to Homebridge with a
HOOBS backup. All settings and plugins are very nice restored !!</span>
</div>
</div>
</div>
Pyssel i livethttp://www.blogger.com/profile/12605938134542315909noreply@blogger.com0