Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not setting temperature of "real" TRV #4

Closed
gavyb opened this issue Nov 16, 2021 · 18 comments
Closed

Not setting temperature of "real" TRV #4

gavyb opened this issue Nov 16, 2021 · 18 comments
Labels
bug Something isn't working under investigation If its not clear whats the problem
Milestone

Comments

@gavyb
Copy link

gavyb commented Nov 16, 2021

I have configured the virtual TRV and also created a group to cover the windows, but having set the "virtual" TRV to a different value from the "real" TRV, it is not changing the temperature of the "real" TRV.
TRV model is TS0601_thermostat.

@KartoffelToby
Copy link
Owner

@gavyb Can you update to 0.2.0 and check if this bug is solved?
If not pls add the HA Developer status output of your TS0601_thermostat like i did in #1

Thanks!

@KartoffelToby KartoffelToby added the bug Something isn't working label Nov 16, 2021
@gavyb
Copy link
Author

gavyb commented Nov 18, 2021

Thanks - I have updated and it still fails to update the "real" TRV target temperature. I now get the following error:
"Failed to call service climate/set_temperature. 'NoneType' object is not subscriptable"

@gavyb
Copy link
Author

gavyb commented Nov 18, 2021

additional log details:

2021-11-18 15:23:50 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/ai_thermostat/climate.py", line 361, in _async_sensor_changed
await self._async_control_heating()
File "/config/custom_components/ai_thermostat/climate.py", line 432, in _async_control_heating
max_forcast_temp = int(round(float(forcast[0]['temperature']) + float(forcast[1]['temperature']) / 2))
TypeError: 'NoneType' object is not subscriptable

@gavyb
Copy link
Author

gavyb commented Nov 18, 2021

and the following in the zigbee2mgtt log file:

error 2021-11-18 15:44:54: No converter available for 'get' 'local_temperature_calibration' ()

@KartoffelToby
Copy link
Owner

@gavyb You're a winner, i'm sure you got all current bugs :D
i feel very sorry,

additional log details:

2021-11-18 15:23:50 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/ai_thermostat/climate.py", line 361, in _async_sensor_changed await self._async_control_heating() File "/config/custom_components/ai_thermostat/climate.py", line 432, in _async_control_heating max_forcast_temp = int(round(float(forcast[0]['temperature']) + float(forcast[1]['temperature']) / 2)) TypeError: 'NoneType' object is not subscriptable

Its a problem with the weather data, what kind of service do you use? In Version 0.4.0 it not longer crash if no data was found and the temp should be setted anyway, just a log warning appears with "no weather data found."

in 0.4.0 the weather entity is also optional and if the issue #10 is closed there will be an alternative outdoor sensor option.

and the following in the zigbee2mgtt log file:

error 2021-11-18 15:44:54: No converter available for 'get' 'local_temperature_calibration' ()

This was a other bug, i figured out that only the SPZB0001(so far) must be forced to get the local_temperature_calibration.

in 0.4.0 this will be fixed, so only if the model matches the SPZB0001 this function is triggered.

As soon as 0.4.0 is published i would like you to check it out, if the bug persists feel free to reopen this issue

@KartoffelToby KartoffelToby added this to the 0.4.0 milestone Nov 18, 2021
@KartoffelToby KartoffelToby linked a pull request Nov 18, 2021 that will close this issue
@gavyb
Copy link
Author

gavyb commented Nov 18, 2021

@KartoffelToby to answer your question, I am using AccuWeatherand seems to be returning current temperature, last change 5 hours ago...
I also have UK Met Office and OpenWeather, so I could try one of those ? Interesting that those other 2 were last updated several hours ago, but that's probably another issue elsewhere!

@gavyb
Copy link
Author

gavyb commented Nov 18, 2021

ok, I have updated to latest version (0.4.0) and am no longer getting these error messages, but the virtual TRV is set to off and does not change the temperature of the real TRV or switch it on. However, when I change the temperature or switch the mode to Heat, this is reflected in the virtual TRV.

