Closed BryceSoker closed 3 years ago
**** me it needs to be a string. 75.0 should be '75'
Edit: Nope nevermind, same issue.
Ok, I might've found the cause.
There is a check at line 1894 that verifies if the required_temperature is lower than the max temperature. However that max temperature is hardcoded to 70 even though that right now it can be changed on the Ariston App.
So instead of being a good developer I went the lazy, hammery path on those lines and simply allowed all temperatures to pass. If I ever decided to not be lazy and actually try to find the request that gets those max values from the server I will add a merge request to this. But for now this worked for me ( at least the service seems to be working fine):
elif parameter in {
self._PARAM_REQUIRED_TEMPERATURE,
self._PARAM_CLEANSE_TEMPERATURE,
self._PARAM_REQUIRED_SHOWERS,
}:
value = float(value)
if parameter == self._PARAM_REQUIRED_TEMPERATURE: <---------
good_values[parameter] = value <-----------------------
good_parameter = True <--------------------------------
if allowed_values[parameter] and allowed_values[parameter]["min"] - 0.01 <= value \
<= allowed_values[parameter]["max"] + 0.01 and parameter != self._PARAM_REQUIRED_TEMPERATURE: <--------------------------------
if parameter == self._PARAM_REQUIRED_SHOWERS:
good_values[parameter] = int(value)
else:
good_values[parameter] = value
good_parameter = True
if not good_parameter:
bad_values[parameter] = value
except KeyError:
bad_values[parameter] = value
I do not have a boiler using Aqua Ariston, I have Clas Evo, which uses different integration. A guy who has lydos hybrid sent maximum values for different modes in the email. I had no direct access to the boiler and from provided requests data I did not see reported maximum values, so I hardcoded them based on current mode (70 for all except 53 for "green") from email. You may check line 657 in the code.
It is not a problem to replace values, but I need to know the ranges or specifics. You may also check the requests (I use fiddler on PC and enabled proxy to which I connected my android phone) if maximum is reported in some request to make it automated.
Yeah, I assumed that was the case. I might get around to use fiddler and do just that.
For now, I will close this issue since this workaround worked for me but if I do get around to actually contribute and not just be a lazy bum I will add it to the repo.
So I got around to use fiddler, the request is the following:
GET https://www.ariston-net.remotethermo.com/api/v2/velis/sePlantData/<ID>/plantSettings?appId=com.remotethermo.velis HTTP/1.1
ar.authToken: *************************************************************************************************************************************************************************************************************************************************************************************************
Accept: application/json, text/json, text/x-json, text/javascript, application/xml, text/xml
User-Agent: RestSharp/106.6.10.0
Host: www.ariston-net.remotethermo.com
Accept-Encoding: gzip, deflate
and the response body is the following:
{
"SeAntilegionellaOnOff": 1,
"SeAntiCoolingOnOff": 0,
"SeNightModeOnOff": 0,
"SePermanentBoostOnOff": 1,
"SeMaxSetpointTemperature": 75,
"SeMaxSetpointTemperatureMin": 65,
"SeMaxSetpointTemperatureMax": 75,
"SeAntiCoolingTemperature": 17,
"SeAntiCoolingTemperatureMin": 10,
"SeAntiCoolingTemperatureMax": 26,
"SeMaxGreenSetpointTemperature": 53,
"SeHeatingRate": 9,
"SeNightBeginAsMinutes": 1380,
"SeNightBeginMinAsMinutes": 1200,
"SeNightBeginMaxAsMinutes": 120,
"SeNightEndAsMinutes": 360,
"SeNightEndMinAsMinutes": 240,
"SeNightEndMaxAsMinutes": 600
}
where SeMaxSetpointTemperature is the new max temperature value (either way the max (of the max) seems to be 75). I will check if I can add it into the code, but it might take a bit so I will just leave it here.
It might be a bit tricky to include with other sensors, the request to fetch maximum should probably be sent only once (most likely after login) to have values during sensor setting. Since sensors have "actual" and "temporary" states during setting of data it is probably the easiest and safest way to go. I'm still a bit worried if this request is supported by all boilers or not (lydos hybrid had unique requests compared to lydos and velis), so for safety purposes setting maximum should be triggered only for this model.
Right now I'm including some updates in that file for logging purposes (if standalone API is used) and can try to include this as well.
Please try updated version. If there are issues, you may try to fix them and sent the updated version or let me know if something does not work. It would take too long for me to create unit test and mock everything for this to function properly.
I planned to publish updates today so if possible please let me know if it works soon.
Alright, it seems to have worked.
Checked first by restarting the config and set the max temp to 75 and then setting temps to 75 and it worked.
Then changed max temp to 70 and sent a service call with 75, and the ariston app set it as 70 (which is as supposed).
Then restarted Hass and tried to send a service call with 75 and it failed (since I had previously set max temperature as 70) as supposed to.
Also did a test with the scheduler and it seems okay.
Also added a few logs to check if the values were being changed and they seem okay.
So, thanks man!
I have a lydos_hybrid that basically from time to time fails to change the heater's state due to this error:
My maximum temperature is 75, and I've also seen it happen when the temperature set is 70.
I am using a custom-scheduler (https://community.home-assistant.io/t/scheduler-card-custom-component/217458) with the yaml:
At first, I thought this might be sending strings or such but after giving the code a quick check I noticed that the data is always converted to string (? correct me if I'm wrong).
I'll try to keep looking for it and if I find the cause I'll add it here.