-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[danfossairunit] Filter lifetime management #11310
Comments
Fixes openhab#11310 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
After running this in production for a couple of weeks, time for a small update: The Link CC Controller sets this value every few days and after being rebooted. So there will be a fight. Still, providing a channel makes sense for stand-alone installations where openHAB is the only controller - and for using a rule to override the value set by Link CC or Air Dial. |
Fixes openhab#11310 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Hey @jlaur, thanks for your contribution. Providing it as a channel seems fine. I am still a bit unsure about the hardcoded boundaries, though. Why are you writing it's impossible to get this values from the CCM? Because it reports 9, although it is actually set back to 12 when updating it with an "invalid" value? |
@pravussum - I mean, inconsistent, right? |
@pravussum - now reconsidering options. Having access to the filter replacement date would be optimal. In that case the binding could recalculate remaining filter life by itself from any filter period value. I didn't find such register, though. It might also be worth letting the binding "fight" for setting the filter period value when changed from the outside. Having this logic in rules has the side-effect of recalculation of remaining filter life after each override, so it will affect graphs, notifications etc. Keeping it in binding logic would make it possible to not expose remaining filter life while reapplying filter period value configured in binding. So maybe thing configuration after all? Not sure if worth it, all could even be done in rules with proper items and logic. |
Hm, in my opinion there should not be too much "black magic" (read: not apparent to the user) in the binding. If someone is willing to have such a logic, a rule is fine - maybe even using intermediary items that get updated with the "real" value and triggers the update of a "filtered" item by a rule that does specific magic. |
Yes, I tried in the past to approach Danfoss giving "advice". :-) They are not into that. Now checked logs for some timestamps of reverted FilterPeriod in relation to recalculated RemainingFilterLife. At least the FilterPeriod update seems to arrive first:
So I think I'm convinced now to go with the PR changes and introduce that channel to be used however any user sees fit. I'll try to write a rule based on this. Maybe I'll also try to analyze collected data over time and see if it could be possible to detect filter replacement based on the unit having to work harder when filter is clogging. But not sure if it can be detected, and in a timely manner. |
Fixes openhab#11310 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@pravussum - I decided to abandon idea of overwriting unit/CCM value and instead calculate my own value using remaining filter life and filter period. Like this:
So I'm using the channel as read-only. Being able to write to the channel is still useful for anyone using openHAB without any Link CC or Air Dial. |
OK, sounds reasonable. I guess we should document the behavior somewhere (that the value is overwritten, and that the CCM reports the "wrong" limits). Maybe a note section in the binding documentation? Or at the description of the channel? |
@pravussum - currently (in PR) filter_period is documented with description: "Number of months between filter replacements (between 3 and 12). This value affects calculation of filter_life by the unit, and might get overwritten by Air Dial or Link CC Controller." Channels for filter_period_min and filter_period_max are not provided as they are useless, so nothing really to document? |
* Add filter period channel. Fixes #11310 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Round remaining filter life percentage to one decimal. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Improve and extend example configuration. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Mark filter period channel as advanced due to Link CC/Air Dial conflicts. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Add comment about value getting overwritten. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Remove redundant parentheses. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA report: First javadoc author should have 'Initial contribution' contribution description. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA issue: NoEmptyLineSeparatorCheck Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add filter period channel. Fixes openhab#11310 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Round remaining filter life percentage to one decimal. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Improve and extend example configuration. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Mark filter period channel as advanced due to Link CC/Air Dial conflicts. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Add comment about value getting overwritten. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Remove redundant parentheses. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA report: First javadoc author should have 'Initial contribution' contribution description. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA issue: NoEmptyLineSeparatorCheck Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Dave J Schoepel <dave@theschoepels.com>
* Add filter period channel. Fixes openhab#11310 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Round remaining filter life percentage to one decimal. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Improve and extend example configuration. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Mark filter period channel as advanced due to Link CC/Air Dial conflicts. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Add comment about value getting overwritten. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Remove redundant parentheses. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA report: First javadoc author should have 'Initial contribution' contribution description. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA issue: NoEmptyLineSeparatorCheck Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
* Add filter period channel. Fixes openhab#11310 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Round remaining filter life percentage to one decimal. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Improve and extend example configuration. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Mark filter period channel as advanced due to Link CC/Air Dial conflicts. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Add comment about value getting overwritten. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Remove redundant parentheses. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA report: First javadoc author should have 'Initial contribution' contribution description. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA issue: NoEmptyLineSeparatorCheck Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add filter period channel. Fixes openhab#11310 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Round remaining filter life percentage to one decimal. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Improve and extend example configuration. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Mark filter period channel as advanced due to Link CC/Air Dial conflicts. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Add comment about value getting overwritten. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Remove redundant parentheses. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA report: First javadoc author should have 'Initial contribution' contribution description. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA issue: NoEmptyLineSeparatorCheck Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Add filter period channel. Fixes openhab#11310 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Round remaining filter life percentage to one decimal. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Improve and extend example configuration. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Mark filter period channel as advanced due to Link CC/Air Dial conflicts. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Add comment about value getting overwritten. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Remove redundant parentheses. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA report: First javadoc author should have 'Initial contribution' contribution description. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix SCA issue: NoEmptyLineSeparatorCheck Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
I recently changed my filters as automatic response to a notification about remaining filter life being 0%. This time I had some additional time to be curious about the algorithm for determining when filter replacement is due, which turned out to be based on the most simple algorithm of all:
![image](https://user-images.githubusercontent.com/19519842/134820642-99ae0570-07f1-4e78-9439-75bc1fd50986.png)
i.e. time-based and linear without any sensors or other more sophisticated logic (like volume of air going through since last filter replacement).
This time I purchased new filters with no plastic frame and more filter area, which should last longer than my previous filters. So I wondered how to manage this, as my Danfoss Air A2 will still ask me to replace filter after nine months.
I did some digging in this document:
https://docs.google.com/spreadsheets/d/1FnWGzeicXrBhMg_jaHFM7jzVb_5aiflNTMsUz-j_rRo/edit#gid=0
and found three interesting registers:
So I decided to examine them, which I did by experimentally adding new channels for them, respectively DanfossHRV_Service_FilterPeriod, DanfossHRV_Service_FilterPeriodMin and DanfossHRV_Service_FilterPeriodMax.
Initially:
As min and max are readonly I thought they probably defined the boundaries for the period to be set. But let's try to probe and see if this is actually the case:
Find actual minimum:
So it seems that minimum number of months allowed to be set is 3.
Find actual maximum:
So in this case it seems that maximum number of months allowed to be set is actually 12, at least for my A2 unit. Which is fortunate, since my intention was to be able to extend the period from the standard 9 months.
When changing the FilterPeriod value I noticed that RemainingFilterLife is recalculated accordingly. For example, as starting point I was at 99.60784149169922% with period of 9 months as filter was replaced yesterday. After changing period to 3 months, it was recalculated to 98.82353210449219%. When setting period to 12 months it was recalculated to 100%. And when setting back to 9 months it was again calculated to 99.60784149169922%. So nothing it reset, and period can be changed freely.
Proposed solution
I would definitely like to be able to set the filter period through the binding. Hardcoding the boundary as between 3 and 12 seems reasonable as it doesn't seem possible to get this information from the CCM module.
Question now is how to implement it. My first thought is that thing configuration might be an appropriate place for this, while a channel seems less desirable, since it requires more from the user and is not changed frequently.
On the other hand, if this value can be set by the Air Dial, this could lead to some undesired results where Air Dial setting would override the value set when initializing the binding, and vice versa next time binding is initialized for whatever reason. So if this is the case it might be more appropriate to provide a channel, so rules could monitor and update it.
On my Link CC Controller this value cannot be set, but in the service menu I can read the property in device information: "Filter lifetime: 274 days". So now wondering if this value is hardcoded or read from the unit at some point. This was after changing it to 12 months, so for sure it didn't have any effect yet.
Other considerations
Values for channel service#filter_life should be rounded to one decimal. It's a percentage value with 255 possible values, so if we absolutely don't want to lose any updates (last updates before replacement needed): 1.1764706373214722% -> 0.7843137383460999% -> 0.3921568691730499% -> 0%
one decimal should be fine.
The text was updated successfully, but these errors were encountered: