pyupway


Namepyupway JSON
Version 0.0.13 PyPI version JSON
download
home_page
SummaryRead values from MyUpway cloud service
upload_time2024-03-05 08:39:59
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords heat pump jäspi myupway nibe
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyupway

Simple utility to read values from either MyUpway or MyUplink cloud service. Currently works only with one system at a time.

When using MyUplink, first visit https://dev.myuplink.com/apps and create new app in order to get the API credentials. Note that History data is not supported with MyUplink service.

## Supported devices

Currently pyupway has been tested on following units

- Jäspi MCU40
- Jäspi Tehowatti AIR
- Jäspi Basic Split 8/12 kW
- Nibe Metro-air 330

## Installation

Install using pip

```
pip install pyupway
```

## Usage

Basic usage is to import MyUpway, MyUpwayConfig and DataService from pyupway. Then in Config specify which DataService are you using.

### MyUpway

Initialize MyUpwayConfig with proper settings and use it to initialize MyUpway itself. You can obtain heat pump id from the MyUpway UI URL

```
https://www.myupway.com/System/<heatpumpId>/Status/Overview
```

```python
from pyupway import MyUpway, MyUpwayConfig, Variable, DataService

config = MyUpwayConfig(dataservice=DataService.MYUPWAY, username="<username>", password="<password>", heatpump_id=123456)

myupway = MyUpway(config)

print(myupway.get_current_values([Variable.HIGH_PRESSURE_SENSOR]))
print(myupway.get_history_values(Variable.EXTERNAL_FLOW_TEMP, startDate=datetime(2023,6,1,0,0,0), stopDate=datetime(2023,6,4,0,0,0)))

```

### MyUplink

Get Client ID and Client Secret from MyUplink dev site: https://dev.myuplink.com/apps

Initialize MyUpwayConfig with proper settings and use it to initialize MyUpway itself.

```
https://www.myupway.com/System/<heatpumpId>/Status/Overview
```

```python
from pyupway import MyUpway, MyUpwayConfig, Variable, DataService

config = MyUpwayConfig(dataservice=DataService.MYUPLINK, client_id="<client_id>", client_secret="<client_secret>")

myupway = MyUpway(config)

print(myupway.get_current_values([Variable.HIGH_PRESSURE_SENSOR]))

```

### Data classes

Results are returned in defined dataclasses

#### VariableValue

```python
from pyupway import VariableValue
```

| Field      | Type                                                |
| ---------- | --------------------------------------------------- |
| Id         | int                                                 |
| Name       | str                                                 |
| Enumerator | Variable                                            |
| Value      | int &#124; float &#124; str &#124; bool &#124; None |
| Unit       | str &#124; None                                     |

#### VariableHistoryValue

```python
from pyupway import VariableHistoryValue
```

| Field | Type                                                |
| ----- | --------------------------------------------------- |
| Value | int &#124; float &#124; str &#124; bool &#124; None |
| Unit  | str &#124; None                                     |
| Date  | datetime                                            |

## Data Services

| **Value** | **Meaning**                         |
| --------- | ----------------------------------- |
| MYUPWAY   | Download data from MyUpway service  |
| MYUPLINK  | Download data from MyUplink service |

## Variables available

