Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request data to csv #1067

Closed
diverbill opened this issue Mar 3, 2024 · 1 comment
Closed

Feature Request data to csv #1067

diverbill opened this issue Mar 3, 2024 · 1 comment
Labels
enhancement request for new features

Comments

@diverbill
Copy link

Hello, I recently had had an error show up on my generator Battery Problem : Alarm Code: 2760. I was asked to monitor 2 things the battery charge level and the charger state. Is there an easy way to do this from the CLI and log it to a csv?

I'm thinking something like
Time,12.7V, Not Charging

have it log it every 30 seconds

I first tried to do a curl command on the page and this did not display correctly.

Thanks for your help!

@jgyates jgyates added the enhancement request for new features label Mar 3, 2024
@jgyates
Copy link
Owner

jgyates commented Mar 3, 2024

The attached python file will do what you are asking. Just redirect the output of the file to the filename you want.

battery.py.txt

  1. Download the file to a system that can run python3 on your local network, this can be the pi that runs genmon or some other system

  2. rename it battery.py instead of battery.py.txt

  3. edit the file to use your IP address of your genmon system

  4. run this command:

    python3 -u battery.py > out.csv
    

This will run the program and output the info to the file out.csv. You can change the filenme in the line above if you want a different file name.

You can type ctrl+c to stop the program

You can monitor the output while it is running with this command:

 tail -f ./out.csv

Let me know if you have any questions.

@jgyates jgyates closed this as completed Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement request for new features
Projects
None yet
Development

No branches or pull requests

2 participants