@gavyb
Copy link
Author

gavyb commented Nov 18, 2021

am getting some positive results, will continue to test and provide an update tomorrow...

@gavyb
Copy link
Author

gavyb commented Nov 19, 2021

I have an automation that turns the "real" TRV to 20 and this is not reflected in the "virtual" TRV - see lscreenshot:
image

I also am getting some error messages in the main log:

2021-11-19 10:05:27 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/ai_thermostat/climate.py", line 373, in _async_sensor_changed
await self._async_control_heating()
File "/config/custom_components/ai_thermostat/climate.py", line 497, in _async_control_heating
remappedstates = convert_outbound_states(self,converted_hvac_mode)
File "/config/custom_components/ai_thermostat/models/models.py", line 29, in convert_outbound_states
if self.hass.states.get(self.heater_entity_id).attributes.get('device').get('model') is not None:
AttributeError: 'NoneType' object has no attribute 'get'

and finally - getting a pop up as follows:
image
when I try to set the temperature in the "virtual" TRV

@KartoffelToby
Copy link
Owner

KartoffelToby commented Nov 19, 2021

@gavyb
Oh boy, first thanks for your patient. I need to complete reproduce your environment, for that i need a couple of informations.

TRV Model:
Z2M Version:
HA Version:

HA Dev-Tools output of your Devices:

Z2M Log of the time the problem appears:

I will try to final fix it this weekend.

@KartoffelToby KartoffelToby reopened this Nov 19, 2021
@KartoffelToby KartoffelToby modified the milestones: 0.4.0, 0.5.0 Nov 19, 2021
@KartoffelToby KartoffelToby removed a link to a pull request Nov 19, 2021
@upais
Copy link

upais commented Nov 19, 2021

I had the error above and solved it when I changed the 'name' in the virtual thermostat because with the domain 'climate.' it matched the value from 'thermostat'.
Example:
name: tvr_bedroom
thermostat: climate.tvr_bedroom

@KartoffelToby
Copy link
Owner

@gavyb can you check that first? i'm confused that HA allowing this. Its a circular dependency so yeah thats a error pool.

@KartoffelToby KartoffelToby modified the milestones: 0.5.0, 0.6.0 Nov 19, 2021
@KartoffelToby KartoffelToby added the under investigation If its not clear whats the problem label Nov 19, 2021
@gavyb
Copy link
Author

gavyb commented Nov 20, 2021

@IvanUpa I don't believe I have that problem:

  • platform: ai_thermostat
    name: bedroom_thermostat
    thermostat: climate.master_bedroom_trv
    temperature_sensor: sensor.ble_temperature_master_bedroom
    window_sensors: group.bedroom_windows
    weather: weather.home
    off_temperature: 20

@gavyb
Copy link
Author

gavyb commented Nov 20, 2021

Apologies for the poor formatting above, I am using my mobile...

@KartoffelToby
Copy link
Owner

@gavyb can you checkout 0.5.0, it has a better error log, and what kind of TRV do you use? has it a local_calibration option in Z2M?

@gavyb
Copy link
Author

gavyb commented Nov 21, 2021

I am using a TS0601 TRV and will now try 0.5.0, but am getting issues with controlling my TRV now, so may need to remove this integration

@KartoffelToby
Copy link
Owner

KartoffelToby commented Nov 21, 2021

@gavyb
Yes the TS0601 is the problem, i must use a special method to calibrate it, you can take a look at #15 and #34 #38
If you haven't a head to test it longer, i'll understand you. I'll release the 1.0 version if all these problems are fixed under the new name better_thermostat. So you can wait for this.

@gavyb
Copy link
Author

gavyb commented Nov 24, 2021

it looks like I am getting similar errors, so I think I will wait for 1.0 to be released before using it further. Many thanks for your work on this.

@gavyb gavyb closed this as completed Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working under investigation If its not clear whats the problem
Projects
None yet
Development

No branches or pull requests

3 participants