| Enum Name                           | Variable ID | History Data |
| ----------------------------------- | ----------- | ------------ |
| AVG_OUTDOOR_TEMP                    | 40067       | yes          |
| HOT_WATER_CHARGING                  | 40014       | TBT          |
| HOT_WATER_TOP                       | 40013       | TBT          |
| INDOOR_UNIT_OUTDOOR_TEMP            | 40004       | yes          |
| CURRENT_BE1                         | 40083       | yes          |
| CURRENT_BE2                         | 40081       | yes          |
| CURRENT_BE3                         | 40079       | yes          |
| DEGREE_MINUTES                      | 43005       | yes          |
| EXTERNAL_ADJUSTMENT                 | 43161       | no           |
| FLOOR_DRYING_FUNCTION               | 47276       | no           |
| CALCULATED_FLOW_TEMP                | 43009       | yes          |
| EXTERNAL_FLOW_TEMP                  | 40071       | yes          |
| EXTERNAL_RETURN_TEMP                | 40152       | yes          |
| HEAT_MEDIUM_FLOW                    | 40008       | TBT          |
| HEAT_RETURN_TEMP                    | 40012       | TBT          |
| ROOM_TEMPERATURE                    | 40033       | yes          |
| ADDITION_BLOCKED                    | 10033       | no           |
| ADDITION_MAX_STEP                   | 47613       | no           |
| ADDITION_STATUS                     | 43091       | yes          |
| ADDITION_FUSE_SIZE                  | 47214       | no           |
| ADDITION_TIME_FACTOR                | 43081       | TBT          |
| ADDITION_ELECTRICAL_ADDITION_POWER  | 43084       | TBT          |
| ADDITION_SET_MAX_ELECTRICAL_ADD     | 47212       | TBT          |
| ADDITION_TEMPERATURE                | 40121       | TBT          |
| ENERGY_COOLING_COMPRESSOR_ONLY      | 44302       | TBT          |
| ENERGY_HEATING_COMPRESSOR_ONLY      | 44308       | TBT          |
| ENERGY_HEATING_INT_ADD_INCL         | 44300       | TBT          |
| ENERGY_HOTWATER_COMPRESSOR_ONLY     | 44306       | TBT          |
| ENERGY_HW_INCL_INT_ADD              | 44298       | TBT          |
| ENERGY_POOL_COMPRESSOR_ONLY         | 44304       | TBT          |
| ENERGY_FLOW                         | 40072       | TBT          |
| AUX1                                | 47411       | no           |
| AUX2                                | 47410       | no           |
| AUX3                                | 47409       | no           |
| AUX4                                | 47408       | no           |
| AUX5                                | 47407       | no           |
| AUX6                                | 48366       | no           |
| X7                                  | 47412       | no           |
| COUNTRY                             | 48745       | no           |
| DEFROSTING                          | 44703       | no           |
| CHARGE_PUMP_SPEED                   | 44396       | yes          |
| OUTDOOR_UNIT_OUTDOOR_TEMP           | 44362       | yes          |
| COMPRESSOR_BLOCKED                  | 10014       | no           |
| COMPRESSOR_STARTS                   | 44069       | yes          |
| COMPRESSOR_PROTECTION_MODE          | 44702       | no           |
| CONDENSER_OUT                       | 44058       | yes          |
| EVAPORATOR                          | 44363       | yes          |
| HOT_GAS                             | 44059       | yes          |
| LIQUID_LINE                         | 44060       | yes          |
| RETURN_TEMP                         | 44055       | yes          |
| SUCTION_GAS                         | 44061       | yes          |
| HIGH_PRESSURE_SENSOR                | 44699       | yes          |
| LOW_PRESSURE_SENSOR                 | 44700       | yes          |
| COMPRESSOR_OPERATING_TIME           | 44071       | yes          |
| COMPRESSOR_OPERATING_TIME_HOT_WATER | 44073       | yes          |
| COMPRESSOR_RUN_TIME_COOLING         | 40737       | yes          |
| CURRENT_COMPRESSOR_FREQUENCY        | 44701       | yes          |
| REQUESTED_COMPRESSOR_FREQUENCY      | 40782       | no           |
| VERSION                             | 44014       | no           |
| SMART_PRICE_STATUS                  | 44908       | ??           |
| SMART_PRICE_VALUE                   | 10069       | ??           |
| SMART_PRICE_FACTOR                  | 44896       | ??           |

## Functions

### get_current_values

Returns the current values for selected variables.
Provide variables as a list of Variable enums.

Example

```python
myupway.get_current_values([Variable.HIGH_PRESSURE_SENSOR, Variable.AVG_OUTDOOR_TEMP])
```

