ArchiveSW - Display & Data Archive Storage

You can only use Piio if you are on a Raspberry Pi.
The PM2 files are controlled by ecosystem.config.js

Only the files listed there will be started

You can run any other files starting them on the command line.

node alert

will start alert but it will only run while the terminal window it open.

1 Like

@eric
Capture

manual update or is the auto update supposed to go pick it up ?

I’m far from that

45

1 Like

The automatic update will get all new updates.

You can force it now by running in a terminal window

node updatefiles

I let it do for now, see if it updates alone, in cae it didn’t by tomorrow I’ll do a manual update. Got to test it one day :wink:

1 Like

@GaryFunk Nice to see the updates … I’m following with interest and will try and do the updates in a few days. Thanks for all your efforts

1 Like

WFArchive now supports CWOP as an option.

I will be working on a configuration page to add and remove items from the PM2 config file.

@eric You will notice an additional section on Process Management.

I an adding a method to add and remove processes from PM2. You will no longer have to manually edit the file.

Hello Gary

finally back with time as yesterday evening was … messy with network. But that’s another story

Anyway, the script has not updated since 2 days… could it be the cron isn’t working ?I have it root level since all your files are owner by root …

will not yet run a manual update in case you would advice me something …

1 Like

That’s strange. They should be owned by the user that you logged in under when you ran the install script.

Run: node updatefiles and see if you get updates.

I can change ownership to the logged in user but that user has no write clearance so I need to sudo each command if it wants to write on disk, hence why it ended as root

see what happens when I run your command as user

node updatefiles
(node:12394) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, open '/home/wfarchive/version.json'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.writeFileSync (fs.js:1299:33)
    at writeV (/home/wfarchive/util.js:38:5)
    at <anonymous>
(node:12394) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12394) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
{ Error: EACCES: permission denied, open '/home/wfarchive/log/files.log'
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/home/wfarchive/log/files.log' }

if I run it as root, no problem.

1 Like

There is something terribly wrong in your setup. There us no need to run sudo when installing WFArchive.

That is going to cause you huge issues.

all other scripts run normal n that server, librenms, unifi monitor etc, no issues at all and they also needed sudo to install. But from there on, smooth.

Your script is ok, it runs … hence why I used root crontab for the crons but seems not to run, let me run manually the update as root

nothing in terminal to see, did a pm2 restart all but soething broke according server.err

TypeError: /home/wfarchive/views/config.ejs:195
    193| 	    <div class="f_1"></div>
    194| 	    <div class="f_2"><label for="station_latitude">Latitude: </label></div>
 >> 195| 	    <div class="f_3"><input id="station_latitude" type="text" name="station_latitude" size="20" value="<%=configTemp.station.latitude%>"></div>
    196| 	    <div class="f_e"></div>
    197| 	    <div class="f_0"></div>
    198| 	    <div class="f_1"></div>

Cannot read property 'latitude' of undefined
    at eval (eval at compile (/home/wfarchive/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:175:44)
    at returnedFn (/home/wfarchive/node_modules/ejs/lib/ejs.js:653:17)
    at tryHandleCache (/home/wfarchive/node_modules/ejs/lib/ejs.js:251:36)
    at View.exports.renderFile [as engine] (/home/wfarchive/node_modules/ejs/lib/ejs.js:482:10)
    at View.render (/home/wfarchive/node_modules/express/lib/view.js:135:8)
    at tryRender (/home/wfarchive/node_modules/express/lib/application.js:640:10)
    at Function.render (/home/wfarchive/node_modules/express/lib/application.js:592:3)
    at ServerResponse.render (/home/wfarchive/node_modules/express/lib/response.js:1008:7)
    at /home/wfarchive/server.js:128:6
    at Layer.handle [as handle_request] (/home/wfarchive/node_modules/express/lib/router/layer.js:95:5)

seems something new that needs config but the config tab gives above showed error

1 Like

It looks like server.js did not get updated and restarted.

And it looks like I failed to trap that error.

If anyone thinks their database schema may be out of sync with the latest changes, I have an application that will bring it up-to-date.

It creates a temporary database, compares your database with the temp one, and then makes any change to your database.

Now more trying to keep up with the changes.

The only thing it won’t do is create new tables. createtables.js will do that for you without harm to your current database.

1 Like

Gary,
Hi there.

Can I run WFArchive at the same time as Peters WeatherFlow PyConsole?
I would guess yes but just wanted to clarify that.

And one more.
Once I have some data stored on the RPi, what is the best way to move or use that data on a Windows PC?

Thanks,
Mark.

1 Like

Yea, you can run both.

The next feature I will add is the ability to query WFArcive for the data stored. I just don’t know what that looks like.

Let me know what you are looking for.

2 Likes

Thx for info, I will wait to see the query features.
I hope to get WFArchive installed later this week.

1 Like

Give me an idea what date you are looking for and how you want it exported.

I am building an application for my use that lets a device request a webpage and get the current weather returned in JSON. I use it to control the irrigation system.

Thanks Gary.
I will be setting up another RPi with WF Py Console for someone else and was looking at WF Archive to get and store all the data. He asked if I could get the data moved from RPi to the PC for analysis and such. Perhaps this can be done already or maybe I could open and query the database stored on the RPi via Windows that would work too.

1 Like