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

[feat] - log message for stall recovery #295

Open
jacobw opened this issue Sep 12, 2024 · 8 comments · Fixed by #310
Open

[feat] - log message for stall recovery #295

jacobw opened this issue Sep 12, 2024 · 8 comments · Fixed by #310
Assignees
Labels
enhancement New feature or request

Comments

@jacobw
Copy link

jacobw commented Sep 12, 2024

Hi,

I'm getting great log messages from the stall feature now thank you.

My next request is a log message for recovery. These days it happens fairly oftem, so I go and check the temp to see if the line has some angles. It would be much better if I could see the sensor recover in the logs if thats possible.

I tried to understand the code base to make a PR but unfortunately I couldn't work it out exactly (_remove_stale_tracking?). I was wondering if when the code that would reset the time, could check if the state was currently stalled, then log that it's being reset as part of the reset process.

The reason I'd like this is to see how long the stalls are. Can't tell if they are just over my 5 min timer, or longer etc.

This is what I see. This is mainly due to bluetooth issues.

2024-09-12 00:50:11.969 WARNING (MainThread) [custom_components.dual_smart_thermostat.climate] Climate (main_bedroom_climate) - sensor (sensor.yz_e871_temperature) is stalled, call the emergency stop
2024-09-12 02:20:14.948 WARNING (MainThread) [custom_components.dual_smart_thermostat.climate] Climate (main_bedroom_climate) - sensor (sensor.yz_e871_temperature) is stalled, call the emergency stop
2024-09-12 03:49:14.110 WARNING (MainThread) [custom_components.dual_smart_thermostat.climate] Climate (main_bedroom_climate) - sensor (sensor.yz_e871_temperature) is stalled, call the emergency stop

Thanks,
Jacob

@swingerman swingerman self-assigned this Oct 22, 2024
@swingerman swingerman added the enhancement New feature or request label Oct 22, 2024
@swingerman swingerman changed the title Log message for stall recovery [feat] - log message for stall recovery Oct 22, 2024
swingerman pushed a commit that referenced this issue Oct 29, 2024
swingerman pushed a commit that referenced this issue Oct 29, 2024
@swingerman
Copy link
Owner

Please check v0.9.8.4beta-1

@jacobw
Copy link
Author

jacobw commented Oct 31, 2024

@swingerman I've had 3 stall messages in the last 24 hours and no recovery messages, and the sensors have recovered.

Can I do anything to help debug?

2024-10-31 18:43:36.137 WARNING (MainThread) [custom_components.dual_smart_thermostat.climate.lounge_climate] Climate (main_climate) - sensor (sensor.yz_9ef0_temperature) is stalled, call the emergency stop

@swingerman
Copy link
Owner

The recovery message is an info level message at this point. Can you set the logging level accordingly and check it?
I can raise the log level to warning for this message, but I'm unsure if it's right.

@swingerman swingerman reopened this Dec 4, 2024
@jacobw
Copy link
Author

jacobw commented Dec 5, 2024

I've enabled info logging.
I had a stall about 20 minutes ago, but the climate control is currently running so I assume its recovered, and I can't find the text "recovered" in the logs.
My 2c - I think warning would be better, as it's an important message to me.

swingerman pushed a commit that referenced this issue Dec 6, 2024
swingerman pushed a commit that referenced this issue Dec 6, 2024
@swingerman
Copy link
Owner

Implemented warning and will include in the next release

@jacobw
Copy link
Author

jacobw commented Dec 7, 2024

Great, working!

I think perhaps the formatting is broken though:

2024-12-07 21:48:43.747 WARNING (MainThread) [custom_components.dual_smart_thermostat.climate.lounge_climate] Climate (main_bedroom_climate) - sensor (sensor.yz_e871_temperature) is stalled, call the emergency stop

2024-12-07 21:48:47.883 WARNING (MainThread) [custom_components.dual_smart_thermostat.climate.lounge_climate] Climate (main_bedroom_climate) - sensor (sensor.yz_e871_temperature) recovered with state: <state sensor.yz_e871_temperature=21.9; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=YZ E871 Temperature @ 2024-12-07T21:48:47.883473+13:00>

Also, had two occurrences of stalling for 4 seconds. Given the only update every minute I wish I knew why. Perhaps bthome/HA bluetooth ?

@swingerman swingerman reopened this Dec 9, 2024
@swingerman
Copy link
Owner

Not sue. What do you mean about broken formatting?

@jacobw
Copy link
Author

jacobw commented Dec 11, 2024

Oh it looked like it might be print out a string representation of an object or something. Was just checking that that was intended - sounds like not a problem!

Thank you very much for this feature.

I'm noticing many stalls and recoveries in seconds, (1 sec and 4 sec for example). Any idea how to debug what is causing this to be considered stalled as it only send updates once per minute.

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

Successfully merging a pull request may close this issue.

2 participants