fustom / python-ariston-api Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Pull request published.
2023-03-03 22:15:19.821 ERROR (MainThread) [ariston] Unsupported whe type 5
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)
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
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
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:
python-ariston-api/ariston/const.py
Line 210 in c4c6085
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)
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?
Hopefully fix: fustom/ariston-remotethermo-home-assistant-v3#88
Support Python 3.11
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?
Tracking issue for:
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.