### get_history_values

Returns the historical values for specified timerange. NOT IMPLEMENTED FOR MYUPLINK!

Example

```python
myupway.get_history_values(Variable.EXTERNAL_FLOW_TEMP, startDate=datetime(2023,6,1,0,0,0), stopDate=datetime(2023,6,4,0,0,0))
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyupway",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Heat pump,J\u00e4spi,MyUpway,Nibe",
    "author": "",
    "author_email": "Jussi Rosenberg <jussi.rosenberg@iki.fi>",
    "download_url": "https://files.pythonhosted.org/packages/de/28/2388d5ff41bb722d5fafc0dd8de29780373a8fdf5c5dbe2fe653003c5bf8/pyupway-0.0.13.tar.gz",
    "platform": null,
    "description": "# pyupway\n\nSimple utility to read values from either MyUpway or MyUplink cloud service. Currently works only with one system at a time.\n\nWhen using MyUplink, first visit https://dev.myuplink.com/apps and create new app in order to get the API credentials. Note that History data is not supported with MyUplink service.\n\n## Supported devices\n\nCurrently pyupway has been tested on following units\n\n- J\u00e4spi MCU40\n- J\u00e4spi Tehowatti AIR\n- J\u00e4spi Basic Split 8/12 kW\n- Nibe Metro-air 330\n\n## Installation\n\nInstall using pip\n\n```\npip install pyupway\n```\n\n## Usage\n\nBasic usage is to import MyUpway, MyUpwayConfig and DataService from pyupway. Then in Config specify which DataService are you using.\n\n### MyUpway\n\nInitialize MyUpwayConfig with proper settings and use it to initialize MyUpway itself. You can obtain heat pump id from the MyUpway UI URL\n\n```\nhttps://www.myupway.com/System/<heatpumpId>/Status/Overview\n```\n\n```python\nfrom pyupway import MyUpway, MyUpwayConfig, Variable, DataService\n\nconfig = MyUpwayConfig(dataservice=DataService.MYUPWAY, username=\"<username>\", password=\"<password>\", heatpump_id=123456)\n\nmyupway = MyUpway(config)\n\nprint(myupway.get_current_values([Variable.HIGH_PRESSURE_SENSOR]))\nprint(myupway.get_history_values(Variable.EXTERNAL_FLOW_TEMP, startDate=datetime(2023,6,1,0,0,0), stopDate=datetime(2023,6,4,0,0,0)))\n\n```\n\n### MyUplink\n\nGet Client ID and Client Secret from MyUplink dev site: https://dev.myuplink.com/apps\n\nInitialize MyUpwayConfig with proper settings and use it to initialize MyUpway itself.\n\n```\nhttps://www.myupway.com/System/<heatpumpId>/Status/Overview\n```\n\n```python\nfrom pyupway import MyUpway, MyUpwayConfig, Variable, DataService\n\nconfig = MyUpwayConfig(dataservice=DataService.MYUPLINK, client_id=\"<client_id>\", client_secret=\"<client_secret>\")\n\nmyupway = MyUpway(config)\n\nprint(myupway.get_current_values([Variable.HIGH_PRESSURE_SENSOR]))\n\n```\n\n### Data classes\n\nResults are returned in defined dataclasses\n\n#### VariableValue\n\n```python\nfrom pyupway import VariableValue\n```\n\n| Field      | Type                                                |\n| ---------- | --------------------------------------------------- |\n| Id         | int                                                 |\n| Name       | str                                                 |\n| Enumerator | Variable                                            |\n| Value      | int &#124; float &#124; str &#124; bool &#124; None |\n| Unit       | str &#124; None                                     |\n\n#### VariableHistoryValue\n\n```python\nfrom pyupway import VariableHistoryValue\n```\n\n| Field | Type                                                |\n| ----- | --------------------------------------------------- |\n| Value | int &#124; float &#124; str &#124; bool &#124; None |\n| Unit  | str &#124; None                                     |\n| Date  | datetime                                            |\n\n## Data Services\n\n| **Value** | **Meaning**                         |\n| --------- | ----------------------------------- |\n| MYUPWAY   | Download data from MyUpway service  |\n| MYUPLINK  | Download data from MyUplink service |\n\n## Variables available\n\n| Enum Name                           | Variable ID | History Data |\n| ----------------------------------- | ----------- | ------------ |\n| AVG_OUTDOOR_TEMP                    | 40067       | yes          |\n| HOT_WATER_CHARGING                  | 40014       | TBT          |\n| HOT_WATER_TOP                       | 40013       | TBT          |\n| INDOOR_UNIT_OUTDOOR_TEMP            | 40004       | yes          |\n| CURRENT_BE1                         | 40083       | yes          |\n| CURRENT_BE2                         | 40081       | yes          |\n| CURRENT_BE3                         | 40079       | yes          |\n| DEGREE_MINUTES                      | 43005       | yes          |\n| EXTERNAL_ADJUSTMENT                 | 43161       | no           |\n| FLOOR_DRYING_FUNCTION               | 47276       | no           |\n| CALCULATED_FLOW_TEMP                | 43009       | yes          |\n| EXTERNAL_FLOW_TEMP                  | 40071       | yes          |\n| EXTERNAL_RETURN_TEMP                | 40152       | yes          |\n| HEAT_MEDIUM_FLOW                    | 40008       | TBT          |\n| HEAT_RETURN_TEMP                    | 40012       | TBT          |\n| ROOM_TEMPERATURE                    | 40033       | yes          |\n| ADDITION_BLOCKED                    | 10033       | no           |\n| ADDITION_MAX_STEP                   | 47613       | no           |\n| ADDITION_STATUS                     | 43091       | yes          |\n| ADDITION_FUSE_SIZE                  | 47214       | no           |\n| ADDITION_TIME_FACTOR                | 43081       | TBT          |\n| ADDITION_ELECTRICAL_ADDITION_POWER  | 43084       | TBT          |\n| ADDITION_SET_MAX_ELECTRICAL_ADD     | 47212       | TBT          |\n| ADDITION_TEMPERATURE                | 40121       | TBT          |\n| ENERGY_COOLING_COMPRESSOR_ONLY      | 44302       | TBT          |\n| ENERGY_HEATING_COMPRESSOR_ONLY      | 44308       | TBT          |\n| ENERGY_HEATING_INT_ADD_INCL         | 44300       | TBT          |\n| ENERGY_HOTWATER_COMPRESSOR_ONLY     | 44306       | TBT          |\n| ENERGY_HW_INCL_INT_ADD              | 44298       | TBT          |\n| ENERGY_POOL_COMPRESSOR_ONLY         | 44304       | TBT          |\n| ENERGY_FLOW                         | 40072       | TBT          |\n| AUX1                                | 47411       | no           |\n| AUX2                                | 47410       | no           |\n| AUX3                                | 47409       | no           |\n| AUX4                                | 47408       | no           |\n| AUX5                                | 47407       | no           |\n| AUX6                                | 48366       | no           |\n| X7                                  | 47412       | no           |\n| COUNTRY                             | 48745       | no           |\n| DEFROSTING                          | 44703       | no           |\n| CHARGE_PUMP_SPEED                   | 44396       | yes          |\n| OUTDOOR_UNIT_OUTDOOR_TEMP           | 44362       | yes          |\n| COMPRESSOR_BLOCKED                  | 10014       | no           |\n| COMPRESSOR_STARTS                   | 44069       | yes          |\n| COMPRESSOR_PROTECTION_MODE          | 44702       | no           |\n| CONDENSER_OUT                       | 44058       | yes          |\n| EVAPORATOR                          | 44363       | yes          |\n| HOT_GAS                             | 44059       | yes          |\n| LIQUID_LINE                         | 44060       | yes          |\n| RETURN_TEMP                         | 44055       | yes          |\n| SUCTION_GAS                         | 44061       | yes          |\n| HIGH_PRESSURE_SENSOR                | 44699       | yes          |\n| LOW_PRESSURE_SENSOR                 | 44700       | yes          |\n| COMPRESSOR_OPERATING_TIME           | 44071       | yes          |\n| COMPRESSOR_OPERATING_TIME_HOT_WATER | 44073       | yes          |\n| COMPRESSOR_RUN_TIME_COOLING         | 40737       | yes          |\n| CURRENT_COMPRESSOR_FREQUENCY        | 44701       | yes          |\n| REQUESTED_COMPRESSOR_FREQUENCY      | 40782       | no           |\n| VERSION                             | 44014       | no           |\n| SMART_PRICE_STATUS                  | 44908       | ??           |\n| SMART_PRICE_VALUE                   | 10069       | ??           |\n| SMART_PRICE_FACTOR                  | 44896       | ??           |\n\n## Functions\n\n### get_current_values\n\nReturns the current values for selected variables.\nProvide variables as a list of Variable enums.\n\nExample\n\n```python\nmyupway.get_current_values([Variable.HIGH_PRESSURE_SENSOR, Variable.AVG_OUTDOOR_TEMP])\n```\n\n### get_history_values\n\nReturns the historical values for specified timerange. NOT IMPLEMENTED FOR MYUPLINK!\n\nExample\n\n```python\nmyupway.get_history_values(Variable.EXTERNAL_FLOW_TEMP, startDate=datetime(2023,6,1,0,0,0), stopDate=datetime(2023,6,4,0,0,0))\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Read values from MyUpway cloud service",
    "version": "0.0.13",
    "project_urls": {
        "Changelog": "https://github.com/lemanjo/pyupway/blob/master/changelog.md",
        "Homepage": "https://github.com/lemanjo/pyupway"
    },
    "split_keywords": [
        "heat pump",
        "j\u00e4spi",
        "myupway",
        "nibe"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4280c4dbcd457bcc1c7c24254a22b923779598853aaff9b9e6d5426c41774b44",
                "md5": "556a528a3c120f45554ebd0abfae1f77",
                "sha256": "d5076a4d912fdd93f3e81c0ddf7bc7e6b16db9d08c92f9cede2e1ad1f67c71f7"
            },
            "downloads": -1,
            "filename": "pyupway-0.0.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "556a528a3c120f45554ebd0abfae1f77",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 13977,
            "upload_time": "2024-03-05T08:39:57",
            "upload_time_iso_8601": "2024-03-05T08:39:57.393918Z",
            "url": "https://files.pythonhosted.org/packages/42/80/c4dbcd457bcc1c7c24254a22b923779598853aaff9b9e6d5426c41774b44/pyupway-0.0.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "de282388d5ff41bb722d5fafc0dd8de29780373a8fdf5c5dbe2fe653003c5bf8",
                "md5": "6df1da8b937d467f9110688dfe6be32c",
                "sha256": "11ab9dfc8269d49f08a27e811a9ea74ae04dec1253cf0408e91c7eb623a7fcbc"
            },
            "downloads": -1,
            "filename": "pyupway-0.0.13.tar.gz",
            "has_sig": false,
            "md5_digest": "6df1da8b937d467f9110688dfe6be32c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 10266,
            "upload_time": "2024-03-05T08:39:59",
            "upload_time_iso_8601": "2024-03-05T08:39:59.367544Z",
            "url": "https://files.pythonhosted.org/packages/de/28/2388d5ff41bb722d5fafc0dd8de29780373a8fdf5c5dbe2fe653003c5bf8/pyupway-0.0.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-05 08:39:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lemanjo",
    "github_project": "pyupway",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyupway"
}
        
Elapsed time: 0.21186s