ArchiveSW - Display & Data Archive Storage



Hi Gary, Thanks for that - worked a treat :slight_smile:


I updated panel.js to allow that data in the Panel to be updated without restarting the Process.


I had the opportunity to install ArchiveSW on a new SD Card. I found and corrected many of the issues you saw. I also started working on an installation guide and script to have the Hub connecting to the RPi which will eliminate loss of data when the router loses power or otherwise fails.

This also allows one to take the station “on the go” and not need to reconfigure the Wi-Fi each time. Simply unplug the Ethernet cable and go.

And of course, allowing the Hub and RPi run off a battery pack.


I now have the Hub plugged into a USB port on the RPi. The Hub connects via Wi-Fi to the RPi which connects via Ethernet to the Router. This has greatly reduced the traffic on my local LAN. This also allows me to place the Hub and RPi at any location I can run a Cat 6 cable.


basically the pi is powering the hub via the USB cable ?


Yes. And the RPi can be powered by an auxiliary battery so it will never lose power.


I did a fresh install using NOOBS and ran the updated script. The only errors I saw were these:
Checking for PM2.js …

PM2.js version is 0.0.0

Installing PM2 for Nodejs

(node:7208) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
/dev/fd/63: line 276: pm2: command not found
PM2.js version is
Complete …

Installing required node modules …

(node:7242) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR!

npm ERR! System Linux 4.14.79-v7+
npm ERR! command “/usr/bin/node” “/usr/bin/npm” “install” “–unsafe-perm”
npm ERR! cwd /home/pi/archivesw
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm WARN package.json path-is-inside@1.0.2 No README data
npm WARN package.json sorted-object@2.0.1 No README data
npm WARN package.json config-chain@1.1.12 No license field.
npm WARN package.json cyclist@0.2.2 No license field.
npm WARN package.json qrcode-terminal@0.12.0 No license field.
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/archivesw/npm-debug.log
npm ERR! not ok code 0
Complete …

I’ll reboot now and see if I can get the panel setup and running.


Something is going on with NodeJS and NPM.

First, NodeJS is no longer installing NPM as it is set up to do. I had to install it in the scrijpt. Now NPM is having issues with installing dependencies. I’m not sure what is going on but hopefully the care takers at NPM will get these issues fixed soon.


I tried manually running the NPM install script afterwards and still couldn’t get a connection to the web server. I’ll try again later when I have a chance.


What NPM install script?


Not NPM, I meant these two:
wget -qO - | sudo -E bash -
sudo apt-get install -qy nodejs

I then reran the full install script and didn’t see the same errors.


Yes. That’s another strange issue. I have been unable to find an answer to these issues.


Hi. I also get the same errors with a fresh new Pi received today. Any help with getting around it to get archivesw running? I can’t seem to access the local HTML address to finish off the install


I ended up running the script several times and that eventually caused NPM to set everything correctly. I’ll be testing again tomorrow.


Hi @thomasjanus If you are using NOOBS to setup the RPi then this is what I did to get it to work for me the first time:

pi@raspberrypi:~ crontab -e pi@raspberrypi:~ sudo apt-get update
pi@raspberrypi:~ $ sudo apt-get dist-upgrade

(the previous two lines were run 3 times with no updates)
Then from I ran:

pi@raspberrypi:~ wget -qO - | sudo -E bash - pi@raspberrypi:~ sudo apt-get install -qy nodejs
pi@raspberrypi:~ $ node -v

Finally I ran the original install script:

pi@raspberrypi:~ $ bash -e <(wget -qO -

This seemed to work but I haven’t had a chance to test it again since the NPM errors showed up. @GaryFunk did get the first part of the script working where it will exit after telling you to run crontab -e if necessary. He might have fixed other things too. After he has a chance to test things again I’ll try a fresh install again.


Hi @GaryFunk, I noticed something strange with the Rain & Lightning section and have a request for the Solar section. This is from station 5080.

I noticed that the panel showed it was raining after the 60 second interval from Sky was up even though I received the Rain notice on my phone about 40 seconds earlier. I assume that part is normal. What wasn’t normal is that soon after the Rain displayed 0.001 in, that it went to trace. A short while later it went to none. It then went back to raining and was well over 0.001 in when it again went to trace. I loaded the ArchiveSW about page and saw that Archive and Panel had updates so I ran UpdateFiles and then AlterTables. This didn’t seem to fix the display so I rebooted the RPi just to force everything to start up again. I then observed that the rain amount in the circle has been bouncing between 0.001 in and 0.002 in even though the info for 1 hour and Today continues to increment.

In the Solar panel :grin: I would like to see what the previous day’s information was until it is updated for the current day. Maybe change the color of the text to red when it is from the previous day. When First Light occurs then write the new time in yellow and when last light occurs write that and of course Total light in yellow.



It just went back to None. Is the informaiton in the middle a rate? Also, I assume that the number in the parenthesis is the number of minutes it rained in the indicated time period?



The information in the circle is the amount of rain in the previous 60 seconds. The lower figure is the distance of the strike in the last 60 seconds.

On the left, 60 minutes, it is the amount of rain and the number of reports of rain.

Today is the amount of rain and the number of events. .

The Last is the last minute rain was reported.


I will put this on the list of enhancements.


I did a search but couldn’t find anything on what to use to display the panel on the 7" RPi display. Right now I have the RPi booting up into the Raspbian GUI and opening a window to the panel with Chromium. That works great on a large display but will be a bit cramped on 800x480. I have a 7" display showing up in a couple of days and want to get the rest of my RV station setup.