GithubHelp home page GithubHelp logo

ollo69 / ha-melcloud-custom Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 9.0 128 KB

Home Assistant custom integration for MelCloud AC devices with additional Swing control and WI-Fi Sensor

License: Apache License 2.0

Python 98.71% Shell 1.29%
home-assistant homeassistant melcloud mitsubishi climate thermostat sensors airconditioners

ha-melcloud-custom's Introduction

hacs_badge

MELCloud HomeAssistant custom component

ℹ️ Note

Due to the latest restrictions introduced by MELCloud platform (see here) I decided to implement the control of my AC devices through the adoption of small and economical ESP8266 devices connected to CN105 units connector which allow real-time control via MQTT (see here an example).

As consequence I no longer have a way to maintain this integration, fixing bug, implementing new features and adapting to HA architecture changes.

If anyone is interested in taking charge of it, they can possibly fork this repository and I will report the new reference link here in the notes.

This repository will be shortly moved in state archived.

Description

A full featured Homeassistant custom component to drive MELCloud ATA and ATW devices.

This custom component is based on the native Home Assistant MELCloud component released with version 0.106 and on the same underlying PyMelCloud library.

Custom component additional features

I just added some features to the existing native components, waiting for the same features to be implemented:

  1. Add support for login language from a list of available options. The language should be the same that you normaly use for other MELCloud application (e.g. your phone app).

  2. Added control for Vertical and Horizontal Swing Modes on ATA devices using default Swing features.

  3. Added sensor to monitor WiFi signal.

  4. Added binary sensor to monitor error state.

  5. Added some attributes to the sensors to provide additional information (SerialNo, Unit Info, etc)

  6. Implemented use of coordinator to have update for all entities syncronizes

Installation & configuration

You can install this component in two ways: via HACS or manually.

Option A: Installing via HACS

If you have HACS, you must add this repository ("https://github.com/ollo69/ha-melcloud-custom") to your Custom Repository selecting the Configuration Tab in the HACS page. After this you can go in the Integration Tab and search the "MELCloud Custom" component to install it.

Option B: Manually installation (custom_component)

  1. Clone the git master branch.

  2. Unzip/copy the melcloud_custom direcotry within the custom_components directory of your homeassistant installation. The custom_components directory resides within your homeassistant configuration directory. Usually, the configuration directory is within your home (~/.homeassistant/). In other words, the configuration directory of homeassistant is where the configuration.yaml file is located. After a correct installation, your configuration directory should look like the following.

    └── ...
    └── configuration.yaml
    └── secrects.yaml
    └── custom_components
        └── melcloud_custom
            └── __init__.py
            └── binary_sensor.py
            └── climate.py
            └── ...
    

    Note: if the custom_components directory does not exist, you need to create it.

Component setup

Once the component has been installed, you need to configure it in order to make it work. There are two ways of doing so:

  • Using the web interface (Lovelace) [recommended]
  • Manually editing the configuration.yaml file

Option A: Configuration using the web UI [recommended]

Simply add a new "integration" and look for "MELCloud Custom" among the proposed ones. Do not confuse with "MELCloud" that is the native one!

Option B: Configuration via editing configuration.yaml

Follow these steps only if the previous configuration method did not work for you.

  1. Setup your MELCloud credentials. Edit/create the secrets.yaml file, which is located within the config directory as well. Add the following:

    melcloud_username: [email protected]
    melcloud_password: my_melcloud_password
    

    Where "[email protected]" is your MELCloud account email and "my_melcloud_password" is the associated password.

  2. Enable the component by editing the configuration.yaml file (within the config directory as well). Edit it by adding the following lines:

    melcloud_custom:
      username: !secret melcloud_username
      password: !secret melcloud_password
      language: my_melcloud_language
    

    Where "my_melcloud_language" is your MELCloud account language and can be one of the following (eg: EN):

     EN = English
     BG = Bulgarian
     CS = Czech
     DA = Danish
     DE = German
     ET = Estonian
     ES = Spanish
     FR = French
     HY = Armenian
     LV = Latvian
     LT = Lithuanian
     HU = Hungarian
     NL = Dutch
     NO = Norwegian
     PL = Polish
     PT = Portuguese
     RU = Russian
     FI = Finnish
     SV = Swedish
     IT = Italian
     UK = Ukrainian
     TR = Turkish
     EL = Greek
     HR = Croatian
     RO = Romanian
     SL = Slovenian
    

