Git Product home page Git Product logo

solar_panel_stats's Introduction

Solar Panel Stats

Check solar panel power generation by hour, week and month.

Hardware

image

Libraries

  • ruby 2.7.4
  • rails 7.0.2
  • sqlite3 1.4
  • httparty 0.20.0
  • figaro 1.2
  • whenever 1.0
  • chartkick 4.1
  • groupdate 6.1

Setup

  1. Clone this repository git clone https://github.com/gogvale/solar_panel_stats/
  2. Inside the project run:
$ rails db:setup
  1. Modify config/application.yml with the following info:
development:
  solar_panel_address: <solar_panel_url>/status.html
  solar_panel_username: <username>
  solar_panel_password: <password>
  1. Run the following command to add cronjobs:
$ whenever --update-crontab
  1. If necessary, modify the crontab with crontab -e in order to enable root to run the rails app, mine is as following:
# m h  dom mon dow   command
@reboot rbenv sudo /home/gogvale/solar_panel/bin/rails s -b 0.0.0.0 -p 80

# Begin Whenever generated tasks for: /home/gogvale/solar_panel/config/schedule.rb at: 2022-04-28 20:51:44 -0500
0,15,30,45 * * * * /bin/bash -l -c 'cd /home/gogvale/solar_panel && rbenv exec rails runner -e development '\''GetPowerGenerationJob.perform_now'\'''

# End Whenever generated tasks for: /home/gogvale/solar_panel/config/schedule.rb at: 2022-04-28 20:51:44 -0500
  1. Debugging done with postfix, restart Raspberry for starting the server by the cronjob

Screens

Dashboard

image

Collected data

telegram-cloud-photo-size-1-5141149710025861611-y

Solar Panel Interface Stats

telegram-cloud-photo-size-1-5141149710025861612-x

solar_panel_stats's People

Contributors

gogvale avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.