question

benjiboy avatar image
benjiboy asked

VenusGX, BMV-712, MPPT SmartSolar and linux server monitoring

Hi,

there it is, quickly, my installation.
I have scientific measurement station on the field, basically composed of a digitizer group of device and telecommunication group of device.
The two groups are independently discharging, but simultaneously reloaded, like this :

Solar panels
MPPT smart solar 75|15
ArgoFET 100
BatteryPack1, and Battery Pack2

On the load (the devices) of each battery pack, there is a battery protect.

Between each load / battery pack, there is a BMV-712.

And there is a venus GX that monitoring the MPPT (connected via USB), and the two BMV-712 (connected via ve.direct).
All is very clear on VRM website, correctly recognized and graphs are splendid ... it's perfect.

But in our research team have almost 150 stations to watch, and we have already a specific monitoring OS on a dedicated server. So I have to retrieve all the values collected by VRM and get in shape that my server can understand.
So, I looked in SSH on the Venus and find in this path something looklike the value : /vat/log/vedirect.tty[X].
Where [X] is O2, O4 and USB0 (careful, this is maj letter O for the two first and the 0 number on the USB... fun)
I recognized some syntaxe (because I've already realize a bash scrit that sort a MPPT USB connexion to have the voltage and current values, on another installation, smaller)

But it seem that the files we can find inside have generic name and are not the complete log. It seem that sometime they are generated and erased (maybe when tansmitted to VRM?).
And, the value inside don't have any datation.

Somebody have already work on it ?

Sorry for my english.


Thanks,
bye.

Venus GX - VGX
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

wkirby avatar image wkirby ♦♦ commented ·

That sounds like an interesting project.
What packages does your monitoring server use for monitoring services?

It will be best for this to be in the modifications area, so I will move it there.

0 Likes 0 ·
8 Answers
benjiboy avatar image
benjiboy answered ·

Hi everyone,

OK I made a little code in bash to get values from VRM API of a field installation using "curl" command, that's working so far. One data file by request :

- solar panels voltage & amps,

- regulated voltage & amps,

- batteries pack1 voltage & consumption (of the scientific devices).

- batteries pack2 voltage & consumption (of the communication devices).

I made some gnuplot graph to test it (labels in french).


Now I have to make another little program to use it in our monitoring soft NagiOS, but it's another story ..

If someone is interested to get the code, please contact me.

Thanks for help,

bye.


victron.png (614.4 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

benjiboy avatar image
benjiboy answered ·

Hi,

yeah probably better in modification section.

We use NagiOS, we make plugin to integrate different kind of statement.

But what package precisely, can tell you, this server monitor tons of things (data flux, other server, routine, ...) among our stations state of health.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Guy Stewart (Victron Community Manager) avatar image
Guy Stewart (Victron Community Manager) answered ·

Given that you already have the internet connection, have you looked into seeing if the VRM API can help bridge the services?

https://docs.victronenergy.com/vrmapi/overview.html

There are limitations though for this application, explained in the design considerations section.

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

benjiboy avatar image benjiboy commented ·

Hello, I try to use the API and I realize that I don't know how to send a request ... I though use my browser but I don't understand how to send my loggin to generate my token.

0 Likes 0 ·
benjiboy avatar image benjiboy benjiboy commented ·

I figured it out, I have to create JSON POST request in curl. Well, curl is new for me but I'm sure I will be able to make something with this. There are a lot of help on the web.

Let's do some code ... ;)

0 Likes 0 ·
benjiboy avatar image
benjiboy answered ·

Thanks Guy,


hum ... "2. To replicate the data into your own backend". The second case, precisely the one that's API doesn't work for, seem pretty similar of what I'm looking for, isn't it ? Or I maybe read it to fast.


But I also read "Or change the URL of the existing data-transmission system on the GX device to your own URL" : where can I find this path in the GX ? Just to try, but it's too bad if I lost update function and original VRM, because it's very convenient !

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

acs avatar image
acs answered ·

Is this NagiOS you are referring to the "free and open-source computer-software application that monitors systems, networks and infrastructure. Nagios offers monitoring and alerting services for servers, switches, applications and services. Now known as Nagios Core"?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

benjiboy avatar image
benjiboy answered ·

That one yes.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

acs avatar image acs commented ·

I presume this answer is for the nagios question. Have you looked at Node-RED? You can use the "Modbus TCP" node to read the data from the GX and then use the "Nagios NSCA Send" node to send the data to Nagios. I am using the "Modbus TCP" node to read data from the GX but have never used the "Nagios NSCA Send" node.

0 Likes 0 ·
jeroen avatar image
jeroen answered ·

The /var/log/vedirect* files are logfiles, they only contain debug output. /opt/victronenergy/vrmlogger is the process responsible for uploading the data. It is python and the source is on the target as well. Be aware that any changes you make are undone after an update, beside /data and the home of the root user.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

benjiboy avatar image
benjiboy answered ·

Ok thanks. I'm reading the python codes, I'm not expert at all but it seem like we can make some changes ... But it will take time, and like I said, I'm not python expert at all ...

Well, I continue to search in this way, but if anybody have a better way, please let me know ;-)

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.