Skip to content

yonatanp/electrasmart-custom-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Electra Smart Custom Component

hacs_badge

Description

HomeAssistant custom component to support Electra Smart air conditioners.

This is based on the electrasmart python library. Both are still in beta stage. Use at your own risk and please report back your results, preferably as issues.

  • Supports HACS installation

Installation

Install through HACS:

  1. Go to HACS -> Settings.
  2. Enter "https://github.com/yonatanp/electrasmart-custom-component" for ADD CUSTOM REPOSITORY and choose "Integration" for Category.
  3. Click Save.

Or, install manually by downloading the custom_components/electrasmart folder from this repo and placing it in your config/custom_components/ folder. If the custom_components folder does not exist, create it empty first. If done correctly, the file config/custom_components/electrasmart/manifest.json should exist.

IMEI and Token

Before you configure the integration, you will need to get auth credentials (IMEI + token) and discover your AC device IDs that will later be used by the HomeAssistant configuration.

Install the client library with e.g. pip install electrasmart on any machine.

Then, run electrasmart-auth, and provide a phone number that has been pre-authorized in the official ElectraSmart mobile app. You will be requested to provide an OTP sent via SMS. Once this is complete, you will be provided with two strings: imei and token. Write them down for later.

Next, run electrasmart-list-devices <imei> <token> to get a list of your devices. Pick the right ID of the AC unit you want to manage in HomeAssistant. Write it down for later.

Configuration

Add configuration to the configuration.yaml such as the following:

...
climate:
  - platform: electrasmart
    imei: "2b9500000..."
    token: "1fd4a2e86..."
    use_shared_sid: true #optional, default = false
    acs:
      - id: 12345
        name: MyLivingRoomAC
...

Note: if you want to configure multiple ACs under the same account, this is possible. Do it in the same way you configure multiple instances of the same type of platform in HomeAssistant (e.g. add another item under climate). The imei and token values should be the same for both ACs.

Modify default scan interval

The current default scan interval is 60 seconds, to change this value, add a scan_interval parameter to the configuration.yaml such as the following:

...
climate:
  - platform: electrasmart
    scan_interval: 10
...

See more details on the Scan Interval in the official docs.

Troubleshooting

It might not work out of the box just yet. It is recommended that you enable detailed logging by adding the following configuration to your configuration.yaml while debugging the setup process:

...
logger:
  default: warn
  logs:
    custom_components.electrasmart: debug
...

See more details on the Logger integration in the official docs.

To get detailed logging from the Electra API, enable debug logging for the electrasmart library:

...
  logs:
    custom_components.electrasmart: debug
    electrasmart: debug
...

About

Home automation integration with Electra Smart type air conditioners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages