Download Node.js and install in default dir C:\Program Files\nodejs  (node-v0.10.18-x64)
Download MongoDB and install in default dir C:\Program Files\mongedb  (mongodb-win32-x86_64-2.4.6)

create a directory in the root c:\data
create a subdir to data c:\data\db
Create a subdir to data c:\data\teslams

copy all the files from this ZIP file to the root af c:\data

copy all the files from the package located under "program files\nodejs\" to "c:\program files\nodejs" or the folder created during the installation in line 1. - this will add the required modules to NodeJs

Edit the file - c:\data\config.json to include your tesla login and password.
	The Section visualize defines the user and pass to login to the TeslaMS frontend.

Unzip the NSSM in the installs folder and copy the file to your windows/system32 folder (syswow64+system32)

Now you need to install the programs as services.

__

To install MongoDB as a service - execute the following command in an administrative command prompt:
sc create MongoDB binpath= "C:\Program Files\mongedb\bin\mongod.exe --service --dbpath=c:\data\db --logpath=c:\data\log.txt" displayname= "MongoDB" depend= tcpip start= auto

To install NodeVisualize as a service - execute the following command in an administrative command prompt:
Nssm install NodeVisualize "C:\Program Files\nodejs\node.exe" "C:\data\teslams\examples\visualize\visualize.js --db teslams" 

To install NodeStreaming as a service - execute the following command in an administrative command prompt:
Nssm install NodeStreaming "C:\Program Files\nodejs\node.exe" "C:\data\teslams\examples\streaming.js -u user@domain.dk -p password --db teslams"

To install NodeScheduler as a service - execute the following command in an administrative command prompt:
Nssm install NodeScheduler "C:\Program Files\nodejs\node.exe" "C:\data\teslams\examples\scheduler.js -u user@domain.dk -p password --db teslams"

__

NodeVisualize is the frontend: available at http://localhost:8766
NodeStreaming is the program collection data from your Tesla - via the Tesla Portal
NodeScheduler is the program checking your schedules created in TeslaMS. It will check every minute and execute the commands. It will also notify you when a change in the power status changes. Ie. plugged in or finished charging.

