ArchiveSW - Display & Data Archive Storage

Well…

So, I found an issue with archive.js and see where it was adding a duplicate record for each Hub and Device on startup.

I have added indexes to prevent duplicate record and I store any duplicate record in a table. I will run this for 24 hours and see if I in-fact capture any duplicates.

2 Likes

Nice work! Now I am wondering what the circumstances were around my duplicate packet observation.

1 Like

It may very well be a different issue. The errors I found caused duplicates i DeviceStatus and HubStatus.

I suggest you download create-database-tables.js and archive.js.

Archive or use create-database-tables.js to create a NEW database. Then modify archive.js to use the new database. We are almost done with testing this thing so I’ll start adding a configuration file to make this easier.

If you create a new database, you will need to modify daily-stats.js.

2 Likes

Gary, thanks for sharing that. I am going to try installing this on an Odroid HC1, it’s like a raspberry pi but with a built in sata dock for a 2.5" drive. I’ll post later how it goes.

1 Like

Hope your install goes well. WFArchiver is a powerful tool for working with your WF data and for diagnostic work. I use it every day.

1 Like

Hello Gary, thank you very much for the tool. I’ve installed it … learning a bit about RPi and maria SQL along the way. I’ve gots data, and am able to query it, however I’m getting an error every 10 min like
2018-07-13 15:35:23 Error in insertHubStatus
The table is there in the database and most other tables are being updated with data,
but there’s nothing in HubEvents. So:
MariaDB [weatherflow]> select * from HubEvents;
/gives me/ Empty set (0.00 sec)
I’d appreciate any clues you can quickly suggest of where I might start looking.
Thanks. Wayne

1 Like

There was an error in the code and its since been corrected.

I’ll be releasing two new files tomorrow. A new archive.js that removes and adds new parameters and a new file to make necessary database changes.

I’ll post here when they are ready.

3 Likes

Two new files are ready.

sudo wget -N http://fsoft.com/wfarchiver/alter-tables4.js
sudo wget -N http://fsoft.com/wfarchiver/archive.js

Run Node alter-tables4.js

Then restart forever or reload archive.js depending on how you set your system.

@dan.gealt @tepahu

3 Likes

Thanks Gary! Will update and restart this evening.

1 Like

Depending on the amount data the alter script may take a while to run.

2 Likes

Thank you Gary. Most appreciated.

1 Like

Everything working well since last evening with WFArchiver. Having a new set of issues with a field test Hub and, as usual, I can query the WFArchiver data to pull out the diagnostic info I am looking for. A great tool, thanks!

1 Like

I am working on code to allow you to save configuration options. No more changing the code to set the database derails.

2 Likes

There will be a new archive.js and alter-tables5.js soon. Changes are necessary do to unannounced changes in the Hub firmware.

@dsj Please, Please, Please publish changes when they are made.

2 Likes

Thanks Gary! Once a person uses WFArchiver it is hard to go a day without it.

1 Like

I had to develop a method to keep track of firmware updates. I consider this an important bit of information to know especially if an issue arises after the update.

2 Likes

Two new files are ready.

sudo wget -N http://fsoft.com/wfarchiver/alter-tables5.js
sudo wget -N http://fsoft.com/wfarchiver/archive.js

Run Node alter-tables5.js

Then restart forever or reload archive.js depending on how you set your system.

@dan.gealt @tepahu

2 Likes

I’ve had several people ask me about adding notifications. If the application did send notifications what do you want to know and how do you want to be notified?

Hi Gary,

Interesting idea, but I worry about how much user support work that makes for you. Maybe in WfArchiver-Pro :thinking:

My own interest is more about things that have stopped happening rather than things that have started happening. But I could see someone wanting temperature or precip notification that could be used to turn on or off devices like heaters, etc.

Dan.

1 Like

I’m thinking more on the lines of non-weather related items.

Battery voltage low.
Battery replacement now.
No data received from a module after X minutes.
Loss of UDP data from hub.
Sensor failure after x consecutive times.
Firmware updated.

2 Likes