git: 8284bfddcfd4 - main - net-mgmt/py-pypowerwall: new port

From: Ryan Steinmetz <zi_at_FreeBSD.org>
Date: Sun, 03 Jul 2022 17:06:23 UTC
The branch main has been updated by zi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8284bfddcfd4fee2ce2c9c1b53544915f3346001

commit 8284bfddcfd4fee2ce2c9c1b53544915f3346001
Author:     Ryan Steinmetz <zi@FreeBSD.org>
AuthorDate: 2022-07-03 17:04:17 +0000
Commit:     Ryan Steinmetz <zi@FreeBSD.org>
CommitDate: 2022-07-03 17:05:57 +0000

    net-mgmt/py-pypowerwall: new port
    
    This python module can be used to monitor and control Tesla Energy Powerwalls.
    It uses a single class (Powerwall) and simple functions to fetch energy data
    and poll API endpoints on the Gateway.
    
    pyPowerwall will cache the authentication headers and API call responses to
    help reduce the number of calls made to the Gateway (useful if you are
    polling the Powerwall frequently for trending data).
    
    * Works with Tesla Energy Gateways - Powerwall and Powerwall+
    * Simple access through easy to use functions using customer credentials
    * Will cache authentication to reduce load on Powerwall Gateway
    * Will cache responses to limit number of calls to Powerwall Gateway
    * Easy access to decoded binary device vitals
    * Provides solar string data for Powerwall+ systems
    
    WWW: https://github.com/jasonacox/pypowerwall
---
 net-mgmt/Makefile                 |  1 +
 net-mgmt/py-pypowerwall/Makefile  | 31 +++++++++++++++++++++++++++++++
 net-mgmt/py-pypowerwall/distinfo  |  3 +++
 net-mgmt/py-pypowerwall/pkg-descr | 16 ++++++++++++++++
 4 files changed, 51 insertions(+)

diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile
index b6c14b4eeff2..e555a6d183fd 100644
--- a/net-mgmt/Makefile
+++ b/net-mgmt/Makefile
@@ -322,6 +322,7 @@
     SUBDIR += py-pyeapi
     SUBDIR += py-pynetbox
     SUBDIR += py-pynxos
+    SUBDIR += py-pypowerwall
     SUBDIR += py-pysmi
     SUBDIR += py-pysnmp
     SUBDIR += py-pysnmp-mibs
diff --git a/net-mgmt/py-pypowerwall/Makefile b/net-mgmt/py-pypowerwall/Makefile
new file mode 100644
index 000000000000..4971dd2d7da8
--- /dev/null
+++ b/net-mgmt/py-pypowerwall/Makefile
@@ -0,0 +1,31 @@
+# Created by: Ryan Steinmetz <zi@FreeBSD.org>
+
+PORTNAME=	pypowerwall
+PORTVERSION=	0.4.0
+DISTVERSIONPREFIX=	v
+CATEGORIES=	net-mgmt python
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	zi@FreeBSD.org
+COMMENT=	Python interface for Tesla Powerwall and solar power data
+
+LICENSE=	MIT
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}googleapis-common-protos>0:devel/py-googleapis-common-protos@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}requests>=2.21.0:www/py-requests@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}googleapis-common-protos>0:devel/py-googleapis-common-protos@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}requests>=2.21.0:www/py-requests@${PY_FLAVOR}
+
+USES=		python:3.6+
+USE_PYTHON=	autoplist distutils
+
+PLIST_FILES=	${EXAMPLESDIR}/server.py
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	jasonacox
+
+post-install:
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_SCRIPT} ${WRKSRC}/proxy/server.py ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/py-pypowerwall/distinfo b/net-mgmt/py-pypowerwall/distinfo
new file mode 100644
index 000000000000..0e31bf58a51d
--- /dev/null
+++ b/net-mgmt/py-pypowerwall/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1656865953
+SHA256 (jasonacox-pypowerwall-v0.4.0_GH0.tar.gz) = 08504bbf53c831eaba8bca585a2958ec8226fb6a64e2e95fa145fca471c9237a
+SIZE (jasonacox-pypowerwall-v0.4.0_GH0.tar.gz) = 131316
diff --git a/net-mgmt/py-pypowerwall/pkg-descr b/net-mgmt/py-pypowerwall/pkg-descr
new file mode 100644
index 000000000000..2fe25a75da85
--- /dev/null
+++ b/net-mgmt/py-pypowerwall/pkg-descr
@@ -0,0 +1,16 @@
+This python module can be used to monitor and control Tesla Energy Powerwalls.
+It uses a single class (Powerwall) and simple functions to fetch energy data
+and poll API endpoints on the Gateway.
+
+pyPowerwall will cache the authentication headers and API call responses to
+help reduce the number of calls made to the Gateway (useful if you are
+polling the Powerwall frequently for trending data).
+
+* Works with Tesla Energy Gateways - Powerwall and Powerwall+
+* Simple access through easy to use functions using customer credentials
+* Will cache authentication to reduce load on Powerwall Gateway
+* Will cache responses to limit number of calls to Powerwall Gateway
+* Easy access to decoded binary device vitals
+* Provides solar string data for Powerwall+ systems
+
+WWW: https://github.com/jasonacox/pypowerwall