Socket
Socket
Sign inDemoInstall

homebridge-lg-airco

Package Overview
Dependencies
0
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    homebridge-lg-airco

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


Version published
Maintainers
1
Created

Readme

Source

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
}

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 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: npm root -g
  • Navigate to the path that the previous command has printed out
  • Enter the folder of the plugin to where the wideq files are: cd homebridge-lg-airco/resources/wideq
  • Execute the command sudo python3 example.py -c country-code -l language-code where you should replace country-code and language-code with the respective values. For example: sudo python3 example.py -c BE -l en-UK
  • 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.
  • Set the file permissions on the state file with this command (osx/linux): sudo chmod a+rw wideq_state.json
  • The plugin is now fully ready to be used in Homebridge!
  • Note! If you update the plugin, make sure to re-execute the command above with your specific parameters! (because updating the plugin removes the file in which the session is stored!)

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

Keywords

FAQs

Last updated on 03 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc