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

TRV - Mapping valve_min_report and calculation of Idle/Heating mode #498

Closed
GergelyT opened this issue Nov 5, 2023 · 10 comments · Fixed by #503
Closed

TRV - Mapping valve_min_report and calculation of Idle/Heating mode #498

GergelyT opened this issue Nov 5, 2023 · 10 comments · Fixed by #503
Labels
feature-request New feature or request

Comments

@GergelyT
Copy link

GergelyT commented Nov 5, 2023

Is your feature request related to a problem? Please describe.

Heating/Idle mode calculation (TPL_ACTION_TEMPLATE):
Currently this is based solely on Valve position (0% - Idle, >0% - Heating). Therefore if you set minimal valve position (valve_min_percent - TPL_VALVE_MIN_POSITION), the TRV will constantly report Heating mode. Which is not good, if the boiler control is based on Heating/Idle status.

Describe the solution you'd like
In Shelly TRV Firmware 2.2.1 there is a new setting: "Minimal Valve Position to Report Open"
It is mapped under 'valve_min_report' parameter. This parameter should also be mapped as TPL_VALVE_MIN_REPORT

Under fw 2.2.1:
Heating/Idle is calculated with value_json.thermostats.0.pos>TPL_VALVE_MIN_POSITION
From fw 2.2.1:
Heating/Idle is calculated with value_json.thermostats.0.pos>TPL_VALVE_MIN_REPORT

Additional context

@GergelyT GergelyT added the feature-request New feature or request label Nov 5, 2023
@bieniu
Copy link
Owner

bieniu commented Nov 5, 2023

If I understand this setting correctly... if the minimum valve position value is set to more than 0, the heating medium flow will always be there, so in my opinion the state should always be heating.

@GergelyT
Copy link
Author

GergelyT commented Nov 5, 2023

From the release notes 2.1.3 (source: FB group):
Minimum valve position is added as option - you can set from 0% - 10% if TRV generate more noise when fully closing.

By this definition it should be handled as closed status. I also saw comments where this is used when flow does not start under a certain valve position, that is it is used to move the closing point above 0%

Anyway, I'm ok if this is not concidered as idle status. However valve position below the new "minimal valve position reported to be open" parameter should be definitelly considered as idle.

@GergelyT
Copy link
Author

GergelyT commented Nov 5, 2023

But if you implement only this new valve_min_report parameter, then I can build my own logic for comparing it with the actual valve position for boiler control

@bieniu
Copy link
Owner

bieniu commented Nov 5, 2023

It is not possible to use valve_min_report during the device configuration because this value is not present in the announce payload. Probably this can be implemented as a custom script option for the device.

@GergelyT
Copy link
Author

GergelyT commented Nov 5, 2023

I'm not familiar with how the announce works, but I even don't see most of the parameters under the announce. Even valve_min_percent parameter. However I see both of them under the setting topic:, thermostat section. Should I write Shelly support to include it at announce?

"boost_minutes": 30,
"valve_min_percent": 0,
"valve_min_report": 20,
"force_close": false,
"calibration_correction": true,
"extra_pressure": false,
"open_window_report": false

@bieniu
Copy link
Owner

bieniu commented Nov 5, 2023

The script uses only the announce payload to configure the device. Shelly team will not add anything to the announce payload, I have requested this many times.

@GergelyT
Copy link
Author

GergelyT commented Nov 5, 2023

Ok, thank you for investigating it. I'll see, if I can map it by hand at least to be able to read out the current value as it is there in settings topic.

@GergelyT GergelyT closed this as completed Nov 5, 2023
@bieniu
Copy link
Owner

bieniu commented Nov 5, 2023

I think it’s too early to close this request.

@bieniu bieniu reopened this Nov 5, 2023
@GergelyT
Copy link
Author

GergelyT commented Nov 5, 2023

I was able to modify the code to read out this value without any hack. Writing back is not supported via mqtt, but reading out is ok. If I finalize I'll send a pr

@GergelyT
Copy link
Author

GergelyT commented Nov 5, 2023

I created a pr for the new sensor. I didn't make firmware version check for it, but it is available only from 2.2.1. If this parameter is included, it's up to you if you change the Heating/Idle status calculation, but please inform me about your decision :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants