chomupashchuk / ariston-remotethermo-home-assistant-v2

Ariston NET remotethermo integration for Home Assistant based on API
MIT License
94 stars 22 forks source link

error loading component in home assistant #4

Closed jello1974 closed 4 years ago

jello1974 commented 4 years ago

Traceback (most recent call last): File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 213, in _async_setup_component result = await task File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, *self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/ariston/init.py", line 213, in setup api = AristonChecker( File "/home/homeassistant/.homeassistant/custom_components/ariston/init.py", line 180, in init list_of_sensors = list({sensors, binary_sensors, switches}) TypeError: 'NoneType' object is not iterable

chomupashchuk commented 4 years ago

Try the latest version

jello1974 commented 4 years ago

Thx for fixing init error but still not working with alteas one heater although it works with v1 (https://github.com/chomupashchuk/ariston-remotethermo-home-assistant)

2020-11-28 01:21:30 ERROR (Thread-20) [root] Uncaught thread exception Traceback (most recent call last): File "/home/homeassistant/.homeassistant/custom_components/ariston/ariston.py", line 2394, in _control_availability_state self._get_http_data(request_type) File "/home/homeassistant/.homeassistant/custom_components/ariston/ariston.py", line 2284, in _get_http_data self._store_data(resp, request_type) File "/home/homeassistant/.homeassistant/custom_components/ariston/ariston.py", line 1773, in _store_data raise Exception("Unexpected code {} received for the request {}".format(resp.status_code, request_type)) Exception: Unexpected code 500 received for the request _get_param

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.9/threading.py", line 950, in _bootstrap_inner self.run() File "/usr/local/lib/python3.9/threading.py", line 1262, in run self.function(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/ariston/ariston.py", line 2405, in _control_availability_state raise Exception("Getting HTTP data has failed") Exception: Getting HTTP data has failed

chomupashchuk commented 4 years ago

Is the Exception raised only for _get_param and do you have multiple occurrences of it?

In time I have added more parameters to be requested and it could be that one or two parameters is not supported by your model (i noticed something like that for my model once). Integration was written based on my own boiler behavior and two boilers to which i got temporary access to from other guys (it is problematic to get access now), so I can't guarantee that some changes are incompatible for others. Ariston server simply rejects this request with no helpful data in the reply and there is no documentation, so it is a lot of guessing here.

There are few options options how to proceed:

  1. I can send a part of code (must be added manually as can't attach files here), which shall show final generated request including header. Then use some REST tool (can be extension in chrome or firefox even) where at first login request is sent and then problematic request. Then remove parameters one by one from the request header to find potential culprit. Another thing is that even if such parameter is found, it is good to have json files from requests (generated by setting appropriate flag in configuration.yaml) to see how i can distinguish which parameters are supported and which are not by specific model.
  2. provide me with login and password (temporary change it from default and send it via mail) so that i could do it myself.
jello1974 commented 4 years ago

Sure, I'm fine with either way. If you want to do it yourself i need an email address to send you login data. If is anything else i can help with just let me know...

chomupashchuk commented 4 years ago

It is faster for me to check myself and implement/verify on the spot. But I prefer to clarify that if someone has issue sharing credentials there is workaround for that. My email is chomu.nattsol@gmail.com

chomupashchuk commented 4 years ago

New version is uploaded, which should not trigger an error if 'internet_weather' is not among the sensors or switches, which is not supported by boiler anyway.

In case of issues reopen this ticket or create a new one.

jello1974 commented 3 years ago

Works now as expected with Ariston Alteas One. Thank you chomupashchuk.