在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:nfarina/homebridge-tesla开源软件地址:https://github.com/nfarina/homebridge-tesla开源编程语言:TypeScript 99.2%开源软件介绍:Tesla AccessoryExample config.json:
Exposes lock services for doors, trunk, and front trunk. Also exposes an on/off switch for climate control, and charge state. If you define a value for If you define a value for If you use the example above, you would gain Siri commands like:
Important Note: The Home app will allow you to customize the default names of these services. You may be tempted to, for instance, change your "Model 3 Front Trunk" service to just "Front Trunk" so you can say "Open the Front Trunk". Don't do this! The names of these services are essentially global and live in a giant pool of names. Siri will get confused unless every service has an easily distinguished name. You may disable various services using additional boolean configuration settings. See Generating a Refresh TokenTesla has recently (early 2021) updated their OAuth authentication system as part of adding support for MFA tokens. Tesla API access requires a "refresh token" which is tricky to get. There are some apps available that can help with this, check out this list. I have personally used the macOS app "Auth app for Tesla" (linked via that site) and it worked for me. Once you get a refresh token using an app (it's very long), you can paste it into your plugin configuration above. NOTE This plugin used to accept an Multiple VehiclesHave a garage full of Teslas? Well you're in luck Mr. Musk, because you can easily add all of them to HomeKit by creating a separate accessory for each one distinguished by their unique VIN numbers:
HomeLinkFor vehicles with HomeLink support, the plugin allows you to enable the feature to send a HomeLink signal from the car. This is disabled by default. To enable the feature, you may use the UI (check the Enable HomeLink Service to enable it) or add a setting in the accessory section for the vehicle. You also must provide a latitude and longitude value for the HomeLink device. Once that is done, you can issue commands like "Open the Model 3 HomeLink". If you don't have any other garage doors in HomeKit, you may also be able to just say "Open the garage door" since it's exposed as a true garage door service.
Charge LevelThe car can supply the current charge level of the battery as a percentage. This will only update if the car is awake. Asking Siri about your car's charge level will not wake up the car (because Siri asks a lot in the background). So you'll have to issue a write command like "Turn on the Model 3 Connection" first. The Charge Level can be disabled in either your Homebridge UI or by adding the following to the car's accessory section.
DevelopmentYou can run Rollup in watch mode to automatically transpile code as you write it: npm run dev |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论