I suppose adding support for MariaDB is not an option???
how to say ???
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 25114
Server version: 10.1.34-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04
I donāt understand your question.
I have uploaded a new server.js file that fixes the error caused by the MaridDB connection being closed. Hopefully this is the last error.
You said that you prefer MySQL, when most Linux distros now favor the MariaDB forkā¦
Yes, I did. In the future I will write mysql.
I can answer this question for myself now because today I had the panel running nicely and when I disconnected my internet connection everything continued working which confirms WFArchive does not need the internet to collect and display the data from my weatherflow station.
And I was able to use the MariaDB with queries in the terminal window, so well on the way towards what I would like.
Thanks @GaryFunk
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
This is an indication you are in the wrong folder.
could it be that the rain rate ā today isnāt updating?
we had 2 showers night and one about 30 mins back at that is not visible as today ā¦
or once again I donāt understand a thing ??
Yes, that is incorrect. I will look at why itās not updating the Today.
I have updated all the applications and posted version 1.7.13. See the first post. If you have any issues you may post here.
I found and corrected the issue. A new Archive script is up for download.
installed 1.7.13.034, will see if I find something else to complain about
I just updated some files to deal with incorrect rapid wind values that I introduce in a previous version.
I found and fixed a bug with one hour rain in Archive. The new file is uploaded.
EDIT:
There may be a bug in server.js that has to do with sending Alerts. I am tracking it and hope to have it resolved soon.
EDIT AGAIN:
Bugs found, bugs eradicated, new files uploaded.
A minor change to Server to support a change in log files. The last 15 hours were very stable. I will be looking for bugs as no issues so there will be no major changes to the code for the next few days.
Please delete all you error logs and report any new errors
in archive.log I get this line
====================
2018-11-02 19:03:46 Starting Archive v1.7.13.075
2018-11-02 19:03:46 TCP client active on: 127.0.0.1:33404 to 127.0.0.1:9090
2018-11-02 19:03:46 MariaDB connected
2018-11-02 19:03:46 appRestart : :
2018-11-02 19:04:18 TCP client active on: 127.0.0.1:33416 to 127.0.0.1:9090
2018-11-02 19:05:10 Error in insertObsSky
ReferenceError: rainHour is not defined
I found and fixed it. New file uploaded.
Thank you @eric
@GaryFunk atm I use weewx I read somewhere (not sure if its true) that the udp port can be accessed by one programm at the same time , so I wonder if I can use WFarchive simultaneously on the same Raspberry furthermore can I use two mysql databases at the same time.
Somebody has experiences with this and should I consider a raspberry 3? (Iāve a B2)