-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
BUG: Sensor error/offline requires restart of octoprint #93
Comments
Actually, it seems like even one bad sample can trigger this... |
Note my ideal behavior in case of invalid or absent sensor data would be the following:
|
This I can not recreate - tried using a file for input and deleting it - basically it just skips the data Could you explain in details how to recreate - what data does the sensor return when failing? |
It seems to break if the command returns nothing. Until that is fixed, try this to replicate: bash -c "if [ -e /tmp/crap ]; then /bin/true; else date +%M; fi" It should give a graph cycling from 0 to 60 (corresponding to the time in minutes) Then after a few samples, type "touch /tmp/crap" in a shell (which simulates the sensor returning nothing) Then after a few minutes type "rm /tmp/crap" in a shell (which will simulate sensor returning to normal). I believe this is related to my latest comment re-opening #88 |
Were you able to replicate with the above explanation? |
Have not tried yet. |
I am still getting the problem whereby if a sensor is offline (and thereby returns an error) that the graph fails even when the sensor resumes... And that the problem can only be reset by restarting Octoprint. i.e., still get a blank graph with NA for avg/min/max.. The correct behavior would be just to "skip" the time series points without valid data -- i.e. don't display the value (just display NA) or the graph (blank or gap in the graph) for those points and don't include them in the min/max/average. |
@LazeMSS - any ideas why this is still occuring? |
I'm on holiday will look later |
Enjoy your vacation!!!! I'm sure it's well-deserved.
LazeMSS wrote at about 21:06:14 -0800 on Sunday, January 29, 2023:
I'm on holiday will look later
--
Reply to this email directly or view it on GitHub:
#93 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
I still can't recreate this. |
OK here is a command you can use to recreate the problem:
where for TSTART substitute a value say a 100 seconds after the current epoch time (date +%s) and for TEND substitute a time say 200 seconds after the current epoch time. Set the sampling frequency to say 10 seconds. |
Note that fixing the problem in #88 doesn't fix this problem, However, when running as a sensor it displays updated sample data until TSTART, then it presumably timesout between TSTART and TEND with no new data -- so it is left displaying the last valid data before TSTART. I wonder whether the problem occurs in the function 'runCustomMon' where a timeout would mean that self.handleCustomData is not called leaving potentially a 'hole' in the data time series which causes the display to fail/stop? Either way, this should allow you to reproduce the problem... and it is important to fix it since it's a very real case where the sensor may temporarily time out (or give invalid data). Let me know if the above makes sense or you need any other info to reproduce. Thanks |
Anything I can help do to fix the problem? |
I had a sensor offline for a while so that the custom command returned nothing (null string)
When the sensor came back online, it still had the display frozen at the last good value and the graph showing no data with the x-axis labeled as all zeros and the avg/min/max showing Null.
Refreshing the web browser didn't help.
Going into the settings for TopTemp and running 'test' showed that the sensor command was working again... just somehow the lack of good data had frozen the display and borked the graph history.
The only way I could fix it was by restarting octoprint (which is obviously non-ideal for many reasons)
The lack of sensor data (or even the presentation of 'bad' sensor data) should be handled gracefully... :)
The text was updated successfully, but these errors were encountered: