{"id":13620727,"url":"https://github.com/JPHutchins/open-energy-view","last_synced_at":"2025-04-14T22:32:15.178Z","repository":{"id":39838195,"uuid":"205982933","full_name":"JPHutchins/open-energy-view","owner":"JPHutchins","description":"View resource consumption trends, history, analysis, and insights.","archived":true,"fork":false,"pushed_at":"2023-03-05T07:55:01.000Z","size":40904,"stargazers_count":78,"open_issues_count":37,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-10T05:38:16.768Z","etag":null,"topics":["climate-change","electricity","electricity-consumption","electricity-consumption-analysis","electricity-consumption-forecasting","electricity-meter","energy","energy-consumption","energy-data","energy-monitor","home-automation","iot"],"latest_commit_sha":null,"homepage":"https://www.openenergyview.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JPHutchins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-09-03T03:37:49.000Z","updated_at":"2025-03-19T03:45:52.000Z","dependencies_parsed_at":"2023-09-21T19:47:22.202Z","dependency_job_id":null,"html_url":"https://github.com/JPHutchins/open-energy-view","commit_stats":{"total_commits":837,"total_committers":3,"mean_commits":279.0,"dds":"0.032258064516129004","last_synced_commit":"e4410b403dcea97081b86dd9bfed1ad977afbfce"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPHutchins%2Fopen-energy-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPHutchins%2Fopen-energy-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPHutchins%2Fopen-energy-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JPHutchins%2Fopen-energy-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JPHutchins","download_url":"https://codeload.github.com/JPHutchins/open-energy-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351383,"owners_count":21089271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["climate-change","electricity","electricity-consumption","electricity-consumption-analysis","electricity-consumption-forecasting","electricity-meter","energy","energy-consumption","energy-data","energy-monitor","home-automation","iot"],"created_at":"2024-08-01T21:00:58.867Z","updated_at":"2025-04-14T22:32:15.156Z","avatar_url":"https://github.com/JPHutchins.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Energy Systems"],"sub_categories":["Building Energy Monitoring"],"readme":"# Open Energy View\n\nThe goal of this project is to analyze and present resource consumption data to users empowering them to conserve and save money. \n\n## Open Beta!\n\nhttps://www.openenergyview.com\n\nIf you are a PG\u0026E customer you can link your account now!  If you are not a PG\u0026E customer you can try the demo and talk to J.P. about integrating your utility.\n\n## User Interface\n\n![Interface](/docs/open-energy-view-dashboard.PNG)\n\n## Design\n\n![Design](/docs/PGESMD_sketch_full.png)\n\n# Development\n\n## Environment Setup (Ubuntu 20.04)\n\nProcess notes here: https://github.com/JPHutchins/open-energy-view/issues/31\n\nThe following notes are for setting up the environment with a Windows 10 host and Ubuntu 20.04 on WSL2.  Please submit a PR if you find necessary adaptations on your environment.\n\nPersonally I use VSCode from the Windows host utilizing the \"Remote - SSH\" and \"Remote - WSL\" extensions.\n\n### Clone this repository\n```\ngit clone git@github.com:JPHutchins/open-energy-view.git\ncd open-energy-view\n```\n### Install backend dependencies\n* **Install python requirements**\n\n  Note: check your python3 version\n  ```\n  sudo apt install python3.8-venv build-essential python3-dev\n  ```\n* **Create the virtual environment and install packages**\n  ```\n  python3 -m venv venv\n  source venv/bin/activate\n  pip3 install -r requirements.txt\n  ```\n* **Install and configure rabbitmq**\n  * Install erlang:\n    ```\n    sudo apt update\n    sudo apt install software-properties-common apt-transport-https\n    wget -O- https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | sudo apt-key add -\n    echo \"deb https://packages.erlang-solutions.com/ubuntu focal contrib\" | sudo tee /etc/apt/sources.list.d/rabbitmq.list\n    sudo apt update\n    sudo apt install erlang\n    ```\n  * Install rabbitmq\n    ```\n    curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | sudo bash\n    sudo apt install rabbitmq-server\n  * Start rabbitmq-server\n    ```\n    sudo service rabbitmq-server start\n    ```\n  * Verify that rabbitmq-server is running\n    ```\n    sudo service rabbitmq-server status\n    ```\n  * Configure rabbitmq\n    ```\n    sudo rabbitmqctl add_user jp admin\n    sudo rabbitmqctl set_user_tags jp administrator\n    sudo rabbitmqctl add_vhost myvhost\n    sudo rabbitmqctl set_permissions -p myvhost jp \".*\" \".*\" \".*\"\n    ```\n\n### Install frontend dependencies and build\n* **Install nvm** (if you don't have it)\n\n  notes: https://github.com/nvm-sh/nvm\n  ```\n  curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash\n  ```\n* **Install npm**\n  ```\n  nvm install 10.19.0\n  ```\n* **Install frontend packages**\n  ```\n  cd open_energy_view/frontend\n  nvm use 10\n  npm install\n  ```\n* **Build frontend**\n  \n  Assumes you are at path: `*/open-energy-view/open_energy_view/frontend`\n  ```\n  nvm use 10\n  npm run build\n  ```\n\n### Run the development server and workers\n* **Start the server and workers**\n  * Open four terminals (example from VSCode)\n\n  ![Four-Terminals](/docs/four-terminals.png)\n  * First terminal: `./run-wsgi-dev`\n  * Second terminal: `./run-io-worker`\n  * Third terminal: `./run-cpu-worker`\n* **Open the development site in a browser**\n  * Fourth terminal: `ip a`\n  * Note the IP address of your WSL2 instance, in this case `172.31.30.203`\n\n  ![ip-a](/docs/ip-a.png)\n  * On your host OS, open a Chrome or Firefox web browser and navigate to `http://\u003cYOUR_WSL2_IP\u003e:5000`\n\n  ![browser-address](/docs/browser-address.png)\n\n### Example account setup\nFor first time setup you must register a user to your local database. Use something easily memorable and keep in mind that you can register as many users as you need while testing.\n* Click \"Register now!\"\n  * For email use: `dev@dev.com`\n  * For password use: `admin`\n* You are prompted to add energy sources. This is local development so there would be no way to add a real PGE account here. In the dropdown select \"Fake Utility\" and click \"Authorize\".\n* You are prompted to name the fake energy source. Enter `dev`, for example, then click \"Add Source\".\n\nAfter simulating API calls and parsing the retrieved ESPI data (J.P.'s old data) you will be greeted with an OEV instance that will respond to changes in your local Python/Flask/Celery backend and React frontend.\n\n## Data Analysis\n\n### Averages\nData is presented always by Watt hour (Wh).  This is so that the user can compare different time intervals to one another.  It is not meaningful to compare 630,000 Watts consumed in the month of June to 30,000 Watts consumed last Tuesday.  Rather, we would like to understand the intensity of usage (average) of different time intervals. Usefully, we can see that the average 1,250 Watt hours consumed last Tuesday is higher than the average 875 Watt hours consumed during June.\n\n### Partitions\nA partition is a time interval that recurs each day.  The default partitions are:\n- Night: 12AM -\u003e 7AM\n- Day: 7AM -\u003e 6PM\n- Evening: 6PM -\u003e 12AM\n\nThese partitions allow the user to develop conclusions about what activities are using the most resources.\n\n### Passive Consumption\nPassive consumption is the amount of a resource a building will use even when no person is actively utilizing the energy.  This is calculated statistically using a rolling mean and rolling standard deviation.  This passive consumption metric can account for an outsized amount of electricity utilized in a building since it is by definition always consuming energy.\n\nPresentation of this very useful metric allows users to understand the impact of passive appliances on their resource consumption as well as empowers them to find and disable devices that they do not need 24/7.\n\n#### Activies Pie Chart\nThe activities pie chart shows the user how much power each activity consumed over the current time window.\n\n### Trends\nVarious trends are calculated to give the user realtime feedback on their resource conservation efforts.\n#### Seasonal Trend\nThis tend shows about how much power the user is using during this \"time of the year\" this year vs this \"time of the year\" last year.  The time range is +/- 14 days to attempt to mitigate the impact of statistical outliers like unseasonably hot or cold weather.\n#### Active Use Trend\nThis trend shows the active use trend up to this point.\nExamples of active use:\n- Appliances\n- TVs\n- Computers\n- Lighting\n#### Background (Passive) Trend\nThis trend shows the passive used trend up to this point.\nExamples of passive use:\n- Network Equipment\n- Security Systems\n- HVAC\n- IoT devices\n####\n## Resources\nGreen Button and ESPI\n\nhttps://www.energy.gov/data/green-button\n\nhttps://green-button.github.io/developers/\n\nhttp://www.greenbuttondata.org/\n\nhttps://github.com/GreenButtonAlliance\n\nhttps://github.com/JPHutchins/pgesmd_self_access\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJPHutchins%2Fopen-energy-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJPHutchins%2Fopen-energy-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJPHutchins%2Fopen-energy-view/lists"}