ArchiveSW - Display & Data Archive Storage

Piece of Pi.

1 Like

Might test it in the hope not to blow the whole stuff :slight_smile: gotta remember the db logins lol

2 Likes

Or add a user with limited (read only) access :wink:
Might solve both issues. :smile:

2 Likes

true but need root access to mysql to add the user, hence why I need to find those logins again :face_with_hand_over_mouth:

2 Likes

Grafana is beyond the scope of ArchiveSW, however I will add support to the built in web server and create pages where needed.

Someone with Grafana experience will need to tell me what is needed.

1 Like

If you didn’t change the default setup, the login is root and no password needed. It only requires that you do so from the RPI as it’s limited to a local login only.

1 Like

already get past bloody upgrade of the system … the more they go the less it is easy … can’t they keep it simple as it was … :pleading_face:

3 Likes

installing grafana was very quick via apt-get (in my case ubuntu server)
and as mentioned by Gary, just link to the database after making a new user with select priviledge

Example:

CREATE USER ā€˜grafanaReader’ IDENTIFIED BY ā€˜password’;
GRANT SELECT ON mydatabase.mytable TO ā€˜grafanaReader’;

now learn grafana and see what I can get out of all that data

3 Likes

I can create an install script that will make it super simple. And I can add it to the ArchiveSW install script to add a grafana user to MariaDB.

1 Like

basically it is

  1. install grafana (dependecies etc) described here

  2. add a user that only has select option as to avoid it messing the data

user has to log in grafana and link database and from there on it is play and learn

2 Likes

Links to graphs can be added to the Display to allow for interactive viewing. And a page on the Server can be created to display the graphs created.

2 Likes

Am not yet there :slight_smile: but would be nice

2 Likes

What is the best / safest way to shut down for a reboot?

1 Like

Stop all processes. Stop Archive first and Server last.

Is there a particular process you want to do? I could easily add a command to shutdown ArchiceSW with an option to reboot the RPi.

I could add this to the Process page in about 5 minutes.

3 Likes

I had a power glitch for a couple seconds and now the high/lows aren’t updating. Thought I’d do a reboot and see if that fixed it and just wanted to make sure I was doing it correctly. A reboot link in the Server Panel would be handy.

What I do notice is a lot of offline/online entries in the Alert log for both the Air and Sky. I have the hub located within 30’ of them so not sure what that is about or if that is somewhat normal.

1 Like

During the glitch did the RPi lose power? It could be a database error if a table became damaged.

Shutdown the processes and reboot. Then check the logs.

Yes, lost power. I really need to suck it up and get a backup PS for it. With the rainy season just around the corner it’s not uncommon to have power ā€œblinksā€ during thunderstorms.

After the reboot the highs/lows aren’t updating, they pull a number from what appears to be about an hour ago. I also see the counters next to the batteries are not incrementing.

The errors I see in the logs after a reboot are

panel.err
(node:1075) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated

archive.err
(node:1146) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated

alert.log
2019-05-27 09:33:05 Caught interrupt signal: 3
2019-05-27 09:33:05 onExit: 3
2019-05-27 09:33:05 Closed timers
2019-05-27 09:33:05 Closed TCP
2019-05-27 09:33:05 TCP client has disconnected with code: 3

2019-05-27 09:17:30 Starting Alert v1.7.14.037
2019-05-27 09:17:30 TCP client active on: 127.0.0.1:54386 to 127.0.0.1:9090
2019-05-27 09:34:42 ==> RPi Rebooted
2019-05-27 09:34:42 ==> piReboot
2019-05-27 09:42:31 ==> Offline AR-00007198
2019-05-27 09:42:31 ==> deviceOffline
2019-05-27 09:45:31 ==> Offline SK-00004877
2019-05-27 09:45:31 ==> deviceOffline
2019-05-27 09:45:31 ==> Offline AR-00009177
2019-05-27 09:45:31 ==> deviceOffline
2019-05-27 09:45:32 ==> Online SK-00004877
2019-05-27 09:45:32 ==> deviceOnline
2019-05-27 09:45:33 ==> Online AR-00009177
2019-05-27 09:45:33 ==> deviceOnline
2019-05-27 09:46:08 ==> Online AR-00007198
2019-05-27 09:46:08 ==> deviceOnline

archive.log
2019-05-27 09:34:31 Starting Archive v1.8.16.111
2019-05-27 09:34:32 TCP client active on: 127.0.0.1:54396 to 127.0.0.1:9090
2019-05-27 09:34:41 appRestart : :
2019-05-27 09:34:42 piReboot : :
2019-05-27 09:42:31 deviceOffline : AR-00007198 :
2019-05-27 09:45:31 deviceOffline : SK-00004877 :
2019-05-27 09:45:31 deviceOffline : AR-00009177 :
2019-05-27 09:45:32 deviceOnline : SK-00004877 :
2019-05-27 09:45:33 deviceOnline : AR-00009177 :
2019-05-27 09:46:08 deviceOnline : AR-00007198 :

server.log
2019-05-27 09:17:28 Starting Server v1.8.16.042
2019-05-27 09:17:28 Listening to HTTP on: localhost:8080
2019-05-27 09:17:28 Listening to TCP on: localhost:9090
2019-05-27 09:17:30 TCP server connection: 54386
2019-05-27 09:17:33 TCP server connection: 54390
2019-05-27 09:34:32 TCP server connection: 54396
2019-05-27 09:34:41 Wrote event.json
2019-05-27 09:34:42 Wrote event.json
2019-05-27 09:42:31 Wrote event.json
2019-05-27 09:45:31 Wrote event.json
2019-05-27 09:45:31 Wrote event.json
2019-05-27 09:45:32 Wrote event.json
2019-05-27 09:45:33 Wrote event.json
2019-05-27 09:46:08 Wrote event.json
2019-05-27 09:54:31 Wrote event.json
(note: I do see the following once in awhile 2019-05-27 06:43:55 Error running sudo systemctl restart hostapd)

start.log
2019-05-27 09:17:07 Starting Start v1.8.16.006
2019-05-27 09:17:23 Starting ArchivSW Server
2019-05-27 09:17:28 Starting ArchivSW Alert
2019-05-27 09:17:31 Starting ArchivSW Panel
2019-05-27 09:34:25 Starting ArchivSW Piio
2019-05-27 09:34:29 Starting ArchivSW Archive

1 Like

Everything looks good. I’ll add a shutdown and push out new files tonight

Oh yes. That’s was a fix I added for my station and I need to finish it. Thanks for the report.

1 Like

Why aren’t the highs/lows updating?

1 Like

Ah, I see what you mean.

Delete all the log files, restart Archive and see what shows up in the log files.