No Success setup for Ariston Lydos Hybrid
Closed this issue · 17 comments
Hi, I have got this thermo water heater and after my configuration, Home assistant got this error:
Uncaught thread exception
Traceback (most recent call last):
File "/config/custom_components/aquaariston/aristonaqua.py", line 1297, in _control_availability_state
self._get_http_data(request_type)
File "/config/custom_components/aquaariston/aristonaqua.py", line 1136, in _get_http_data
self._login_session()
File "/config/custom_components/aquaariston/aristonaqua.py", line 719, in _login_session
if plant_instance["wheType"] == 1 or plant_instance["wheModelType"] == 1:
KeyError: 'wheModelType'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 1254, in run
self.function(*self.args, **self.kwargs)
File "/config/custom_components/aquaariston/aristonaqua.py", line 1308, in _control_availability_state
raise Exception("Getting HTTP data has failed")
Exception: Getting HTTP data has failed
in my configuration.yam i have:
aquaariston:
username: !secret ariston_username
password: !secret ariston_password
store_config_files: true # indicates if to store API data in a folder
switches:
- eco # switches ECO mode
- power # switches power
binary_sensors:
- antilegionella # indicates antilegionella status
- changing_data # indicates ongoing configuration on server by the API
- eco # indicates ECO mode status
- heating # indicates ongoing heating
- online # indicates API online status
- power # indicates power status
- update # indicates API update
sensors:
- antilegionella_set_temperature # antilegionella temperature
- current_temperature # current temperature
- energy_use_in_day # energy use in last day
- energy_use_in_month # energy use in last week
- energy_use_in_week # energy use in last month
- energy_use_in_year # energy use in last year
- errors # errors
- mode # manual or time program mode
- remaining_time # remaining time for heating
- required_showers # required amount of showers (might not work on all models)
- required_temperature # required temperature (simulated by API itself for some models)
- showers # estimated amount of average showers
- temperature_mode # indicates if required temeparture is based on required temperature or required showers
- time_program # time program schedule
You may try uploading new files and setting "store_config_files: true" in configuration.yaml. After system restart folder shall be created "/config/aquaariston_http_data" and it should have file or files including "data_ariston_model_data.json" in which i'm interested in.
By the way, does Lydos set temperature directly also in your case (in Velis you may set only amount of showers)?
Hi,
Here are the logs:
(I have changed some sensitive data with X and 7 and check the wheType with value 2!)
data_ariston_all_set_get.json
{"_get_main": false, "_get_cleanse": false, "_get_showers": false}
data_ariston_model_data.json
[{"notifyOnErrors": true, "notifyOnReadyShowers": true, "notifyOnCondensateTankFull": true, "hpmpSys": true, "wheType": 2, "gw": "XXXXXXXXXXXX", "sn": "XXXXXXXXXXXX", "name": "LYDOS hibrid", "loc": {"country": "XX", "addr": "XXXXXXXXX", "cityName": "XXXXXXXX", "city": 7777777, "adm1Name": "XXXXX", "adm1": 7777777, "adm2Name": "XXXXXXXX", "adm2": 7777777, "postalCode": "XXXX", "lat": 00.000000, "lng": -0.0000000, "radius": 0.0}, "sys": 4, "utcOft": 0, "lnk": 1, "weatherProvider": 0, "tcByGuest": false, "consumptionsSettings": {"currency": 2, "gasType": 0, "gasEnergyUnit": 0}, "geofenceConfig": {"lat": 0.0, "lng": 0.0, "radius": 0.0}, "mqttApiVersion": 0, "isOffline48H": false}]
data_ariston_valid_requests.json
{"_get_main": true, "_get_error": false, "_get_cleanse": false, "_get_time_prog": false, "_get_version": false, "_get_use": false, "_get_showers": false}
please try uploading new files and restarting HA.
Its getting this error:
Uncaught thread exception
Traceback (most recent call last):
File "/config/custom_components/aquaariston/aristonaqua.py", line 1318, in _control_availability_state
self._get_http_data(request_type)
File "/config/custom_components/aquaariston/aristonaqua.py", line 1208, in _get_http_data
self._store_data(resp, request_type)
File "/config/custom_components/aquaariston/aristonaqua.py", line 1040, in _store_data
raise Exception("Unexpected code {} received for the request {}".format(resp.status_code, request_type))
Exception: Unexpected code 599 received for the request _get_main
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 1254, in run
self.function(*self.args, **self.kwargs)
File "/config/custom_components/aquaariston/aristonaqua.py", line 1329, in _control_availability_state
raise Exception("Getting HTTP data has failed")
Exception: Getting HTTP data has failed
The error mentioned indicates that Ariston server did not accept the request.
I had to include check on Velis and Lydos detection already since they had some unique requests and not compatible ones.
If system won't go beyond this error (sometimes similar errors are temporary ranging from few seconds to hours), then sniffing of requests would be required to identify the problem (for that i might require login an password).
Yes, problably the endpoints are no the same for this type of applience.
Please give me your email.
Try the latest version
@chomupashchuk last version it's working pretty well
Well done!
Try the latest version
Hi man , first off all thanks for your work,
I am using a Lydos Hybrid and after i run your plugin i can see in /config/aqua_http_logs/data_ariston_model_data.json
all the correct data about my heater, but in the log i'm gettin these errors:
2020-11-28 01:13:42 WARNING (Thread-13) [custom_components.aquaariston.aristonaqua] <custom_components.aquaariston.aristonaqua.AquaAristonHandler object at 0x7f4445d8a2b0> _get_main invalid reply code 599
2020-11-28 01:13:42 WARNING (Thread-13) [custom_components.aquaariston.aristonaqua] Connection errors: 1
2020-11-28 01:13:42 ERROR (Thread-13) [root] Uncaught thread exception Traceback (most recent call last): File "/config/custom_components/aquaariston/aristonaqua.py", line 1341, in _control_availability_state self._get_http_data(request_type) File "/config/custom_components/aquaariston/aristonaqua.py", line 1231, in _get_http_data self._store_data(resp, request_type) File "/config/custom_components/aquaariston/aristonaqua.py", line 1068, in _store_data raise Exception("Unexpected code {} received for the request {}".format(resp.status_code, request_type)) Exception: Unexpected code 599 received for the request _get_main
During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/local/lib/python3.8/threading.py", line 1254, in run self.function(*self.args, **self.kwargs) File "/config/custom_components/aquaariston/aristonaqua.py", line 1352, in _control_availability_state raise Exception("Getting HTTP data has failed") Exception: Getting HTTP data has failed
and in the Entities tab i find it like this:
Is the connection to the boiler successful from android app? Was this issue temporary?
Occasionally Ariston server has issues and i do not know what they mean by different http reply codes. In some cases those are temporary communication issues and sometimes it could be integration fault for sending unsupported request. Integration faults should be permanent, meaning you get a huge counter value for specific fault occurrences and related objects are constantly being affected.
Just to mention that few days ago the server was down for more than 4 hours (checked in the logs). During this shortage the application was not working as well. So when I have issues with the connection my first thing to do is to check the application that the server/API works.
Is the connection to the boiler successful from android app? Was this issue temporary?
Occasionally Ariston server has issues and i do not know what they mean by different http reply codes. In some cases those are temporary communication issues and sometimes it could be integration fault for sending unsupported request. Integration faults should be permanent, meaning you get a huge counter value for specific fault occurrences and related objects are constantly being affected.
yes the boiler is connected and menagable from the app.
The integration ran all night with no success, i tried to restart HA multiple times and the boiler too.
btw i noticed that in /config/aqua_http_logs/data_ariston_model_data.json
all the infos are loaded correctly
in /config/aqua_http_logs/data_ariston_valid_requests.json
{"_get_main": true, "_get_error": true, "_get_cleanse": true, "_get_time_prog": true, "_get_version": true, "_get_use": true, "_get_showers": true}
but in /config/aqua_http_logs/data_ariston_all_set_get.json
{"_get_main": false, "_get_cleanse": false, "_get_showers": false}
data_ariston_all_set_get is internal integration data (not from Ariston server), which indicates that no change of data via integration is ongoing. When you try to set data POST requests are used but they do not provide results and I use mapping to related GET requests for specific parameters to prioritize them in the queue of GET requests and confirm successful change faster.
The model data was fetched but as i understand you constantly get unexpected reply for "_get_main" (internal naming of requests). It means that either algorithm I used did not identify your boiler as Lydos Hybrid or your specific model of Lydos Hybrid has also some unique requests because Ariston likes to make things harder.
Identification of Lydos Hybrid is done by finding "name": "LYDOS hibrid" in data_ariston_model_data.json (see previous entries for example). If your JSON does not have such entry then first step of identification fails and boiler is treated as ordinary Lydos/Velis with their unique requests. In that case i'll need data from that JSON for prototyping (you should replace sensitive data as i'm interested more in structure and some unique values for type/name etc.).
If it is not the case, then sniffing of requests would be required for the next step (i use fiddler, where proxy is enabled, change advanced network settings on phone to use proxy of fiddler and then check all requests from fiddler while changing pages on the phone to see all GET requests and change all data to have all POST requests). So if sniffing would be required you may do it yourself or provide me with credentials (change password for temporary use) and share it via email. My personal boiler does not even support this integration (it is different Ariston application, there are 2 of them), so i can't test it locally in any way.
[...] Identification of Lydos Hybrid is done by finding "name": "LYDOS hibrid" in data_ariston_model_data.json (see previous entries for example). If your JSON does not have such entry then first step of identification fails and boiler is treated as ordinary Lydos/Velis with their unique requests. In that case i'll need data from that JSON for prototyping (you should replace sensitive data as i'm interested more in structure and some unique values for type/name etc.). [...]
ok, i found the bug. you use "LYDOS hibrid" to identify the boiler but that's the Nickname we give to the boiler inside the app which by default is equal to the serial number.
So that was causing my error, in fact as soon as i renamed the boiler with "LYDOS hibrid" the integration started working.
Maybe you should make it parametric like username and password.
Nice work btw :) your plug-in is super!!
I prefer automated detection of boiler instead of specifying it manually, but now it seems like some changes are required as i have no idea of how to identify correctly, so probably manual input would be required after updates.
But good that it works
Type is not a mandatory input parameter in configuration.yaml.
Rest of data in README file.
Please note that you might need to comment out integration, then make a restart (to read changed python files) and then configuration.yaml updates should be accepted with new structure.
Since Lydos Hybrid seems to work I'm closing the ticket