aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorbmah <bmah@FreeBSD.org>2016-03-15 13:16:59 +0800
committerbmah <bmah@FreeBSD.org>2016-03-15 13:16:59 +0800
commit14d13ea4373560bab18a0f0354a9d97a54b9d61e (patch)
tree55009897a48e938997f4aed59aa5e6ef0b907d1e /misc
parenta8fd683554a89ac9254367dda2405e5178cdb3ab (diff)
downloadfreebsd-ports-gnome-14d13ea4373560bab18a0f0354a9d97a54b9d61e.tar.gz
freebsd-ports-gnome-14d13ea4373560bab18a0f0354a9d97a54b9d61e.tar.zst
freebsd-ports-gnome-14d13ea4373560bab18a0f0354a9d97a54b9d61e.zip
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.
Diffstat (limited to 'misc')
-rw-r--r--misc/Makefile1
-rw-r--r--misc/teslams/Makefile45
-rw-r--r--misc/teslams/distinfo2
-rw-r--r--misc/teslams/pkg-descr4
-rw-r--r--misc/teslams/pkg-message22
5 files changed, 74 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 70fe4dba5ac5..edf573894742 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -442,6 +442,7 @@
SUBDIR += termatrix
SUBDIR += terraform
SUBDIR += teseq
+ SUBDIR += teslams
SUBDIR += tkcron
SUBDIR += tkinfo
SUBDIR += tkregexp
diff --git a/misc/teslams/Makefile b/misc/teslams/Makefile
new file mode 100644
index 000000000000..a3493ff925bd
--- /dev/null
+++ b/misc/teslams/Makefile
@@ -0,0 +1,45 @@
+# Created by: Bruce A. Mah <bmah@freebsd.org>
+# $FreeBSD$
+
+PORTNAME= teslams
+PORTVERSION= 1.1.4
+CATEGORIES= misc
+
+MAINTAINER= bmah@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>
diff --git a/misc/teslams/distinfo b/misc/teslams/distinfo
new file mode 100644
index 000000000000..29fa7fabebdb
--- /dev/null
+++ b/misc/teslams/distinfo
@@ -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
diff --git a/misc/teslams/pkg-descr b/misc/teslams/pkg-descr
new file mode 100644
index 000000000000..4235a4e128cc
--- /dev/null
+++ b/misc/teslams/pkg-descr
@@ -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
diff --git a/misc/teslams/pkg-message b/misc/teslams/pkg-message
new file mode 100644
index 000000000000..b9b7c8e19dba
--- /dev/null
+++ b/misc/teslams/pkg-message
@@ -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.