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

PID widgets display null instead of negative values #1372

Open
drgrumpy opened this issue Mar 14, 2024 · 12 comments
Open

PID widgets display null instead of negative values #1372

drgrumpy opened this issue Mar 14, 2024 · 12 comments

Comments

@drgrumpy
Copy link

Recently upgraded from 8.4 to 8.15.3, via clean install on new SD card.

Seems that PID widgets display NULL instead of negative values: see screenshot:

Screenshot_2024-03-14_11-52-06

Been checking for a couple of days - tt seems the PID controls shown are both running as expected (as on 8.4 running for years), i.e. at time of screenshot the cooiing PID is negative and output is active, so purely a display issue. When values are zero or positive they display as expected. I also notice also that the PID widgets no longer display a graph of the values, so presumably there has been rewrite somewhere, but I couldn't spot in the changelog.

@drgrumpy
Copy link
Author

Also may be related, the Cooling PWM output duty cycle % does not display on the main graph, despite being active and running at 50% (checked in outputs and physically)

@kizniche
Copy link
Owner

Please elaborate on the two times you mentioned a graph. The PID widget has never had a graphing element. I'll look into the value display.

@drgrumpy
Copy link
Author

Sorry I'll need to check on what I mean by graph on PID widget, now I'm confused, sorry. For main graph I mean: Graph (Synchronous) [Highstock] Widget Configuration - I'll try to get a screenshot

@drgrumpy
Copy link
Author

See screenshot:

The status box shows that the colling fan pwm output is 43.75, but there is nothing showing on the graph for Cooling PWM, I expect to see a bar (green) with value of 43% (data grouping is off) similar to the lights, also earlier values are missing. This worked fine in 8.4

You can also see that the negative values are not showing in the pid widget.

Screenshot_2024-03-20_12-50-42

@kizniche
Copy link
Owner

kizniche commented Mar 20, 2024

Your CV is not a positive value, it's negative.

@drgrumpy
Copy link
Author

drgrumpy commented Mar 20, 2024

Thanks. Yes the CV is negative and doesn't show in the PID widget. But the duty cycle Cooling PWM on the output is positive (the fan wouldn't be running otherwise), so I expect to see it displayed as a positive value. This all used to 'just work' on 8.4, I believe I have set up everything the same.

@drgrumpy
Copy link
Author

Same type of set up - negative values display in PID widget, and Cooling (Fan) PWM output displaying as expected in 8.12.9

phspi08 Screenshot_2024-03-22_16-16-32

Also apologies about the graph confusion - I had set up mini-graphs to display the PID values

@kizniche
Copy link
Owner

Thanks for the documentation. I'll investigate soon.

@kizniche
Copy link
Owner

I committed a fix, if you'd like to test. It appears to be working on my end.

@drgrumpy
Copy link
Author

Apologies for being slow, I made the change in widget_pid.py line 408 and restarted backend:
if (document.getElementById(name + '-' + widget_id)) {
also tried (more recent):
if (data[name][1] != null && document.getElementById(name + '-' + widget_id)) {

But no change - values still show as null

@kizniche
Copy link
Owner

kizniche commented Apr 16, 2024

Widgets need Widget HTML to be regenerated for any changes to take effect. This can be done on the Diagnostic Configuration page. Widgets run on the frontend, not the backend, so the frontend needs to be restarted. This is automatically done when Widget HTML is regenerated.

@drgrumpy
Copy link
Author

Ah, Okay. Just done and now showing the negative values as expected. PWM still not showing in the synchronous graph, but I guess that is a completely different issue?

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

No branches or pull requests

2 participants