Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gogvale/solar_panel_stats

Repository files navigation

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

AltStyle によって変換されたページ (->オリジナル) /