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

Partner files for v1.0 usage service #299

Merged
merged 4 commits into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
usage service initial commit
  • Loading branch information
BuongiornoTexas committed Jun 4, 2023
commit 4d2a82ffc90b29553362464c934c30068c48e4e9
7 changes: 7 additions & 0 deletions tools/usage-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Will try alpine initially. Pandas may require core.
FROM python:3.11-alpine
# WORKDIR /app - Don't think this is needed, as everything comes from pypi
RUN pip3 install --no-cache-dir pwdusage
# COPY . . - or this, as we don't copy any files in.
CMD ["python3", "-m", "pwdusage.server"]
EXPOSE 9050
21 changes: 21 additions & 0 deletions tools/usage-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Powerwall-Dashboard Usage Micro Service

This folder contains the sample setup files for a usage microservice that integrates
into Powerwall-Dashboard. This service provides a proxy that generates usage and
cost/savings information based on utility usage plans. As of 4/6/2023, this service only
supports a general time of use plan, but the service is extensible to different plans.

For documentation on the micro-service, refer to:
https://github.com/BuongiornoTexas/pwdusage.

The files in this folder are:

- `example_usage.json`, a sample configuration file for the microservice, which is a
duplicate of the sample file in the `pwdusage` repository.
- `example-dashboard.json`, a sample grafana dashboard that demonstrates the output of
the usage service with the sample configuration file.
- `Dockerfile` is the docker configuration file used to generate the containerised
microservice from the `pwdusage` python package.

The documentation for `pwdusage` details usage of these files.

Loading