svn commit: r411138 - in head/misc: . teslams
Bruce A. Mah
bmah at FreeBSD.org
Tue Mar 15 05:17:01 UTC 2016
Author: bmah
Date: Tue Mar 15 05:16:59 2016
New Revision: 411138
URL: https://svnweb.freebsd.org/changeset/ports/411138
Log:
Add teslams, an implementation in Node.js of the client-side interface
to the Tesla Model S API, along with various utilities that exercise
the API.
Added:
head/misc/teslams/
head/misc/teslams/Makefile (contents, props changed)
head/misc/teslams/distinfo (contents, props changed)
head/misc/teslams/pkg-descr (contents, props changed)
head/misc/teslams/pkg-message (contents, props changed)
Modified:
head/misc/Makefile
Modified: head/misc/Makefile
==============================================================================
--- head/misc/Makefile Tue Mar 15 04:08:25 2016 (r411137)
+++ head/misc/Makefile Tue Mar 15 05:16:59 2016 (r411138)
@@ -442,6 +442,7 @@
SUBDIR += termatrix
SUBDIR += terraform
SUBDIR += teseq
+ SUBDIR += teslams
SUBDIR += tkcron
SUBDIR += tkinfo
SUBDIR += tkregexp
Added: head/misc/teslams/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/teslams/Makefile Tue Mar 15 05:16:59 2016 (r411138)
@@ -0,0 +1,45 @@
+# Created by: Bruce A. Mah <bmah at freebsd.org>
+# $FreeBSD$
+
+PORTNAME= teslams
+PORTVERSION= 1.1.4
+CATEGORIES= misc
+
+MAINTAINER= bmah at FreeBSD.org
+COMMENT= Node.js implementation of Tesla Model S API client
+
+# teslams is BSD2CLAUSE but the installation pulls in a bunch
+# of other packages with varying licenses.
+LICENSE= BSD2CLAUSE BSD3CLAUSE APACHE20 MIT ISCL
+LICENSE_COMB= multi
+
+BUILD_DEPENDS= npm>=0:${PORTSDIR}/www/npm
+RUN_DEPENDS= npm>=0:${PORTSDIR}/www/npm
+
+NO_ARCH= yes
+NO_BUILD= yes
+USE_GITHUB= yes
+GH_ACCOUNT= hjespers
+GH_PROJECT= teslams
+GH_TAGNAME= 6f6dfa2
+
+SCRIPTS= chargebar climatemon restla streaming teslacmd teslamap \
+ visualize/visualize
+
+do-install:
+ (cd ${STAGEDIR}${PREFIX}/lib ; ${SETENV} HOME=${WRKDIR} npm install ${WRKSRC})
+ # Link to executable scripts where the user can run them
+.for l in ${SCRIPTS}
+ ${LN} -s ../lib/node_modules/${PORTNAME}/examples/${l}.js ${STAGEDIR}${PREFIX}/bin/`echo ${l} | ${SED} -e 's,.*/,,'`
+.endfor
+
+ # We have to generate the plist dynamically here because the
+ # npm install process pulls in dependencies at port install
+ # time, therefore the exact set of files included in the port
+ # isn't known until we try to install it. Another implication
+ # is that a rebuild of the port may wind up with different versions
+ # of dependencies but still carry the same version number. :-(
+ @(cd ${STAGEDIR}${PREFIX}; ${FIND} -s bin -not -type d) >> ${TMPPLIST}
+ @(cd ${STAGEDIR}${PREFIX}; ${FIND} -s lib/node_modules/${PORTNAME} -not -type d) >> ${TMPPLIST}
+
+.include <bsd.port.mk>
Added: head/misc/teslams/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/teslams/distinfo Tue Mar 15 05:16:59 2016 (r411138)
@@ -0,0 +1,2 @@
+SHA256 (hjespers-teslams-1.1.4-6f6dfa2_GH0.tar.gz) = 9377be75b5507372fa08c48455b28933318afb45fb3f0123d8ce950cf2e70478
+SIZE (hjespers-teslams-1.1.4-6f6dfa2_GH0.tar.gz) = 251535
Added: head/misc/teslams/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/teslams/pkg-descr Tue Mar 15 05:16:59 2016 (r411138)
@@ -0,0 +1,4 @@
+An implementation in Node.js of the client-side interface to the Tesla
+Model S API, along with various utilities that exercise the API.
+
+WWW: https://github.com/hjespers/teslams
Added: head/misc/teslams/pkg-message
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/misc/teslams/pkg-message Tue Mar 15 05:16:59 2016 (r411138)
@@ -0,0 +1,22 @@
+These programs and documentation do not come from Tesla Motors Inc.
+
+Be careful when using these programs as they can lock and unlock your
+car as well as control various functions relating to the charging system,
+sun roof, lights, horn, and other subsystems of the car.
+
+Be careful not to send your login and password to anyone other than Tesla
+or you are giving away the authentication details required to control
+your car.
+
+Also ensure that you don't overwhelm the Tesla servers with requests.
+Calling REST APIs at very high frequency can put substantial load on the
+Tesla servers and might get your IP blocked by Tesla.
+
+Use these programs at your own risk. The authors do not guarantee the
+proper functioning of these applications. This code attempts to use the
+same interfaces used by the official Tesla phone apps. However, it is
+possible that use of this code may cause unexpected damage for which
+nobody but you are responsible. Use of these functions can change the
+settings on your car and may have negative consequences such as (but not
+limited to) unlocking the doors, opening the sun roof, or reducing the
+available charge in the battery.
More information about the svn-ports-head
mailing list