nyffchanium / argoclima-integration

Home Assistant integration for Argoclima (Argo) climate control devices
MIT License
22 stars 5 forks source link
argo argoclima climate-control home-assistant

Project Status GitHub Release GitHub Activity License

pre-commit Black

hacs Project Maintenance BuyMeCoffee

Discord Community Forum

Home Assistant Integration for Argoclima (Argo) climate control devices

This is an unofficial Home Assistant integration I wrote for my Argo Ulisse Eco WiFi, using the undocumented API used by the webapp.

Supported devices and features

At the moment, only the device I own is supported. There is a good chance that other wifi capable devices use the same API though. So if you own a different device, please feel free to get in touch or contribute. Feature Implementation / Supported for Ulisse 13 DCI Eco WiFi
on / off climate operation
operation mode climate operation
eco mode climate preset
turbo mode climate preset
night mode climate preset
current temperature climate
set target temperature climate
set fan speed climate fan mode
set flap mode x -
set filter mode x -
set active timer select
use remote temperature switch
timer configuration x x
set current time and weekday set_time service
device lights on / off switch
display unit * select
eco mode power limit number
firmware version ** device registry
reset device x x

[text] platform the feature is represented by in HA\ [-] not supported by the device\ [x] not implemented

* This only affects the value displayed on the device and the web interface. ** Not visible in the frontend.

Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called argoclima.
  4. Download all the files from the custom_components/argoclima/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Argoclima"

Adding your device to Home Assistant

At the moment, the integration will communicate with the device locally. Cloud based communication is not supported.

Set up WiFi

Follow the instructions provided with the device to connect it to your network. Once that is done, I highly recommend assigning it a static IP via router configuration. The integration is IP based and can not identify the device by any other means.

Configuration

Select your device type, give it a name and enter the IP. The IP can be changed later.\ configuration

Using the Remote Sensor

The temperature sensor integrated in the remote can still be used.\ To make this work:

  1. To not overwrite the device's configuration, e.g. cover up the IR diode of the remote.
  2. Set the state of the remote to On (indicated by e.g. the grid lines and the fan icon being visible).
  3. Enable remote temperature mode (indicated by the user icon, toggled by holding the fan button for 2 seconds). This might not be required. Not sure.

If my observations are correct, the remote will now send the temperature (no other settings):

Probably more often, but that's what I found.

Dummy Server

By default, your device periodically communicates with Argos's server (hardcoded IP 31.14.128.210). Without this connection, the API this integration uses won't work. This repository provides a dummy server docker image, so you can keep the traffic in your local network. By doing this, you will lose the ability to use the original web UI.

You can pull the docker image from https://hub.docker.com/r/nyffchanium/argoclima-dummy-server, or you can run the server without docker by using the Go script in the dummy-server folder.

You can set the port the dummy server listens to via the env SERVER_PORT. It defaults to 8080.

Routing

For the dummy server to be of any use, you need to redirect the traffic to it. As the original server is a hardcoded public IP you need to change the routing through your router.

Example with an Asus router running Asuswrt-Merlin:

  1. Enable custom scripts and SSH via the router UI (Administration -> System).
  2. SSH into your router and create a file called nat-start in /jffs/scripts (replace YOUR_SERVER and YOUR_PORT with the address and port of your dummy server instance).
    #!/bin/sh
    iptables -t nat -I PREROUTING -s 0.0.0.0/0 -d 31.14.128.210 -p tcp -j DNAT --to-destination YOUR_SERVER:YOUR_PORT
  3. Make sure the file is executable. chmod a+rx /jffs/scripts/*.
  4. Restart your router.

Restrictions / Problems

Troubleshooting

Device can't be created / Device is unavailable, the IP is correct and the device is connected:\ Turn off the device and unplug it, leave it for an unknown amount of time (1min is enough for sure), then try again.

Home Assistant loses the connection to the device every few seconds:\ image\ This seems to be caused by Argo's server being overloaded and not responding to the device's requests. Apparently, dropped / timed out requests result in the device resetting the WLAN connection.\ At the moment, the only known workaround is to use the dummy server.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Credits

The dummy server has been contributed by @lallinger.

This project was initially generated from @oncleben31's Home Assistant Custom Component Cookiecutter template.

Code template was mainly taken from @Ludeeus's integration_blueprint template.