question

jbt77 avatar image
jbt77 asked

Reset log daily in Venus GX

Hello,

i use MQTT from Venus GX to show a lot of datas in Grafana but i have an issue for one of them.

The topic N/serialNo/vebus/#

and for example this one :

N/serialNo/vebus/261/Energy/OutToInverter

There is no reset each day on this value, so it's difficult to get the total consumption of the day.

I found that the restart of the venus reset this values.

But is there a better way maybe in command line to reset this logs daily please ?

Thanks for your advise.

Venus GX - VGXMQTT
2 |3000

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

1 Answer
jbt77 avatar image
jbt77 answered ·

I found a way (but not really clean) to have the counters at 0 each day.

I just add a line to the Venus GX crontab to reboot at midnight.


#reboot everay day at 00:00
00 22 * * * root /data/rebootatmidnight.sh

Here is the content of the rebootatmidnight.sh file :

root@beaglebone:/data# cat rebootatmidnight.sh
#!/bin/bash


cd /sbin
reboot

There is 2 hours of lag due to the time zone of the Venus GX here it's 22 p.m for midnight in my home location.

I still waiting for a better solution, for example just restart a service or reset a log file to do the same thing.

I saw the log reset is possible for the generator option. Maybe it will be the same for the main consumption logs.


2 |3000

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