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-lg-airco

v0.1.4

Published

Homebridge plugin to control a Smart Thinq enabled LG airco unit. Makes use of WideQ => https://github.com/sampsyo/wideq

Downloads

60

Readme

Homebridge Smart Thinq LG Airco

This Homebridge plugin allows control over a Smart Thinq enabled LG Airco unit.

To install this plugin simple type sudo npm install homebridge-lg-airco -g --unsafe-perm=true. Next open the config.json that contains your Homebridge configuration and add a block like the following one to the accessories array:

{
    "accessory": "LgAirCooler",
    "name": "LG Airco",
    "deviceId": "OPTIONAL_DEVICE_ID",
    "model": "AC RAC_056905_WW",
    "country": "BE",
    "language": "en-UK",
    "maxCoolingTemp": 26,
    "minCoolingTemp": 18,
    "maxHeatingTemp": 30,
    "minHeatingTemp": 5,
    "updateInterval": 60000,
    "debug": false,
    "dummy": false
}

The accessory name has to be LgAirCooler to link to the plugin.
The name field is for the display name in the HomeKit app.
The deviceId field is the device id for you cooler, optional, only provide this if you have more than one AC unit! instructions below how to obtain it!
The country field is the 2 letter country code (XX) of the chosen country of your LG SmartThinq account.
The language field is the 4 letter language code (xx-XX) of the chosen language of your LG SmartThinq account.
The model field is the model of the AC unit being used. This value is used to show in the information section.
The maxCoolingTemp field is the maximum settable temperature when in COOLING mode.
The minCoolingTemp field is the minimum settable temperature when in COOLING mode.
The maxHeatingTemp field is the maximum settable temperature when in HEATING mode.
The minHeatingTemp field is the minimum settable temperature when in HEATING mode.
The updateInterval field is the interval that is used to fetch new state data from the AC unit. In milliseconds!
The debug field is the boolean that enables or disables debug logging, set this to false unless collecting logs.
The dummy field is the boolean that enables mocking out the LG API and will instead use a dummy AC unit with no network calls, only for development & testing!

The initial state will be fetched shortly after booting your Homebridge instance. After that an update of the state is performed every minute.

Requirements

  • A SmartThinq compatible LG airco unit (Tested with an PC12SQ NSJ)
  • Registered through the V1 LG API!!! V2 API is NOT YET supported!!!

Setup guide

  • Open a terminal on the device where you installed this plugin and type: cd "$(npm root -g)" && cd homebridge-lg-airco/resources/wideq
  • Your terminal should navigate to the folder, if any error comes up the plugin was not installed correctly!
  • Make sure requests has been installed, if not execute: sudo python3 -m pip install requests
  • Execute the command python3 example.py -c country-code -l language-code -p path-to-wideq-file-in-homebridge-folder where you should replace country-code, language-code and path-to-homebridge-folder with the respective values. For example: python3 example.py -c BE -l en-UK -p /home/pi/.homebridge/wideq_state.json
  • Make sure the wideq_state.json does not exist yet! If the file is corrupted, delete it before executing the command again!
  • Follow the instructions on the screen, and paste the resulting URL back into the terminal. The command will now print out a list of all known devices for your account. If wanted select the one you want and paste the value in the config.json file at the deviceId field of the corresponding accessory definition. It will also generate a file in which the session is stored in the Homebridge folder.
  • The plugin is now fully ready to be used in Homebridge!

This code makes use of the WideQ library, more information here. Some changes have been made to the included version of the WideQ library.