GithubHelp home page GithubHelp logo

python-ariston-api's People

Contributors

domenicoblanco avatar fabiopellegrin avatar fustom avatar gamba69 avatar robertomontinaro80 avatar wuede avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

python-ariston-api's Issues

Add Lydos support (WheType = 3)

Lydos devices are not supported by the current version. Please consider adding support.

This quick fix worked for my tests:

From 5d2d289f877973f1f66d28c06bdf103684b4abdb Mon Sep 17 00:00:00 2001
From: Otto <[email protected]>
Date: Sun, 24 Dec 2023 21:36:01 +0200
Subject: [PATCH] Add Lydos support

---
 ariston/__init__.py | 1 +
 ariston/const.py    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/ariston/__init__.py b/ariston/__init__.py
index 691a111..1672184 100644
--- a/ariston/__init__.py
+++ b/ariston/__init__.py
@@ -25,6 +25,7 @@ _LOGGER = logging.getLogger(__name__)
 _MAP_WHE_TYPES_TO_CLASS = {
     WheType.Evo.value: AristonEvoDevice,
     WheType.LydosHybrid.value: AristonLydosHybridDevice,
+    WheType.Lydos.value: AristonEvoDevice,
     WheType.NuosSplit.value: AristonNuosSplitDevice,
     WheType.Andris2.value: AristonEvoDevice,
     WheType.Evo2.value: AristonEvoDevice,
diff --git a/ariston/const.py b/ariston/const.py
index 7b0b0c2..b6db260 100644
--- a/ariston/const.py
+++ b/ariston/const.py
@@ -236,6 +236,7 @@ class WheType(Enum):
     Unknown = -1
     Evo = 1
     LydosHybrid = 2
+    Lydos = 3
     NuosSplit = 4
     Andris2 = 5
     Evo2 = 6
-- 
2.39.3 (Apple Git-145)

Error on Integration of Ariston Velis Lux Wi-Fi

Logger: ariston
Source: /usr/local/lib/python3.10/site-packages/ariston/init.py:120
First occurred: 00:53:59 (8 occurrences)
Last logged: 01:02:32

Unsupported whe type 7
NoneType: None

I am running following HA version:

Home Assistant 2023.5.4
Supervisor 2023.04.1
Operating System 9.0.dev20220810
Frontend 20230503.3 - latest

IndexError: list index out of range

FYI, just added the device and got an error, probably need to check if the list is empty

homeassistant_1  | 2022-12-30 21:12:47.081 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform ariston
homeassistant_1  | Traceback (most recent call last):
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
homeassistant_1  |     await asyncio.gather(*tasks)
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
homeassistant_1  |     await entity.add_to_platform_finish()
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 789, in add_to_platform_finish
homeassistant_1  |     self.async_write_ha_state()
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
homeassistant_1  |     self._async_write_ha_state()
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
homeassistant_1  |     state = self._stringify_state(available)
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
homeassistant_1  |     if (state := self.state) is None:
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 680, in state
homeassistant_1  |     value = self.native_value
homeassistant_1  |   File "/config/custom_components/ariston/sensor.py", line 61, in native_value
homeassistant_1  |     return getattr(self.device, self.entity_description.get_native_value.__name__)()
homeassistant_1  |   File "/usr/local/lib/python3.10/site-packages/ariston/galevo_device.py", line 552, in get_gas_consumption_for_heating_last_month
homeassistant_1  |     return energy_account_last_month[0]["gas"]
homeassistant_1  | IndexError: list index out of range
homeassistant_1  | 2022-12-30 21:12:47.096 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up ariston platform for sensor
homeassistant_1  | Traceback (most recent call last):
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
homeassistant_1  |     await asyncio.gather(*pending)
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
homeassistant_1  |     await asyncio.gather(*tasks)
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
homeassistant_1  |     await entity.add_to_platform_finish()
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 789, in add_to_platform_finish
homeassistant_1  |     self.async_write_ha_state()
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
homeassistant_1  |     self._async_write_ha_state()
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
homeassistant_1  |     state = self._stringify_state(available)
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
homeassistant_1  |     if (state := self.state) is None:
homeassistant_1  |   File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 680, in state
homeassistant_1  |     value = self.native_value
homeassistant_1  |   File "/config/custom_components/ariston/sensor.py", line 61, in native_value
homeassistant_1  |     return getattr(self.device, self.entity_description.get_native_value.__name__)()
homeassistant_1  |   File "/usr/local/lib/python3.10/site-packages/ariston/galevo_device.py", line 552, in get_gas_consumption_for_heating_last_month
homeassistant_1  |     return energy_account_last_month[0]["gas"]
homeassistant_1  | IndexError: list index out of range

Unsupported whe type 1 - Velis Evo WiFi

Testing in python:

import ariston
raw_devices = ariston.discover(...)
print(raw_devices[0]['gw'])
device = ariston.hello(...)
Unsupported whe type 1
NoneType: None

Manually running the API wrapper from python and checking the discovery result it gives:

{... 'sys': 4, 'wheType': 1, 'wheModelType': 1, ...}

The problem is with this constant:

So after changing the above constant (from 6 to 1), it successfully returns the device object by calling ariston.hello()

See related issue:
fustom/ariston-remotethermo-home-assistant-v3#85 (comment)

Logout

Hi... Thank You in advance for your great library!
I'm testing it with my Genus One to understand the best configuration for the winter.
Why isn't there a Logout/Disconnect method for closing the session?

Ariston Andris2 Top Wifi (Water Heater) unsupported whe type 5

Hi I have an Ariston Andris2 Top it used to work with chomupashchuk's integreation as a Lydos device, with the v3 it gets detected but i'm seeing an error "Unsupported whe type 5" can i make edits anywhere to get it recognized as a lydos device?

Not working with Elco Aquatop

Logger: ariston
Source: /usr/local/lib/python3.10/site-packages/ariston/init.py:117
First occurred: 17:59:58 (2 occurrences)
Last logged: 18:01:47

Unsupported system type 5
NoneType: None

Unsupported whe type 7

Hi @fustom,
I have a boiler velis evo 50
Can you tell me what can be done about my mistake?

Logger: ariston
Source: /usr/local/lib/python3.10/site-packages/ariston/init.py:120
First occurred: 16:29:33 (2 occurrences)
Last logged: 16:30:17

Unsupported whe type 7
NoneType: None

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.