https://github.com/gogvale/solar_panel_stats
Check solar panel power generation by hour, week and month.
https://github.com/gogvale/solar_panel_stats
chart chartkick figaro groupdate httparty iot rails rails7 raspberry-pi ruby ruby-on-rails solar-panel sqlite3 whenever
Last synced: 3 months ago
JSON representation
Check solar panel power generation by hour, week and month.
- Host: GitHub
- URL: https://github.com/gogvale/solar_panel_stats
- Owner: gogvale
- License: cc0-1.0
- Created: 2022-04-27T19:36:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-29T17:28:03.000Z (about 4 years ago)
- Last Synced: 2025-04-07T09:43:00.645Z (about 1 year ago)
- Topics: chart, chartkick, figaro, groupdate, httparty, iot, rails, rails7, raspberry-pi, ruby, ruby-on-rails, solar-panel, sqlite3, whenever
- Language: Ruby
- Homepage:
- Size: 49.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Solar Panel Stats
Check solar panel power generation by hour, week and month.
## Hardware

## 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:
```sh
$ rails db:setup
```
3. Modify `config/application.yml` with the following info:
```yml
development:
solar_panel_address: /status.html
solar_panel_username:
solar_panel_password:
```
4. Run the following command to add cronjobs:
```sh
$ whenever --update-crontab
```
5. If necessary, modify the crontab with `crontab -e` in order to enable `root` to run the rails app, mine is as following:
```crontab
# 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
```
6. Debugging done with `postfix`, restart Raspberry for starting the server by the cronjob
## Screens
Dashboard

Collected data

Solar Panel Interface Stats
