Right. You need to call start.js which is in the archivesw folder.
Got it to work. Pretty much a kludge of stuff I found Googling but it runs at startup, which is what I wanted.
NOTE: this only allows the archive/panel/upload features, which is what I currently am using. If you need the features for driving a small display, I donât think this will work for you. You may as well be doing it on a RPi with the small screen, which makes this guide obsolete.
I should write up the steps more formally so someone else can try it. Donât have time to do that right now but Iâll put it on my list.
EDIT: Ok, so I got carried away and wrote up most of the steps. Iâm treating this as more of a guide to myself when I need to do it again. I canât promise much support for what goes wrong if you try it! YMMVâŚ
EDIT2: If there are any Ubuntu/Linux experts out there that see glaring flaws with this method or have any suggestions on edits, Iâm all ears! Iâm not a Linux guru by any stretch of the imagination. Still cutting my teeth. I added some details on the setup and made a few edits to the text.
The basics are as follows:
Load up a fresh version of Ubuntu 18.04. It obviously needs WAN access and also needs to be able to receive the UDP 50222 broadcast (destination 255.255.255.255) packets from the WF hub. Note that these packets are broadcast (not multicast) so packages like Avahi and mDNS donât work. This was quite a challenge for me as I have the WF hub on an IoT subnet, segregated from the rest of my other networks using VLANs. Running pfSense as my router/firewall, I needed to add the âudp-broadcast-relay-reduxâ package to get this to work properly. There are a few dents in my forehead that resulted from all of resulting consternation during this setup. The key lesson was to âkill statesâ in the pfSense firewall, which allowed the broadcast packets to pass. Lest I digressâŚ
This assumes you are logged in as root! It may not be necessary but thatâs the way I did it.
- Create user pi and give it sudo rights (the rights part might not be needed):
adduser pi
usermod -aG sudo pi
- Create this directory: /home/pi/Desktop (Iâm not currently using it and probably donât need it)
- Do all of the updates stuff shown at the start of the instructions for archiveSW:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
- Need to install npm: (do this after the updates but before the npm and n stuff in the first few steps)
sudo apt-get install npm
- Finish the initial prep steps:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
- Run the install script:
bash -e <(wget -qO - http://fsoft.com/archivesw/script/install.sh)
-
The script will stop with a message about crontab. First select 1 (use nano as editor) then do what the script says (Ctrl+O, Enter, Crtl+X) and restart the script. Then run through the script prompts. Keep pi as the username. Donât install the GPIO or one-wire stuff towards the end of the script. My Ubuntu container doesnât have that stuff and this isnât a Raspberry Pi!!
-
create a file /usr/bin/archivestart.sh
(Note that there are some little single accent (looks like French âaccent graveâ) marks that show up in my file text but donât show up here. Not sure how necessary they are. I based some of this on samples from this link. Itâs worth a look: Use systemd to Start a Linux Service at Boot
DATE1=
date '+%Y-%m-%d %H:%M:%S'
echo âArchiveSW service started at ${DATE1}â | systemd-cat -p info
sleep 10 && cd /home/pi/archivesw && pm2 start;while :
do
DATE2=date '+%Y-%m-%d %H:%M:%S'
echo âRunning⌠at ${DATE2}â;
sleep 60;
done
- âŚand make it executable:
sudo chmod +x archivestart.sh
- Create a file /etc/systemd/system/archivestart.service
[Unit]
Description=Example systemd service.
After=syslog.target[Service]
Type=simple
ExecStart=/bin/bash /usr/bin/archivestart.sh
ExecStop=/bin/kill -s QUIT $MAINPID[Install]
WantedBy=multi-user.target
- âŚand make it executable
sudo chmod +x archivestart.service
- OPTIONAL: test out your new service without actually enabling it. These commands functions should be pretty self-explanatory by noting the differences in âstatus/start/stop/restartâ
sudo systemctl start archivestart.service
sudo systemctl stop archivestart.service
sudo systemctl restart archivestart.service
sudo systemctl status archivestart.service
- enable the service:
sudo systemctl enable archivestart.service
- reboot and see if it works
I need to make the installation more generic.
Backfill works for SKY but not for AIR
I installed archivesw on a PI4 with debian buster and the storage and the Panel are working. When I want to save historical-data with
node backfill.js -device nnnn -date m
this works for the SKY-device
2020-05-07 20:18:12 Starting Backfill v1.7.15.013
2020-05-07 20:18:12 Requesting data
2020-05-07 20:18:13 obs_sky
2020-05-07 20:18:13 Records: 1438
but for the AIR I get
node backfill.js -device 7648 -date 1
2020-05-07 20:18:51 Starting Backfill v1.7.15.013
2020-05-07 20:18:51 Requesting data
2020-05-07 20:18:52 undefined skipping
I have made 2 clean installs but it´s always the same. Works with SKY not with AIR.
Can someone help?
Iâll have a look at why itâs not working for you.
What is your Station ID?
My Station ID is 2242.
Do you have more than 1 Air device? The Air I see at your station is 4190.
You donât have an Air device of 7648.
This is the data I used
Station id: 2242
Name: Wasserturm
Latitude: xx
Longitude: yy
Elevation: 71.4639892578
Timezone: Europe/Berlin
Device: HB-00003392
AGL: 0
Device: AR-00007648
AGL: 1.52400001884
Device: SK-00015882
AGL: 4
I have 1 Air and 1 Sky now.
In April I had 2 Sky for 3 weeks, because the first didn't work properly and I got a new one (ID 15882). Then I took the old device offline and the weatherflow staff merged the old Sky-data to the new Sky-device.
But is was Sky not Air.
7648 is the serial number. The device number is 4190.
Sorry, my mistake. That works. Thanks.
So the question now, Are you sure you used the correct device number for your Sky?
The Sky Device ID is 10323.
Both backfill commands are working now with the device-IDs.
But Iâm getting a bit confused. First I took the serial numbers of both
devices and got no results from the Air device, what is correct, but
from the Sky I got results.
Then I took the ID of Air device -> works.
But I get results with the serial-number of the Sky device too!
node backfill.js -device 4190 -date 1 Air ID works
node backfill.js -device 10323 -date 1 Sky ID works
node backfill.js -device 15882 -date 1 Sky serial_number works too
These are the results in the tables:
When you use the Sky serial number you are getting data that belongs to a different station. That is not your data.
So I will begin my sql-experience with deleting wrong data. Thanks again.
For those that are receiving the Tempest, I will have an update soon.
Good to hear because my Archive.log file grows quite large with these lines repeating.
2020-05-16 14:48:44 obs_st skipping
{âserial_numberâ:âST-00000076â,âtypeâ:âobs_stâ,âhub_snâ:âHB-00010251â,âobsâ:[[1589665722,0.00,0.56,1.12,144,3,990.54,15.17,84.77,80304,5.13,669,0.000000,0,0,0,2.542,1]],âfirmware_revisionâ:129}
2020-05-16 14:49:05 obs_st skipping
{âserial_numberâ:âST-00001173â,âtypeâ:âobs_stâ,âhub_snâ:âHB-00010251â,âobsâ:[[1589665743,0.00,0.61,1.25,125,3,990.86,16.18,83.15,77231,4.42,644,0.000000,0,0,0,2.630,1]],âfirmware_revisionâ:129}
Gary - I must miss it, but I keep looking for screenshots. Does your software just sniff+save data, or is there some dashboard etc. that it cooks up? The website and discussions seem to be centered around how to install it. Once thatâs done, then what ?
(if you want to move this to the thread for your software, thatâs of course your call).
It consists of several modules. The first is data collection and storage. The others are alerts, display, access point, configuration and custom modules.
This is a photo of a complete system. It is battery powered and fully self-contained.
Thanks for the screenshot. Got my 10" pi display last night and installed your software this morning without tremendous pain, but the instructions might warrant a bit of tweakingâŚ
- what is âconfigâ and what is it used for ? It doesnât seem to autofill the panel tabâs values.
- do we put in HB-000001234 or 1234 for the device identifiers ?
- it wasnât clear that I had to enable the panel âandâ reenter all the values in it in order to get the display part to work. When I put in the long-form ids the data appeared (cool!)
One question - my time+date bottom middle are blinking. I looked at the logs and see the sky/air seem to have gone offline/online but theyâre back and the data is being displayed. What starts/clears the blinking ?
Ok - two questions - I have a different form factor screen, so in fullscreen I have room for at least one more row of stuff. If I go fiddling around to add more things, is there a way to have those changes not overwritten by a future upgrade ?
(cool display - awaiting Tempest support to switch to that - thanks!)
Hi, in folder BAK I have around 1GB of .json files. Are they used anymore, can I delete all of them in order to save space?