Tuesday, 21 November 2017

RPi, Clone the Raspberry boot disk

             Updated 2018-02-03

A very nice way to fix a backup is to make a copy, bootable, of the actual SD card You are using in the RPi and this when the RPi is up an running. 

You clone from the command line so You don't need the standard GUI, Pixel, and the SD card copy function.

It is also possible to set up a cronjob, explained later, which for example makes a clone every night at 1 o'clock.

You just need a USB SD card reader, with a SD Card, which You initialize with the SD Formatter.

Then You plug the SD Card in to a free USB port on the RPi.

Monday, 13 November 2017

Raspbian Lite with GUI, RDP, VNC

I like the Raspberry Pi, RPi, with Raspbian 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. 

You maybe wonder, why don't use the Raspbian 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. ;-)

So after some Googling inspired from this guide I came up with the following setup.

Sunday, 29 October 2017

Qubino flush dimmer 1-10 V

We bought a nice LED lamp, Nemo Ellisse Pendant Double, which was said to be dimmable, but when receiving it there was a big IF  !!! 

The lamp was not "standard" dimmable, instead it was dimmable with 1-10 VDC or 100 Kohm potentiometer.

The 1-10 VDC control is common in big installations, in public environment, since it can control a lot of lamps with one dimmer.

Checking the lamp I found that the AC/DC LED driver was a Mean Well LPF-90D and in the drivers specification the second IF was found !!

The lowest control level didn't switch of the lamp

Sunday, 22 October 2017

Volvo Penta D4/D6 water pump leak

The sea water pump, labeled 3589907 and replaced by 21380890, was leaking a little so a change of seal was necessary. Numbers below refers to the explode view.
  • Detach the generator belt from the pump pulley and the 2 hoses from the pump.
  • Unscrew the water pump, 4 scews, from the engine block.
  • Remove the cover, 7, from the pump.
  • Pull out the impeller, 6.
  • Remove the cam, 4, by unscrewing screw 18.
  • Remove the washer, 22.
  • Remove the lock ring 14 and washer 21.
  • With a pliers remove the seal 8.
  • If You don't manage to remove the seal, 8, You have to remove the shaft from pump housing. The seal will stay in the housing and can be pushed out from the ball bearing side.
  • Install a new seal, 3583609, and assemble the other parts in reverse order.

Friday, 11 August 2017

OpenPlotter, NMEA data TO file

             Updated 2017-08-14

Sometimes You want to "take home" Your latest trip on sea and "replay" it or replay it doing some changes in the settings for the OpenPlotter or OpenCPN applikation and se the result direct.

One way is to create log files with the the "raw" NMEA data and then use them at home with tips from this post.

Creating log files from NMEA 2000 bus, N2K, is the most straightforward.

Check what name Your CAN usb interface have. One way doing it is reading the log from auto setup found in "OP=> Tools => Auto Setup"

Open Terminal and just type the following with Your CAN usb name

actisense-serial -r /dev/ttyUSB0 > N2K_2017-08-08.txt

Thursday, 10 August 2017

Volvo Penta NMEA 2000 Gateway

          Updated 2017-11-24

It's always nice to have ALL information at the same place, navigator/plotter, when You are out with the boat. 

What could be missing is the engine information/data. If You have a Volvo Penta from 2006 or later it could be pretty easy.

Volvo Penta has it's own 22813366, 3889758
Raymarine ECI-100
Maretron J2K100

and so on.

But there is a pretty new one from Yacth Devices, YD, which is OK priced, NMEA certified, having galvanic isolation between the interfaces and some additional features compared to the above mentioned. 

Thursday, 3 August 2017

OpenPlotter USB sensors install

Updated 2018-06-26!

If You started with my quick instal guide You are a little familiar with OpenPlotter, (OP), basics and now we proceed with the sensors. Don't forget to delete the RMC sentence from the "NMEA 0183 generator" which we used.

Link to a stand alone AIS receiver.

Prior V 1.x.x In OP there is clever function that attempts to auto detect the connected USB devices This function auto starts until You uncheck the "setup autostart on every boot". If You want to start this manually it is found in OP=> Tools => Auto Setup. Please note that just USB serial devices will be listed. If You connect a SDR-USB for AIS reception it will not show in the "USB manager" because it s not a serial device.

Read the log from auto setup and check what have happened and then open the "USB manager" tab. If the USB-devices don't show up but are found You have to add them manually according to the instructions.

Friday, 21 July 2017

OpenPlotter, NMEA data FROM file

          Updated 2018-05-30 !

To test Openplotter, (OP), together with OpenCPN,(OC), without connecting to the navigation network on board there are two features 
  • Using the NMEA generators, found in the OP "Tools" menu 
  • Use log files which are stored within the SignalK application.
The generators are explained in the documentation and here will be a description how to use the log files from OP 

Tuesday, 18 July 2017

OpenPlotter quick install guide

Updated 2018-05-30!

OpenPlotter is;
  • A complete boat navigation system
  • Includes OpenCPN, Chart plotter navigation
  • OpenSource, so it's free !
  • Running on Raspberry Pi(RPi)
  • Its hardware is cheap
  • Running on Unix, so its reliable
  • It comes with NOOBS(New Out Of Box Software) which makes it very simple to install
Its also a compilation of several other nice software which makes it a fantastic package for additional functions.

The Openplotter WEB-site, the nice forum with active people and god documentation makes it almost easy, but if You are a newbie to both OpenPlotter(OP) and OpenCPN(OC), as I was, it can be to much.....

Monday, 15 May 2017

RPi, Raspberry image backup to Mac

             Updated 2018-02-14 !

