Monday, 15 May 2017

RPi, Raspberry image backup to Mac


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.

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                  
                                 9519AF9B-4C53-41CE-BB98-1139A7C82D9D        
                                 Unencrypted                                
/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 2017-05-17 !

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


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

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

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

http://pws01/

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 2017-05-15 !

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, 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 2017-06-07 !!

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

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

Installation

Sunday, 22 January 2017

Davis weather station, WLink, PHP


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 . 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 ??




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.

https://weather34.com/homeweatherstation/

As You could se in the information the online 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



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

/usr/bin/homebridge

If You used another setup check with 

$ which homebridge

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

ExecStart=/usr/bin/homebridge

Create the service file for systemd

Saturday, 26 November 2016

Samba, RPi as Windows file server

If You want that the Raspberry Pi, RPi, shall appear in MS Explorer or Mac Finder, as a File server, the easiest way is to install Samba.

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.


Log on to the RPi and install Samba

$ sudo apt-get install samba samba-common-bin

Edit the Samba configuration file so that You have more than "Read Only" rights.

$ sudo nano /etc/samba/smb.conf

Friday, 25 November 2016

HomeKit, Z-Wave, Telldus Live

If You want to use one  Raspberry Pi to:

  • Emulating the HomeKit protocol, so Your home automation devices appear in the Apple Home App
  • Being the Z-Wave controller with the Razberry Daughter Card
  • HomeKit enable Your Z-Wave devices
  • HomeKit enable Your devices registered at Telldus Live 
It's no problem, just follow the links below

Z-Wave controller installation
HomeKit bridge for Z-Wave
HomeKit bridge for Telldus Live (Where You skip the Homebridge part)

Thursday, 24 November 2016

Thunderbolt cable replacement

The 27" Thunderbolt Display, part number A1407, is connected to my MacBook Air and sometimes the display is going black.

After some Googling I found that other people have had the same problem and the issue is that the Thunderbolt cable is defect.

The thing is always to get the right spare part number which is 922-994

So after a search on Ebay I ordered one from China which after a month was delivered for ,17€ including shipping !!

Some hints to exchange the cable is to follow the relevant parts of these instructions on IFIXIT

I bought suctions cups from Biltema to lift the the glas screen which is attached with magnets


Sunday, 13 November 2016

HomeKit for Telldus Live


Do You have Telldus devices up and running and want them to be visible and used in Apples Home app ?

Another thought is that there are not so many native devices available for Apples HomeKit and also why throw away all the devices You have integrated with Your Telldus controller when they can appear in the HomeKit environment ?

If You have Z-wave products there is a parallel solution found in this post.

If You have both Z-wave and Telldus devices at home there is no problem running them at the same time, on the same Raspberry Pi, RPi, and also together with native devices.

Out there on the web there are several smart guys who seems to think the same and are very great in programming. So they have fixed applications running on RPi which emulates a HomeKit device and on the same time bridges the functions to Telldus live registered devices.

And now over to the software and installation which assumes that You have a RPi up and running with Debian or want to start up fresh

Wednesday, 9 November 2016

Empty the water system


Empty the fresh water system with compressed air !!

One of the things, when You head back to land with the boat, is to empty the fresh water system. I have got several instructions/tips over the years but the best advise I got is to empty the pipework with compressed air.

Some time ago I bought a handy Stanly compressor from Jula. Just below 10 Kg in weight including a 6 liter tank. Nice for smaller works

So how do You connect the compressor to the pipe works ?
On our boat the pipework is made with Whale System 15 so I built an adaptor with;
  • 1 meter Whale 15 tube
  • Standard connector with 3/8"
  • 3/8" adaptor from the Whale 15 system
So now it is very simple to just disconnect the pump from the system and instead connect, via the adaptor, the compressor to the pipe works.

Now its just to start the compressor and go around in the boat and open the taps one by one so all the water goes away.


Tuesday, 8 November 2016

Find Your Car with iPhone


Have You ever felt lost, coming out from a shopping mall and just wondering;

Where the heck did I leave my car ???

If Your iPhone is connected to Your car with Bluetooth the problem is solved.

Apple have had a brainstorming so just follow the advice in this support information.

How to find your parked car with Maps on your iPhone

and You are all safe.