npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-my-tesla

v1.0.129

Published

Homebridge plugin for Teslas

Downloads

193

Readme

homebridge-my-tesla

Homebridge plugin for Tesla owners. This plugin assumes you are familiar with Homebridge.

Before installing this plugin please concider the plugin https://www.npmjs.com/package/homebridge-tesla which was created by Nick Farina who also created Homebridge. Without his work this plugin would not be possible.

A Swedish screen shot below but may be explanatory.

Installation

First, install Homebridge. See https://www.npmjs.com/package/homebridge for more information.

Then install this plugin.

$ sudo npm install homebridge-my-tesla -g --unsafe-perm

Configuration File

Configure your ~/.homebridge/config.json with the following platform.


{
    "bridge":{
        "name":"Tesla",
        "username":"11:11:11:11:11:21",
        "port":51821,
        "pin":"111-11-120"
    },
    "description":"Sample configuration file",
    "platforms":[
        {
            "platform":"Tesla",
            "name":"Tesla",
            "debug":true,
            "vehicles":[
                {
                    "name":"Model 3",
                    "vin":"your-vin-number",
                    "token":"your-refresh-token",
                    "expose":[
                        "ping",
                        "defrost",
                        "ventilation",
                        "trunk",
                        "hvac",
                        "doors",
                        "insideTemperature",
                        "steeringWheelHeater"
                    ],
                    "accessories":{
                        "ping":{
                            "name":"Ping",
                            "requiredBatteryLevel":50,
                            "timerInterval":0.25
                        },
                        "defrost":{
                            "name":"Avfrostning"
                        },
                        "ventilation":{
                            "name":"Ventilation"
                        },
                        "trunk":{
                            "name":"Bakluckan"
                        },
                        "charging":{
                            "name":"Laddning"
                        },
                        "hvac":{
                            "name":"Fläkten",
                            "requiredBatteryLevel":20
                        },
                        "doors":{
                            "name":"Dörren",
                            "remoteStartDrivePassword":"omit-or-your-tesla-password"
                        },
                        "outsideTemperature":{
                            "name":"Ute"
                        },
                        "insideTemperature":{
                            "name":"Inne"
                        },
                        "thermostat":{
                            "name":"Termostat",
                            "requiredBatteryLevel":40,
                            "timerInterval":2
                        },
                        "steeringWheelHeater":{
                            "name":"Rattvärme"
                        }
                    }
                }
            ]
        }
    ]
}

Of course, you have to supply your own name and VIN number and login credentials.

What This Plugin Does

This plugin adds a number of controls to Apple HomeKit. Currently it only adds controls to open the doors, control the HVAC and to display current temperature.

Added accessories

Ping

When this switch is active your Tesla will never go into deep sleep. Every 5 minutes or so, a request is made to update the state of your car.

"ping": {
    "name": "Ping",
    "requiredBatteryLevel": 40,
    "timerInterval": 5
}
  • name - Localized name, specify the name you want in the Apple Home app.
  • requiredBatteryLevel - Specifes the required battery level to operate. If battery level is below this level, the ping function will stop.
  • timerInterval - Specifies the number of minutes between pings.

Charging

The charging switch reflects the charging state.

"charging": {
    "name": "Charging"
}
  • name - Localized name, specify the name you want in the Apple Home app.

Door

Lock or unlock the doors using this switch. Unlocking the door also also enables keyless start.

"doors": {
    "name": "Door",
    "remoteStartDrivePassword": "tesla-login-password"
}
  • name - Localized name, specify the name you want in the Apple Home app.
  • remoteStartDrivePassword - Your Tesla login password. If specified you will not have to enter your pin code to start driving.

Fan

Turn the HVAC ON or OFF using this switch.

"hvac": {
    "name": "Fläkten",
    "requiredBatteryLevel": 20
}
  • name - Localized name, specify the name you want in the Apple Home app.
  • requiredBatteryLevel - Specifes the required battery level to operate. If battery level is below this level, the fan function will stop.

Inside

Displays the inside temperature.

"insideTemperature": {
    "name": "Inside"
}
  • name - Localized name, specify the name you want in the Apple Home app.

Outside

Displays the outside temperature.

"outsideTemperature": {
    "name": "Outside"
}
  • name - Localized name, specify the name you want in the Apple Home app.

Thermostat

This enables you to control the inside temperature of your Tesla. Set it to 4 - 10 Celsius in the winter time to have a frost free vehicle in the morning. Use automation to turn it on at a specific time.

"thermostat": {
    "name": "Termostat",
    "requiredBatteryLevel": 40,
    "timerInterval": 2
}
  • name - Localized name, specify the name you want in the Apple Home app.
  • requiredBatteryLevel - Specifes the required battery level to operate. If battery level is below this level, the thermostat function will stop.
  • timerInterval - Specifies the number of minutes between checking the temperature.

Siri

If you name things correctly you might get Siri to work by saying "Lock car", "Unlock car", "Turn on fan" or "Turn off fan"...

Usage

As for now, it is a good idea to create a new home in Apple's Home app. Name the new home to the same name of your car. Then add the this accessory to the newly created home.

Updates

  • 2019-11-15 - Accessory information updated properly with serial number (VIN) and firmware version.
  • 2019-11-30 - Updated documentation.