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

[basicprofiles] Create a new "Flat Line" profile? #18291

Open
andrewfg opened this issue Feb 19, 2025 · 4 comments · May be fixed by #18301
Open

[basicprofiles] Create a new "Flat Line" profile? #18291

andrewfg opened this issue Feb 19, 2025 · 4 comments · May be fixed by #18301
Assignees
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@andrewfg
Copy link
Contributor

In the last couple of weeks my system experienced a couple of cases where Channels have "flat lined" meaning that the respective binding suddenly stopped producing new live data.

Two specific examples are:

  1. In the case of a multi sensor having four DS18B temperature probes, just one of the probes failed. This means that the Thing was still showing as online, and the other probes were continuing to produce live data. But the failed probe was not producing any new values, and was showing a flat line in the trend graph of the last known (persisted) value.

  2. In the case of a battery powered push button its battery level had slowly fallen from 100% to something around 50% and then the battery failed very fast. This means that the device did not even have time to report a low battery alarm before going offline. So the battery level was showing a flat line in the trend graph of the last known (persisted, wrongly healthy) value of about 50% which superficially looked OK.

So I am thinking of writing a Flat Line profile to link such Channels to a Switch Item so that if the binding Channel continues to send live data within a certain configured time window then the linked item will be updated to OFF, and if not then the linked item is updated to ON (or vice versa).

Does this make sense? Or is there already some other profile in OH to do that? Obviously the functionality could be done via a rule, but that is more complex..

@andrewfg andrewfg added the enhancement An enhancement or new feature for an existing add-on label Feb 19, 2025
@andrewfg andrewfg self-assigned this Feb 19, 2025
@jlaur
Copy link
Contributor

jlaur commented Feb 19, 2025

Do you think expire would be sufficient? I have a similar issue with Netatmo readings that I rely upon for automation, which I have defined like this:

Number:Dimensionless Netatmo_FamilyRoom_CO2 "CO2" <carbondioxide> (Netatmo_FamilyRoom, Max_CO2) ["Measurement", "CO2"] { channel="netatmo:weather-station:home:indoor:airquality#co2", unit="ppm", expire="60m,state=400 ppm" }

Perhaps state could be set to UNDEF after expiration, and you could react on that in a rule? This would prevent messing up persistence with some bogus value (like in my example).

@andrewfg
Copy link
Contributor Author

Do you think expire would be sufficient?

@jlaur yes that is an interesting suggestion. It does partly address my issue, but not entirely as it would still require a rule. I think I will try to write such a profile, and see what is the balance of reviewers opinion (I can eventually withdraw it)..

@andrewfg andrewfg linked a pull request Feb 19, 2025 that will close this issue
@jimtng
Copy link
Contributor

jimtng commented Feb 21, 2025

It does partly address my issue, but not entirely as it would still require a rule.

Wouldn't you still need a rule to react to the ON/OFF?

@andrewfg
Copy link
Contributor Author

Wouldn't you still need a rule to react to the ON/OFF?

Not really. I have a particular UI page that shows stuff that needs maintenance.

@andrewfg andrewfg changed the title Wondering if I shall I create a new "Flat Line" profile? [basicprofiles] Vreate a new "Flat Line" profile? Mar 4, 2025
@andrewfg andrewfg changed the title [basicprofiles] Vreate a new "Flat Line" profile? [basicprofiles] Create a new "Flat Line" profile? Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants