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-05-26 !!


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


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