Name | pyupway JSON |
Version |
0.0.17
JSON |
| download |
home_page | None |
Summary | Read values from MyUpway cloud service |
upload_time | 2024-07-09 12:11:35 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
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
- Nibe F470
## 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 | float | str | bool | None |
| Unit | str | None |
| updatedAt | datetime | None |
#### VariableHistoryValue
```python
from pyupway import VariableHistoryValue
```
| Field | Type |
| ----- | --------------------------------------------------- |
| Value | int | float | str | bool | None |
| Unit | str | 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 | ?? |
| COMPRESSOR_EVAPORATOR_TEMP | 40020 | |
| COMPRESSOR_TEMP | 40023 | |
| ADDITION_IMMERSION_HEATER_TEMP | 40024 | |
| AIR_EXHAUST_TEMP | 40025 | |
| AIR_EXTRACT_TEMP | 40026 | |
| SMART_PRICE_MODE | 41929 | |
| DESIRED_HUMIDITY_1 | 42770 | |
| DEFROSTING_TIME | 43066 | |
| FAN_MODE | 43108 | |
| COMPRESSOR_STATUS | 43427 | |
| SMART_PRICE_POOL_OFFSET | 44898 | |
| SMART_PRICE_COOLING_OFFSET | 44899 | |
| OPERATING_MODE | 47137 | |
| DESIRED_HUMIDITY_2 | 49633 | |
| AIR_INCREASED_VENTILATION | 50005 | |
## 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))
```
# Contributors
Thank you for contributing to the project!
- lobstaj
- sulate
Raw data
{
"_id": null,
"home_page": null,
"name": "pyupway",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "Heat pump, J\u00e4spi, MyUpway, Nibe",
"author": null,
"author_email": "Jussi Rosenberg <jussi.rosenberg@iki.fi>",
"download_url": "https://files.pythonhosted.org/packages/62/4c/95b58373dff29a2467bb3f710eba33b9ca5825cec464927158447581a1fe/pyupway-0.0.17.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- Nibe F470\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 | float | str | bool | None |\n| Unit | str | None |\n| updatedAt | datetime | None |\n\n#### VariableHistoryValue\n\n```python\nfrom pyupway import VariableHistoryValue\n```\n\n| Field | Type |\n| ----- | --------------------------------------------------- |\n| Value | int | float | str | bool | None |\n| Unit | str | 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| COMPRESSOR_EVAPORATOR_TEMP | 40020 | |\n| COMPRESSOR_TEMP | 40023 | |\n| ADDITION_IMMERSION_HEATER_TEMP | 40024 | |\n| AIR_EXHAUST_TEMP | 40025 | |\n| AIR_EXTRACT_TEMP | 40026 | |\n| SMART_PRICE_MODE | 41929 | |\n| DESIRED_HUMIDITY_1 | 42770 | |\n| DEFROSTING_TIME | 43066 | |\n| FAN_MODE | 43108 | |\n| COMPRESSOR_STATUS | 43427 | |\n| SMART_PRICE_POOL_OFFSET | 44898 | |\n| SMART_PRICE_COOLING_OFFSET | 44899 | |\n| OPERATING_MODE | 47137 | |\n| DESIRED_HUMIDITY_2 | 49633 | |\n| AIR_INCREASED_VENTILATION | 50005 | |\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# Contributors\nThank you for contributing to the project!\n- lobstaj\n- sulate\n",
"bugtrack_url": null,
"license": null,
"summary": "Read values from MyUpway cloud service",
"version": "0.0.17",
"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": "f1a3d652aa7b9abb1060d26ae0d0ad8090a69bf70b5b1c07eba3b3b06beda7d4",
"md5": "0f9cd5a577b97adef28c09ed7416b655",
"sha256": "29b3bc12b2259635af453770a499ca1af2d6dfc040db895d6c2ff07bfb2b336f"
},
"downloads": -1,
"filename": "pyupway-0.0.17-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0f9cd5a577b97adef28c09ed7416b655",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 15171,
"upload_time": "2024-07-09T12:11:33",
"upload_time_iso_8601": "2024-07-09T12:11:33.517979Z",
"url": "https://files.pythonhosted.org/packages/f1/a3/d652aa7b9abb1060d26ae0d0ad8090a69bf70b5b1c07eba3b3b06beda7d4/pyupway-0.0.17-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "624c95b58373dff29a2467bb3f710eba33b9ca5825cec464927158447581a1fe",
"md5": "fd88809c3aa7558be310e0815ce95a3c",
"sha256": "aacdf4160c79a63695bac04363beaddb23ddbde9d4201de5a5dddc7b2bec9407"
},
"downloads": -1,
"filename": "pyupway-0.0.17.tar.gz",
"has_sig": false,
"md5_digest": "fd88809c3aa7558be310e0815ce95a3c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12121,
"upload_time": "2024-07-09T12:11:35",
"upload_time_iso_8601": "2024-07-09T12:11:35.436013Z",
"url": "https://files.pythonhosted.org/packages/62/4c/95b58373dff29a2467bb3f710eba33b9ca5825cec464927158447581a1fe/pyupway-0.0.17.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-09 12:11:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lemanjo",
"github_project": "pyupway",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyupway"
}