This backup method will make a copy/image of the whole card even if there is very little data on it. So if the card is 16Gb, the backup file also will be 16Gb. On the other hand You can ZIP the image file to save space.

Another, maybe smarter ?,  backup method is described here.

Connect the card reader, with the SD card inserted, to Your Mac.

Start the program Terminal, on Your Mac, and check Your SD cards name type.

$ diskutil list

and You will have something like

/dev/disk0 (internal, physical):                                              
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0     
   1:                        EFI EFI                     209.7 MB   disk0s1  
   2:          Apple_CoreStorage Macintosh HD            120.5 GB   disk0s2  
/dev/disk1 (internal, virtual):                                              
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            Macintosh HD           +120.1 GB   disk1    
                                 Logical Volume on disk0s2                  
/dev/disk2 (external, physical):                                            
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.1 GB     disk2    

Saturday, 13 May 2017

Weather34 install at WEB hotel

Updated 2018-06-19 !

Prerequisites is listed in the beginning of this post for installation on Raspberry Pi(RPi)

You will find a migration from WeatherLink 1.0 to WeatherLink 2.0 in this post

Hosted installation

In this guide I will use Loopia as an example but other hosts schould be similar

In our case we have created a subdomain http://vader.domstensbatklubb.se/ which is used for the W34 application

In the root of the subdomain a folder, named "public_html" , is created by the host and this is the webserver document root.

Saturday, 15 April 2017

Homebridge update installation on RPi

Updated 2018-02-09 !

Raspberry Pi update

Update the Raspberry Pi OS, after You logged on to the RPi, with;

sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean

Razberry update

If You have installed the Razberry Daughter card check the current software version on the Razberry WEB-site.

If You need to update just run the installation command

wget -q -O - http://razberry.z-wave.me/install | sudo bash 

Monday, 27 February 2017

RPi install Apache/PHP WEB-server

As a part of one of my project, the ultimate Weather site ?? Weather34, I needed a WEB-host with PHP.

I started up with a fresh Raspbian Lite SD Card with Samba installed.

Log on, with ssh, to the RaspberryPi(RPi), with in this case hostname "pws01", and start to install the Apache server with

$ sudo apt-get install apache2

Check that the Apache server works with a WEB-browser and the URL


And the default Apache2 page will show (See picture)

Full documentation is available at Apache.org

Saturday, 25 February 2017

RPi Raspbian install with Mac

Updated 2018-03-22 !

When starting up a new project with Raspberry Pi I like to start up fresh and with a minimal OS. Therefore i always use Raspbian Lite. Doing it right You don't have to use an external display, keybord and mouse, just the ssh client from Your Mac

Connect the card reader, with the SD card inserted, to Your Mac and format the card with SD Formatter and use the "Owerwrite Formate" option. This will also check that the SD card is OK.

Download the latest OS(with or without Desktop/GUI), as image, from Raspberrypi.org unzip it and put it in Your root directory. The same directory as the one You start in when using the program Terminal

Start the program Terminal, on Your Mac, and check Your SD cards name type

$ diskutil list

Thursday, 26 January 2017

Install Weather34 with WeatherLink

Updated 2018-06-19 !!

Interface updated to WeatherLink 2.0(WL2.0)

I You want Your Private Weather Station(PWS), Davis Vantage Pro2 or other Davis products that use WeatherLink, to provide data for the template we use at Domstens Båtklubb just follow the instructions below

If You want the same code version please check this post

And this is without additional software such as Cumulus, Weather display or the Meteobridge product.

Before You start You must ensure that;
When you have logged on to Your WL account You will find the link "Uploads" in the upper part. Click on it and register Your StationID and Password for WU data transfer.

W34 is built so it can get online data from many different PWS solutions which should update their respective online files at the W34 web-server. In our case we pull the XML data direct from the WL site and update an online file, type "cumulus", on the W34 web-server


Sunday, 22 January 2017

Davis weather station, WLink, PHP

Updated 2018-03 !

In the harbour we are using a Davis weather station, Vantage Pro2, as our PWS(Private Weather Station).

If You like to display the data, online on the web, You can use the Davis service, Weatherlink(WL) . We use the WeatherLinkIP to push the data to the web.

If You want to customise Your own website You could retrieve the weather data with serial communication direct from the WeatherLinkIP. There are some applications on Github but then, in this case, You have to have a server with Node.js

Another way is to retrieve the weather data as XML from the Weatherlink web-site.

Below You will find some PHP code which will do the work.

Wednesday, 18 January 2017

The ULTIMATE Weather WEB-site ??

Updated 2017-08-25 !

If You have a Private Weather Station(PWS) and would like to have a good view over the data and, as an add on, also forecasts from Weather Underground (WU) this free software probably solves Your problem. Despite that the project is terminated the code is available and instructions is available at my other posts


Online  weather data could be picked up from many different PWS solutions which should leave their online files at the weather WEB-server.

Weather34 is written in PHP so "any" web server, even a hosted(web hotel), should be able to run it.

The picture is taken from a project where a Davis Vantage Pro2 is the data source and software is running on a Raspberry Pi 3 with a Apache server and PHP installed.

Some code to start with 

Monday, 16 January 2017

Homebridge, autostart with systemd

Updated 2017-10-08 !

systemd is service manger which autostart jobs and it will even

               restart the homebridge job if it fails  

!!! Disable any other homebridge autostart job before You enable systemd  !!! 

If You followed my earlier setup the homebridge command is placed in


If You used another setup check with 

$ which homebridge

so the path in file ”homebridge.service” will be correct


Create the service file for systemd