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-polestar

v2.0.0

Published

Polestar support for Homebridge: https://github.com/nfarina/homebridge

Downloads

2

Readme

NOTE: THIS IS NOT FUNCTIONAL YET. CODE IS IN PROGRESS.

Polestar Accessory

Got a Polestar? Want to let Siri boss it around? Look no further.

Services

After installation below, you'll get the default services enabled:

  • "Unlock the car doors" (unlock the vehicle)
  • "Turn on the climate control of my car" (turns on climate control if off)
  • "What is the current charge level of my car"

Installation

If you're running a Homebridge UI like homebridge-ui-config-x then you can use it to install homebridge-polestar and configure it there. All configuration options should be supported.

Manual Installation

npm install --global homebridge-polestar

Example config.json:

{
  "accessories": [
    {
      "accessory": "Polestar",
      "name": "PS2",
    }
  ]
}

You can find the full list of configuration settings in config.schema.json.

Prerequisite Software Install

  • This package comes with a ./scripts/install.sh script that will (probably) install the necessary software. It should support apt/yum/homebrew, so Linux and MacOS.
  • This script installs Tesseract (an OCR program) that takes an image and returns the text in the image, xmlstarlet, an xml parsing program that interprets the UI dump from the android phone, ADB (Android Debugging Bridge) to connect to the phone, and ImageMagick, an image manipulation program to help Tesseract work better. These are all required, and unfortunately not reliably automatically installable with npm (the pacakge manager that homebridge uses)
  • In order to make this work, you must have an android phone (presumably that you dont use for anything else) connnected through adb

Setting up the Home App

The plugin exposes a single HomeKit "Accessory" representing the car, which contains multiple services for all the different switches and locks. This is the way.

Unfortunately, there is a very annoying known bug with iOS 16 where, when adding accessories with multiple services, the services are all given the same name as the main accessory.

This means that if your accessory (car) name is "Model Y", then (for instance) the trunk service will be renamed to "Model Y". And you'll say "open the trunk" and Siri will say "I don't know what you mean."

You'll need to manually tap into each service tile and change its name back to what you want. NOTE Tapping "X" on the accessory name will display the true name.

Additionally, you'll find that when you tap into the car in the Home app to, say, open the trunk, you'll see a big scrolling page of switches and locks with no labels. This is just what the Home app does.

To improve this, you can create a new "Room" in HomeKit for each car. So you might have a "Model Y" room, and you can place your Model Y accessory inside there. Then you can configure it to "Show as separate tiles" and you get this lovely presentation of all your widgets in the "room" (pictured at top).

Here's a video demonstrating the complete setup process as of iOS 16.

Multiple Vehicles

Have a garage full of Polestar? Well you're currently out of luck, this plugin was not designed to handle more than one. The underlying API has been tough to reverse engineer, so this plugin depends on some really terrible hacky automation of the Polestar app.

Climate Switch

By default, the climate control is normally exposed as a "HVAC" accessory similar to a thermostat in your home. However, this is not currently possible with the Polestar, so the climate control as a simple switch. This allows you to say things like "Turn on the climate control" or "Turn off the climate control." The temperature setting will be the default Polestar 22C.

Development

You can run Rollup in watch mode to automatically transpile code as you write it:

  npm run dev