Hi those who require more detail,
Here is a draft instructions with more detail of the process I went through to setup WFArchive on a Raspberry Pi. The first time I did it everything worked but when I completely repeated the process I have a problem to sort out, but later…
Warning I didnt know anything and only know a little bit so there could be easier better ways. I am simply recording my learnings as I go and especially reporting the mistakes I made to save you repeating them.
My recipe to install WFArchiver into a raspberry Pi https://www.raspberrypi.org/
Ingredients:
Raspberry Pi 3 model B+ https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/
Power supply official raspberry 5.1V 2.5Amp. Dont skimp on the power supply!
Case (Optional)
128Gb class 10 Micro SD card (smaller is fine to start with)
Keyboard with USB plug
Mouse with USB plug
A monitor with a hdmi input (Other input options will also work)
HDMI lead
Another computer to format the micro SD card
Wireless internet connection (could be ethernet, but I use wireless)
Method:
Format the micro SD card to FAT32
(Warning, If you use ‘SD Formatter 4.0’ for a micro SD card larger than 32Gb it will not format to FAT32 which the raspberry Pi requires.)
I use a mac so I use the Disk Utility App and select MS-DOS(FAT), Master Boot Record.
Download NOOBS https://www.raspberrypi.org/downloads/noobs/ latest zip file
Extract NOOBS, select all the files and folders (21 items) from the extracted folder and copy them to the micro SD card.
Eject the micro SD card
Insert the micro SD card into the raspberry Pi
Plug in
Mouse
Keyboard
Turn on the monitor, (select HDMI)
Plug in HDMI cable
Plug in the power to the raspberry Pi (Which turns it on)
When the window NOOBS … appears click with the mouse to select ‘Raspbian [RECOMMENDED]
Then click ‘Install’ logo
Respond to Warning… Yes
Read the windows while the operating system loads…Takes about 10 minutes
(But if it freezes and doesnt install there could be a number of issues such as inadequate power supply. I had no problems the first time but when I began again to repeat a full install to check the instructions it froze at 2% for perhaps 30 minutes. Previously I didnt use the case. So I removed it from the case, reformatted the micro SD card and kept everything cool in a breeze. This time the % marker is roughly matching towards 100% at 10 min.)
A window appears ‘OS(es) installed Successfully’, click OK.
‘Welcome to the Raspberry Pi Desktop!, click Next.
Set: Country, Language, Timezone, click Next.
Change Password of ‘pi’ click Next.
Select WiFi network, click Next.
Enter WiFi Password, click Next.
Update Software, click Next.
Setup Complete, click Reboot.
Consider security: Securing your Raspberry Pi - Raspberry Pi Documentation
Click the round blue earth Web Browser icon beside the raspberry in the top left corner
Enter the following address:
http://wf.fsoft.com/wfarchive/install.txt
Open a terminal window, the 4th icon with >_
Now you can copy and paste the commands from the browser window to the terminal window.
copy sudo apt-get update
and paste it after the prompt: pi@raspberrypi:~ $sudo apt-get update
press enter
copy sudo apt-get dist-upgrade
and paste it after the prompt: pi@raspberrypi:~ $sudo apt-get dist-upgrade
press enter
press up arrow twice, enter to repeat the first command,
And repeat (up arrow twice, enter )another 3 times as per the instructions.
copy and paste bash -e <(wget -qO - http://wf.fsoft.com/wfarchive/script/install.sh)
press enter
And follow instructions to install crontab but when you enter
crontab -e then PRESS ENTER
and at Choose 1-3 [2] PRESS ENTER
Ctrl-o press enter
Ctrl-x (To exit)
Press up arrow twice to repeat bash -e <(wget -qO - http://wf.fsoft.com/wfarchive/script/install.sh) press enter
File location select y
Database name and location, no changes press n
Lots of stuff gets installed…
Do you want to install GPIO support? I chose Y
Do you want to create a SQL user for yourself, I chose Y
username
password: I think there are rules required so I used numbers and letters with upper and lower case without special characters which might confuse command lines which I did in my first install and I couldnt log in to the database due to my password having special characters.
copy the http address to the browser window, press enter
Click Config, click ‘For Station information, Click here (Right click open in new tab can save time, and right click the Panel page and open in another new tab to copy the fields there too)
Enter your station ID (4 digits from the internet link to your weather station web page)
Fill out the right side of the Config by copying values from your station information.
I dont use CWOP so ignored it
The PWS Weather ID is called Name on your config page
and password for your station for Weatherflow
Click OK at bottom left
Goto Panel page (Do the same, or paste them here at the same time as the config page above)
Fill in Primary device details like you did for the config page.
Change Panel Active to Yes
Take note of the HTTP port number.
Click OK
Click Process
Click to add Archive and Panel, and click start on both of them
==========================================
Last time I installed everything and had it running very nicely and the panel worked very well at the IP address with the port 8088 but this time it is not working. I have some issue to sort out after some zzzz.
But the MariaDB wfarchive database is working from the terminal window. I will detail that later.
I will continue with my detailed recipe and findings after I have found the problem.
pm2 list doesnt have anything running now, but it did before…
if I try ‘pm2 start’ I get
[PM2][ERROR] File ecosystem.config.js not found
Next day edit: I learned some more stuff checking everything that I could think of and concluded perhaps I had entered the wrong password for my weatherflow login so I did a full reinstall from the beginning of my instructions and was more careful during the WFArchive config and panel settings and starting the archive and panel process one at a time and this time everything is working perfectly.
cheers Ian