Note! In this case you do not need to replace "!secret melcloud_username" and "!secret melcloud_password". Those are place holders that homeassistant automatically replaces by looking at the secrets.yaml file.

  1. Reboot home assistant
  2. Congrats! You're all set!

ha-melcloud-custom's People

Contributors

el97 avatar ollo69 avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ha-melcloud-custom's Issues

Finished fetching melcloud_custom (success: False)

Hello,
All my entities have been "unavailable" for a few hours. However, I can still control them from the iPhone app and the MELCloud website. I've activated the debug logs from the integration settings but that's all I get.

...
hass  | 2024-02-05 16:53:19.327 DEBUG (MainThread) [custom_components.melcloud_custom] Finished fetching melcloud_custom-Entree data in 0.235 seconds (success: False)
hass  | 2024-02-05 16:53:19.472 DEBUG (MainThread) [custom_components.melcloud_custom] Finished fetching melcloud_custom-Haut  data in 0.195 seconds (success: False)
hass  | 2024-02-05 16:53:19.496 DEBUG (MainThread) [custom_components.melcloud_custom] Finished fetching melcloud_custom-Carnotzet  data in 0.268 seconds (success: False)
...

How can I investigate further?
Many thanks in advance,

Failed to connect, please try again

Since yesterday? I get failed to connect.
Tried to reinstall , no success
No errors in log.
Same with HA Melcloud version.
The iPhone Melcloud app has no problem connecting
Also tried guest account.

Flow temp ATW

hi, I just want to know if work is being done to get flow temp set on the atw pump in this melcloud custom integration

Entity None does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method.

Thanks for your great Melcloud solution, with the new throttle it behaves ok for me !

With HA 2024.2.1 and Melcloud V0.3.4

Logger: homeassistant.components.climate
Source: components/climate/init.py:354
Integration: Klimaat (documentation, issues)
First occurred: 17:26:49 (9 occurrences)
Last logged: 17:26:49

Entity None (<class 'custom_components.melcloud_custom.climate.AtaDeviceClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please create a bug report at https://github.com/ollo69/ha-melcloud-custom/issues
Entity None (<class 'custom_components.melcloud_custom.climate.AtaDeviceClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please create a bug report at https://github.com/ollo69/ha-melcloud-custom/issues
Entity None (<class 'custom_components.melcloud_custom.climate.AtaDeviceClimate'>) implements HVACMode(s): off, heat, dry, cool, fan_only, heat_cool and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/ollo69/ha-melcloud-custom/issues

Error setting up entry [email protected] for melcloud_custom

Hi, after updating Home Assistant to version 2023.5.1, below error occurs:

Logger: homeassistant.config_entries
Source: custom_components/melcloud_custom/__init__.py:165
Integration: MELCloud Custom (documentation, issues)
First occurred: 06:16:15 (2 occurrences)
Last logged: 06:21:53
Error setting up entry [email protected] for melcloud_custom

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/melcloud_custom/__init__.py", line 165, in async_setup_entry
    hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Zrzut ekranu z 2023-05-05 06-30-19
Zrzut ekranu z 2023-05-05 06-29-59

Could you add hvac_action attribute?

Hi,
I noticed some other climate integrations supply a state attribute hvac_action.
Example:
hvac_action: heating
Apparently this is taken into account by the thermostat card to make the termostat glow orange and the target temperature orange if supplied.
examples below. Without & with the hvac_action supplied

image

Scene

Does this have a scene selector from the melcloud app scenes?

Error Unauthorized

Melcloud component don't work

Error requesting melcloud_custom-Aire hab principal data: 401, message='Unauthorized', url=URL('https://app.melcloud.com/Mitsubishi.Wifi.Client/Device/Get?id=XXXXXX&buildingID=XXXXX')
Error requesting melcloud_custom-Aire menjador data: 401, message='Unauthorized', url=URL('https://app.melcloud.com/Mitsubishi.Wifi.Client/User/GetUserDetails')

The Official component does work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.