diff --git a/net-mgmt/py-pypowerwall/Makefile b/net-mgmt/py-pypowerwall/Makefile index a78a6333ee0c..e6630c2a3836 100644 --- a/net-mgmt/py-pypowerwall/Makefile +++ b/net-mgmt/py-pypowerwall/Makefile @@ -1,40 +1,45 @@ PORTNAME= pypowerwall -PORTVERSION= 0.7.12 +PORTVERSION= 0.10.8 DISTVERSIONPREFIX= v CATEGORIES= net-mgmt python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= zi@FreeBSD.org COMMENT= Python interface for Tesla Powerwall and solar power data WWW= https://github.com/jasonacox/pypowerwall LICENSE= MIT BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}beautifulsoup>0:www/py-beautifulsoup@${PY_FLAVOR} \ ${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}beautifulsoup>0:www/py-beautifulsoup@${PY_FLAVOR} \ ${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 shebangfix USE_PYTHON= autoplist distutils SHEBANG_FILES= proxy/server.py proxy/transform.py USE_RC_SUBR= ${PORTNAME}_proxy USE_GITHUB= yes GH_ACCOUNT= jasonacox # disable cloud support for the moment (additional deps needed--teslapy) post-patch: @${REINPLACE_CMD} -E -e '/teslapy/d' ${WRKSRC}/setup.py - @${RM} ${WRKSRC}/pypowerwall/cloud.py - @${TOUCH} ${WRKSRC}/pypowerwall/cloud.py + @${REINPLACE_CMD} -E \ + -e '/PyPowerwallCloud/d' \ + -e '/pypowerwall_cloud/d' \ + ${WRKSRC}/pypowerwall/__main__.py \ + ${WRKSRC}/pypowerwall/__init__.py + @${RM} ${WRKSRC}/pypowerwall/cloud/pypowerwall_cloud.py + @${TOUCH} ${WRKSRC}/pypowerwall/cloud/pypowerwall_cloud.py post-install: @${MKDIR} ${STAGEDIR}${DATADIR} @${RM} ${WRKSRC}/proxy/Dockerfile (cd ${WRKSRC}/proxy && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}) .include diff --git a/net-mgmt/py-pypowerwall/distinfo b/net-mgmt/py-pypowerwall/distinfo index 3e47647f65aa..97217f9bc7ae 100644 --- a/net-mgmt/py-pypowerwall/distinfo +++ b/net-mgmt/py-pypowerwall/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1711718902 -SHA256 (jasonacox-pypowerwall-v0.7.12_GH0.tar.gz) = aafa12ef1ec1e889a01fc25812e3c6c907ef34c6a743ec0c99eb81ea22c50d27 -SIZE (jasonacox-pypowerwall-v0.7.12_GH0.tar.gz) = 2451373 +TIMESTAMP = 1721576944 +SHA256 (jasonacox-pypowerwall-v0.10.8_GH0.tar.gz) = 008971d79f59d1e63598989dfdde6072f95537d03322b061b669b67aa6d45e45 +SIZE (jasonacox-pypowerwall-v0.10.8_GH0.tar.gz) = 2531870 diff --git a/net-mgmt/py-pypowerwall/files/pypowerwall_proxy.in b/net-mgmt/py-pypowerwall/files/pypowerwall_proxy.in index 63a244323f8f..1f4b93b715bc 100644 --- a/net-mgmt/py-pypowerwall/files/pypowerwall_proxy.in +++ b/net-mgmt/py-pypowerwall/files/pypowerwall_proxy.in @@ -1,50 +1,53 @@ #!/bin/sh # PROVIDE: pypowerwall_proxy # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # pypowerwall_proxy_enable (bool): Set to NO by default. # Set it to YES to enable pypowerwall_proxy. # pypowerwall_proxy_user (string): Set user that pypowerwall_proxy will run under # Default is "nobody". # pypowerwall_proxy_listen (string): Set IP that pypowerwall_proxy will listen on # Default is "127.0.0.1". # pypowerwall_proxy_host (string): Set IP that pypowerwall_proxy will connect to # Default is "127.0.0.1". # pypowerwall_proxy_port (string): Set port that pypowerwall_proxy listen on # Default is "8675". # pypowerwall_proxy_email (string): Set email that pypowerwall_proxy use to login # Default is "no@body.com". # pypowerwall_proxy_password (string): Set password that pypowerwall_proxy use to login # Default is "". # pypowerwall_proxy_timezone (string): Set timezone that pypowerwall_proxy will use # Default is "America/New_York". +# pypowerwall_proxy_cachefile (string): Set path to cachefile hat pypowerwall_proxy will use +# Default is "/var/tmp/.pypowerwall_cache". . /etc/rc.subr name=pypowerwall_proxy rcvar=pypowerwall_proxy_enable load_rc_config $name : ${pypowerwall_proxy_enable:="NO"} : ${pypowerwall_proxy_username:="nobody"} : ${pypowerwall_proxy_group:="nobody"} : ${pypowerwall_proxy_listen:="127.0.0.1"} : ${pypowerwall_proxy_host:="127.0.0.1"} : ${pypowerwall_proxy_email:="no@body.com"} : ${pypowerwall_proxy_timezone:="America/New_York"} : ${pypowerwall_proxy_password:=""} : ${pypowerwall_proxy_port:="8675"} +: ${pypowerwall_proxy_cachefile:="/var/tmp/.pypowerwall_cache"} pidfile=/var/run/pypowerwall_proxy.pid command="/usr/sbin/daemon" pypowerwall_proxy_command="%%DATADIR%%/server.py" -command_args="-u ${pypowerwall_proxy_username} -rP ${pidfile} -S -t ${name} -T ${name} /usr/bin/env PW_EMAIL=${pypowerwall_proxy_email} PW_PASSWORD=${pypowerwall_proxy_password} PW_TIMEZONE=${pypowerwall_proxy_timezone} PW_HOST=${pypowerwall_proxy_host} PW_BIND_ADDRESS=${pypowerwall_proxy_listen} PW_PORT=${pypowerwall_proxy_port} ${pypowerwall_proxy_command}" +command_args="-u ${pypowerwall_proxy_username} -rP ${pidfile} -S -t ${name} -T ${name} /usr/bin/env PW_EMAIL=${pypowerwall_proxy_email} PW_PASSWORD=${pypowerwall_proxy_password} PW_TIMEZONE=${pypowerwall_proxy_timezone} PW_HOST=${pypowerwall_proxy_host} PW_BIND_ADDRESS=${pypowerwall_proxy_listen} PW_PORT=${pypowerwall_proxy_port} PW_CACHE_FILE=${pypowerwall_proxy_cachefile} ${pypowerwall_proxy_command}" load_rc_config $name run_rc_command "$1" diff --git a/net-mgmt/py-pypowerwall/pkg-plist b/net-mgmt/py-pypowerwall/pkg-plist index 5b3b395032c7..6d67fbd36fe7 100644 --- a/net-mgmt/py-pypowerwall/pkg-plist +++ b/net-mgmt/py-pypowerwall/pkg-plist @@ -1,80 +1,84 @@ +@comment %%DATADIR%%/beta.txt +@comment %%DATADIR%%/requirements.txt +@comment %%DATADIR%%/upload-beta.sh +@comment %%DATADIR%%/Dockerfile.beta %%DATADIR%%/HELP.md %%DATADIR%%/README.md %%DATADIR%%/RELEASE.md @comment %%DATADIR%%/localhost.pem @mode 555 %%DATADIR%%/server.py @mode %%DATADIR%%/transform.py %%DATADIR%%/web/012955c70685614a5639d326f41890bd.png %%DATADIR%%/web/1.17c71172308436a079d1.js %%DATADIR%%/web/124f233cfa9945f861dcaca7acedd308.otf %%DATADIR%%/web/230aeae00823cd3b622d093948d9c433.png %%DATADIR%%/web/2bf15a1686c7a1bf7b577337a07d7049.otf %%DATADIR%%/web/39.17c71172308436a079d1.js %%DATADIR%%/web/40.17c71172308436a079d1.js %%DATADIR%%/web/448c34a56d699c29117adc64c43affeb.woff2 %%DATADIR%%/web/4e28cc8f2bdf3ba640331daa2c453341.png %%DATADIR%%/web/653969a51632a4df33358a39d7012f79.otf %%DATADIR%%/web/722c5f898bbca8b2eb3fce0287688326.otf %%DATADIR%%/web/86a6894da889a3db781418529403290f.otf %%DATADIR%%/web/89889688147bd7575d6327160d64e760.svg %%DATADIR%%/web/89aec2cc0b804667e95b1adc02e1ac4a.otf %%DATADIR%%/web/LICENSE %%DATADIR%%/web/a3b0d611359e6fa8356cd88aa9035268.otf %%DATADIR%%/web/ac2944015a17576924af7c56d88751cb.otf %%DATADIR%%/web/app.css %%DATADIR%%/web/app.js %%DATADIR%%/web/b8d72cb0ef934ba1fe847c692d9dfed1.otf %%DATADIR%%/web/bceda3fae660177ae570735feec62811.otf %%DATADIR%%/web/befdfda70624c396169873b05de57f8a.otf %%DATADIR%%/web/black.js %%DATADIR%%/web/bogus/api.auth.toggle.supported.json %%DATADIR%%/web/bogus/api.customer.json %%DATADIR%%/web/bogus/api.customer.registration.json %%DATADIR%%/web/bogus/api.installer.json %%DATADIR%%/web/bogus/api.meters.aggregates.json %%DATADIR%%/web/bogus/api.meters.json %%DATADIR%%/web/bogus/api.meters.readings.json %%DATADIR%%/web/bogus/api.meters.site.json %%DATADIR%%/web/bogus/api.meters.solar.json %%DATADIR%%/web/bogus/api.networks.json %%DATADIR%%/web/bogus/api.operation.json %%DATADIR%%/web/bogus/api.powerwalls.json %%DATADIR%%/web/bogus/api.site_info.grid_codes.json %%DATADIR%%/web/bogus/api.site_info.json %%DATADIR%%/web/bogus/api.site_info.site_name.json %%DATADIR%%/web/bogus/api.sitemaster.json %%DATADIR%%/web/bogus/api.solars.brands.json %%DATADIR%%/web/bogus/api.solars.json %%DATADIR%%/web/bogus/api.status.json %%DATADIR%%/web/bogus/api.synchrometer.ct_voltage_references.json %%DATADIR%%/web/bogus/api.system.networks.json %%DATADIR%%/web/bogus/api.system.update.status.json %%DATADIR%%/web/bogus/api.system_status.grid_faults.json %%DATADIR%%/web/bogus/api.system_status.grid_status.json %%DATADIR%%/web/bogus/api.system_status.grid_status.json-offline %%DATADIR%%/web/bogus/api.system_status.grid_status.json-transition %%DATADIR%%/web/bogus/api.system_status.json %%DATADIR%%/web/bogus/api.system_status.soe.json %%DATADIR%%/web/bogus/api.troubleshooting.problems.json %%DATADIR%%/web/box.png %%DATADIR%%/web/cb0da8a8999c06735455bf5056a5cd78.png %%DATADIR%%/web/clear.js %%DATADIR%%/web/d859fee2eba0e67c75c4c92e719d0630.otf %%DATADIR%%/web/dakboard.js %%DATADIR%%/web/e19c20e966bde501f94e41cd0322dbe8.otf %%DATADIR%%/web/ec6b35b07448e1624cb09323b5fb6e32.otf %%DATADIR%%/web/ec89c09b066f57efc7687540c998845b.otf %%DATADIR%%/web/eca1317ee8a99162d0d0e2df77330cec.otf %%DATADIR%%/web/example.html %%DATADIR%%/web/f4769f9bdb7466be65088239c12046d1.eot %%DATADIR%%/web/favicon-16x16.png %%DATADIR%%/web/favicon-32x32.png %%DATADIR%%/web/favicon.ico %%DATADIR%%/web/grafana-dark.js %%DATADIR%%/web/grafana.js %%DATADIR%%/web/index.html %%DATADIR%%/web/solar.js %%DATADIR%%/web/vendor.js %%DATADIR%%/web/white.js