innova-controls


Nameinnova-controls JSON
Version 2.2.1 PyPI version JSON
download
home_pagehttps://github.com/danielrivard/innova-controls
SummaryInnova Air Conditioner Control API
upload_time2024-02-22 03:29:38
maintainer
docs_urlNone
authorDaniel Rivard
requires_python>=3.9, <4
licenseApache
keywords development home automation library innova
VCS
bugtrack_url
requirements retry2 aiohttp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/innova-controls.svg)](https://badge.fury.io/py/innova-controls)

# Innova Control API

Tested on a [Innova 2.0 unit](https://www.innovaenergie.com/en/products/air-conditioning-without-outdoor-unit/2.0-verticale/2.0/)

Also supports [AirLeaf](https://www.innovaenergie.com/en/products/fancoils/airleaf/)

## Installation
``` pip install innova_controls```

## Innova class usage
See [test_main.py](test_main.py) for some example usage. 

This is far from perfect documentation, but it is a start.

## Communication protocol

### Local Mode

All commands are sent to the unit itself through http at its network IP address: **http://[IP_ADDRESS]/api/v/1**.

### Cloud Mode

Commands are sent to Innova's cloud services at **https://innovaenergie.cloud/api/v/1** (or **https://fancoil.innovaenergie.cloud/api/v/1** for AirLeaf, but currently not working). The serial number and the MAC Address of the unit are needed when using cloud mode.

The following custom http headers are added to requests to identify units
  * "X-serial": UNIT_SERIAL_NUMBER
  * "X-UID": UNIT_MAC_ADDRESS

### Protocol definition

We just need to append the following commands and parameters where needed.

Ex: ```curl http://192.168.1.155/api/v/1/status```

It is highly recommended to set the IP of your unit to a static DHCP address.

#### 2.0 Commands and Statuses
|Action|HTTP Verb|API Endpoint|Data Needed (`Content-Type: application/x-www-form-urlencoded`)|Extra Info|
|---|---|---|---|---|
|Status|GET|/status||Returns json object|
|Power ON|POST|/power/on|||
|Power OFF|POST|/power/off|||
|Scheduling ON|POST|/set/calendar/on|||
|Scheduling OFF (Manual)|POST|/set/calendar/off|||
|Night Mode ON|POST|/set/feature/night|value=1||
|Night Mode OFF|POST|/set/feature/night|value=0||
|Set point|POST|/set/setpoint|p_temp=24||
|Rotation ON|POST|/set/feature/rotation|value=0||
|Rotation OFF|POST|/set/feature/rotation|value=7||
|Fan Speed|POST|/set/fan|value=[0-4]|0=auto,1=low,2=med,3=high,4=high++|
|Cooling|POST|/set/mode/cooling|||
|Heating|POST|/set/mode/heating|||
|Dehumidification|POST|/set/mode/dehumidification|||
|Fan Only|POST|/set/mode/fanonly|||
|Auto|POST|/set/mode/auto|||


JSON returned by status endpoint:
```json
{
    "RESULT": {
        "a": [],
        "cci": 0,
        "ccv": 0,
        "cfg_lastWorkingMode": 4,
        "cloudConfig": 1,
        "cloudStatus": 4,
        "cm": 0,                       <--- Scheduling Mode: 0=off, 1=on
        "connectionStatus": 2,
        "coolingDisabled": 0,
        "cp": 0,
        "daynumber": 0,
        "fr": 7,                       <--- Fan Rotation: 0=on, 7=off
        "fs": 0,                       <--- Fan Speed: 0=auto, 1=low, 2=med, 3=high, 4=high++
        "heap": 11760,
        "heatingDisabled": 1,
        "heatingResistance": 0,
        "hotelMode": 0,
        "inputFlags": 0,
        "kl": 0,
        "lastRefresh": 3956,
        "ncc": 0,
        "nm": 0,                        <--- Night Mode: 0=off, 1=on
        "ns": 0,
        "ps": 0,                        <--- Power: 0=off, 1=on
        "pwd": "************",
        "sp": 26,                       <--- Temperature Set point
        "t": 16,                        <--- Ambient Temperature
        "timerStatus": 0,
        "uptime": 159660,
        "uscm": 0,
        "wm": 4                         <--- Working Mode: 0=heating, 1=cooling, 3=dehumidification, 4=fanonly. 5=auto
    },
    "UID": "[MAC ADDRESS]",
    "deviceType": "001",
    "net": {
        "dhcp": "1",
        "gw": "XXX.XXX.XXX.XXX",
        "ip": "XXX.XXX.XXX.XXX",
        "sub": "255.255.255.0"
    },
    "setup": {
        "name": "Device Name",
        "serial": "YYYYYYYYY"
    },
    "success": true,
    "sw": {
        "V": "1.0.42"
    },
    "time": {
        "d": 5,
        "h": 17,
        "i": 40,
        "m": 2,
        "y": 2022
    }
}

```

#### AirLeaf Commands and Statuses
|Action|HTTP Verb|API Endpoint|Data Needed (`Content-Type: application/json`)|Extra Info|
|---|---|---|---|---|
|Status|GET|/status||Returns json object|
|Power ON|POST|/power/on|||
|Power OFF|POST|/power/off|||
|Scheduling ON|POST|/set/calendar/on|||
|Scheduling OFF (Manual)|POST|/set/calendar/off|||
|Set point|POST|/set/setpoint|temp=240|On AirLeaf, temperatures are multiplied by 10|
|Fan Function Auto|POST|/set/function/auto|value=1||
|Fan Function Night|POST|/set/function/night|value=1||
|Fan Function Min|POST|/set/function/min|value=1||
|Fan Function Max|POST|/set/function/max|value=1||
|Cooling|POST|/set/mode/cooling|||
|Heating|POST|/set/mode/heating|||


JSON returned by status endpoint:
```json
{
  "success": true,
  "sw": {
    "V": "1.0.3"
  },
  "UID": "f4:cf:a2:5f:29:ef",
  "deviceType": "002",
  "time": {
    "d": 18,
    "m": 10,
    "y": 2022,
    "h": 6,
    "i": 14
  },
  "net": {
    "gw": "XXX.XXX.XXX.XXX",
    "ip": "XXX.XXX.XXX.XXX",
    "sub": "255.255.255.0"
    "dhcp": "1"
  },
  "setup": {
    "name": "Device Name",
    "serial": "YYYYYYYYY"
  },
  "RESULT": {
    "sp": 200,                        <--- Temperature Set point (x10)
    "wm": 3,                          <--- Working Mode: 3=heating. 5=cooling
    "fn": 1,                          <--- Fan Function: 1=auto, 2=night, 3=min, 4=max
    "kl": 0,
    "lastworkingModeSet": 0,
    "ps": 0,                          <--- Power: 0=off, 1=on
    "cm": 0,                          <--- Scheduling Mode: 0=off, 1=on
    "a": [],
    "ta": 210,                        <--- Ambient Temperature (x10)
    "tw": 219,                        <--- Water Temperature (x10)
    "ns": 0,
    "cloudStatus": 4,
    "connectionStatus": 2,
    "cloudConfig": 1,
    "timerStatus": 0,
    "inputFlags": 0,
    "ncc": 0,
    "lcc": 0,
    "pwd": "",
    "heap": 11496,
    "ccv": 0,
    "cci": 0,
    "daynumber": 0,
    "uptime": 90675,
    "fclFw": 24,
    "uscm": 0,
    "lastRefresh": 2
  }
}

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/danielrivard/innova-controls",
    "name": "innova-controls",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9, <4",
    "maintainer_email": "",
    "keywords": "development,home automation,library,innova",
    "author": "Daniel Rivard",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/0d/b6/73b2710fdd6e28b6ee49d28c689179f0c31ed024939ddb827bf5bc60d610/innova-controls-2.2.1.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/innova-controls.svg)](https://badge.fury.io/py/innova-controls)\n\n# Innova Control API\n\nTested on a [Innova 2.0 unit](https://www.innovaenergie.com/en/products/air-conditioning-without-outdoor-unit/2.0-verticale/2.0/)\n\nAlso supports [AirLeaf](https://www.innovaenergie.com/en/products/fancoils/airleaf/)\n\n## Installation\n``` pip install innova_controls```\n\n## Innova class usage\nSee [test_main.py](test_main.py) for some example usage. \n\nThis is far from perfect documentation, but it is a start.\n\n## Communication protocol\n\n### Local Mode\n\nAll commands are sent to the unit itself through http at its network IP address: **http://[IP_ADDRESS]/api/v/1**.\n\n### Cloud Mode\n\nCommands are sent to Innova's cloud services at **https://innovaenergie.cloud/api/v/1** (or **https://fancoil.innovaenergie.cloud/api/v/1** for AirLeaf, but currently not working). The serial number and the MAC Address of the unit are needed when using cloud mode.\n\nThe following custom http headers are added to requests to identify units\n  * \"X-serial\": UNIT_SERIAL_NUMBER\n  * \"X-UID\": UNIT_MAC_ADDRESS\n\n### Protocol definition\n\nWe just need to append the following commands and parameters where needed.\n\nEx: ```curl http://192.168.1.155/api/v/1/status```\n\nIt is highly recommended to set the IP of your unit to a static DHCP address.\n\n#### 2.0 Commands and Statuses\n|Action|HTTP Verb|API Endpoint|Data Needed (`Content-Type: application/x-www-form-urlencoded`)|Extra Info|\n|---|---|---|---|---|\n|Status|GET|/status||Returns json object|\n|Power ON|POST|/power/on|||\n|Power OFF|POST|/power/off|||\n|Scheduling ON|POST|/set/calendar/on|||\n|Scheduling OFF (Manual)|POST|/set/calendar/off|||\n|Night Mode ON|POST|/set/feature/night|value=1||\n|Night Mode OFF|POST|/set/feature/night|value=0||\n|Set point|POST|/set/setpoint|p_temp=24||\n|Rotation ON|POST|/set/feature/rotation|value=0||\n|Rotation OFF|POST|/set/feature/rotation|value=7||\n|Fan Speed|POST|/set/fan|value=[0-4]|0=auto,1=low,2=med,3=high,4=high++|\n|Cooling|POST|/set/mode/cooling|||\n|Heating|POST|/set/mode/heating|||\n|Dehumidification|POST|/set/mode/dehumidification|||\n|Fan Only|POST|/set/mode/fanonly|||\n|Auto|POST|/set/mode/auto|||\n\n\nJSON returned by status endpoint:\n```json\n{\n    \"RESULT\": {\n        \"a\": [],\n        \"cci\": 0,\n        \"ccv\": 0,\n        \"cfg_lastWorkingMode\": 4,\n        \"cloudConfig\": 1,\n        \"cloudStatus\": 4,\n        \"cm\": 0,                       <--- Scheduling Mode: 0=off, 1=on\n        \"connectionStatus\": 2,\n        \"coolingDisabled\": 0,\n        \"cp\": 0,\n        \"daynumber\": 0,\n        \"fr\": 7,                       <--- Fan Rotation: 0=on, 7=off\n        \"fs\": 0,                       <--- Fan Speed: 0=auto, 1=low, 2=med, 3=high, 4=high++\n        \"heap\": 11760,\n        \"heatingDisabled\": 1,\n        \"heatingResistance\": 0,\n        \"hotelMode\": 0,\n        \"inputFlags\": 0,\n        \"kl\": 0,\n        \"lastRefresh\": 3956,\n        \"ncc\": 0,\n        \"nm\": 0,                        <--- Night Mode: 0=off, 1=on\n        \"ns\": 0,\n        \"ps\": 0,                        <--- Power: 0=off, 1=on\n        \"pwd\": \"************\",\n        \"sp\": 26,                       <--- Temperature Set point\n        \"t\": 16,                        <--- Ambient Temperature\n        \"timerStatus\": 0,\n        \"uptime\": 159660,\n        \"uscm\": 0,\n        \"wm\": 4                         <--- Working Mode: 0=heating, 1=cooling, 3=dehumidification, 4=fanonly. 5=auto\n    },\n    \"UID\": \"[MAC ADDRESS]\",\n    \"deviceType\": \"001\",\n    \"net\": {\n        \"dhcp\": \"1\",\n        \"gw\": \"XXX.XXX.XXX.XXX\",\n        \"ip\": \"XXX.XXX.XXX.XXX\",\n        \"sub\": \"255.255.255.0\"\n    },\n    \"setup\": {\n        \"name\": \"Device Name\",\n        \"serial\": \"YYYYYYYYY\"\n    },\n    \"success\": true,\n    \"sw\": {\n        \"V\": \"1.0.42\"\n    },\n    \"time\": {\n        \"d\": 5,\n        \"h\": 17,\n        \"i\": 40,\n        \"m\": 2,\n        \"y\": 2022\n    }\n}\n\n```\n\n#### AirLeaf Commands and Statuses\n|Action|HTTP Verb|API Endpoint|Data Needed (`Content-Type: application/json`)|Extra Info|\n|---|---|---|---|---|\n|Status|GET|/status||Returns json object|\n|Power ON|POST|/power/on|||\n|Power OFF|POST|/power/off|||\n|Scheduling ON|POST|/set/calendar/on|||\n|Scheduling OFF (Manual)|POST|/set/calendar/off|||\n|Set point|POST|/set/setpoint|temp=240|On AirLeaf, temperatures are multiplied by 10|\n|Fan Function Auto|POST|/set/function/auto|value=1||\n|Fan Function Night|POST|/set/function/night|value=1||\n|Fan Function Min|POST|/set/function/min|value=1||\n|Fan Function Max|POST|/set/function/max|value=1||\n|Cooling|POST|/set/mode/cooling|||\n|Heating|POST|/set/mode/heating|||\n\n\nJSON returned by status endpoint:\n```json\n{\n  \"success\": true,\n  \"sw\": {\n    \"V\": \"1.0.3\"\n  },\n  \"UID\": \"f4:cf:a2:5f:29:ef\",\n  \"deviceType\": \"002\",\n  \"time\": {\n    \"d\": 18,\n    \"m\": 10,\n    \"y\": 2022,\n    \"h\": 6,\n    \"i\": 14\n  },\n  \"net\": {\n    \"gw\": \"XXX.XXX.XXX.XXX\",\n    \"ip\": \"XXX.XXX.XXX.XXX\",\n    \"sub\": \"255.255.255.0\"\n    \"dhcp\": \"1\"\n  },\n  \"setup\": {\n    \"name\": \"Device Name\",\n    \"serial\": \"YYYYYYYYY\"\n  },\n  \"RESULT\": {\n    \"sp\": 200,                        <--- Temperature Set point (x10)\n    \"wm\": 3,                          <--- Working Mode: 3=heating. 5=cooling\n    \"fn\": 1,                          <--- Fan Function: 1=auto, 2=night, 3=min, 4=max\n    \"kl\": 0,\n    \"lastworkingModeSet\": 0,\n    \"ps\": 0,                          <--- Power: 0=off, 1=on\n    \"cm\": 0,                          <--- Scheduling Mode: 0=off, 1=on\n    \"a\": [],\n    \"ta\": 210,                        <--- Ambient Temperature (x10)\n    \"tw\": 219,                        <--- Water Temperature (x10)\n    \"ns\": 0,\n    \"cloudStatus\": 4,\n    \"connectionStatus\": 2,\n    \"cloudConfig\": 1,\n    \"timerStatus\": 0,\n    \"inputFlags\": 0,\n    \"ncc\": 0,\n    \"lcc\": 0,\n    \"pwd\": \"\",\n    \"heap\": 11496,\n    \"ccv\": 0,\n    \"cci\": 0,\n    \"daynumber\": 0,\n    \"uptime\": 90675,\n    \"fclFw\": 24,\n    \"uscm\": 0,\n    \"lastRefresh\": 2\n  }\n}\n\n```\n",
    "bugtrack_url": null,
    "license": "Apache",
    "summary": "Innova Air Conditioner Control API",
    "version": "2.2.1",
    "project_urls": {
        "Bug Reports": "https://github.com/danielrivard/innova-controls/issues",
        "Homepage": "https://github.com/danielrivard/innova-controls",
        "Source": "https://github.com/danielrivard/innova-controls/"
    },
    "split_keywords": [
        "development",
        "home automation",
        "library",
        "innova"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a1603b8473a0d08e10f139ccaf7c5565102b4e2005a3cd6cbcd9c7d1166ef95",
                "md5": "56d285f6eab83ac33ad3d031ffd879ca",
                "sha256": "59469e8a8a6200578966a11239c0e64669ac5f6ce070242aaccf9077c32d0f9b"
            },
            "downloads": -1,
            "filename": "innova_controls-2.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "56d285f6eab83ac33ad3d031ffd879ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9, <4",
            "size": 15995,
            "upload_time": "2024-02-22T03:29:36",
            "upload_time_iso_8601": "2024-02-22T03:29:36.413599Z",
            "url": "https://files.pythonhosted.org/packages/2a/16/03b8473a0d08e10f139ccaf7c5565102b4e2005a3cd6cbcd9c7d1166ef95/innova_controls-2.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0db673b2710fdd6e28b6ee49d28c689179f0c31ed024939ddb827bf5bc60d610",
                "md5": "807b3ce3a12c364c6197853373c34ac5",
                "sha256": "d3746ff49cb0bf2f100fb5d4933ab4a829543751d2c5a22ba161095e09f3c05c"
            },
            "downloads": -1,
            "filename": "innova-controls-2.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "807b3ce3a12c364c6197853373c34ac5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9, <4",
            "size": 15137,
            "upload_time": "2024-02-22T03:29:38",
            "upload_time_iso_8601": "2024-02-22T03:29:38.043674Z",
            "url": "https://files.pythonhosted.org/packages/0d/b6/73b2710fdd6e28b6ee49d28c689179f0c31ed024939ddb827bf5bc60d610/innova-controls-2.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-22 03:29:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "danielrivard",
    "github_project": "innova-controls",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "retry2",
            "specs": [
                [
                    "==",
                    "0.9.5"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    "==",
                    "3.9.3"
                ]
            ]
        }
    ],
    "lcname": "innova-controls"
}
        
Elapsed time: 0.18496s