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

Debug PWM timings #284

Open
nistvan86 opened this issue Jan 24, 2025 · 2 comments
Open

Debug PWM timings #284

nistvan86 opened this issue Jan 24, 2025 · 2 comments

Comments

@nistvan86
Copy link

nistvan86 commented Jan 24, 2025

Is your feature request related to a problem? Please describe.
The debugging options are great to see P/I/D/E values, but they don't include internal PWM timings and when will the next heater event happen.
This would be a useful info when there's min_cycle_duration setting involved, since if the current power value would create a smaller on/off duration than what's possible, the PWM length is stretched, as discussed here, but the extent is not visible to us. It's hard to figure out when will the thermostat fire the heater next time.

Essential this debug log message turned into attributes:
[custom_components.smart_thermostat.climate] climate.smart_thermostat_bedroom: Time until switch.bedroom_heater turns ON: 1326 sec.
Something like next_event_in: 1326 as the current state of the thermostat is known. As an added bonus the time_on, time_off ratio from the pwm_switch handler would be also interesting as attributes.

Describe the solution you'd like
Please add additional debug info related to PWM cycle timings.

@ScratMan
Copy link
Owner

Hello, the issue is that adding attributes to the state of the entity will generate a new state line in the database each time and attribute is changed. That can saturate the database quickly. That's why I already had to remove most of the debugging parameters from the attributes.

@nistvan86
Copy link
Author

I see, that's unfortunate.
If you cannot solve it this way, it's okay to close it; i'll use the log output with enabled add-on debug.
Thanks for the answer!

And by the way thank you for this amazing project, it seems to work great on my side.
I wrote a small tutorial about how i tuned it for an on/off gas boiler, if you want to add it to the readme, feel free. https://docs.google.com/document/d/1SYQxjMJ8vJnhU-7zxUrSQMOWPfgQsHsOKm13ai4pnsU/edit?tab=t.0#heading=h.orm2bk5yjd9t
I'm not sure how correct it is though.

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

No branches or pull requests

2 participants