Max/Min in temp graph

Would be possible to see (or add in further releases) the min and max reached temperature in the temperature graph ? In example, I would like to select a temperature range (let's say, 1 hours from now) and see which temperature was the higher and the lower in that time rage.

Is useful when trying to evaluate fan ducts, hotend insulation socks and so on.

The bad news is that nobody (as far as I know) has written anything like that yet. The good news is that OctoPrint has a pretty decent plugin infrastructure to allow anyone with Python/JavaScript skills to create what you're suggesting.

I would guess that this would be a good place to start. It's octoprint.comm.protocol.temperatures.received which sounds promising.

I have no idea at all if this works but I'm just "coding in air" as-it-were from an example that's in the documentation. In theory, you could test the thrown value over in that helper function, determine if it's higher/lower than what is stored and then adjust that high-/low-water mark.

do-something-with-temperatures.py

# coding=utf-8

def analyze_temperatures(comm, parsed_temps):
    for k, v in parsed_temps.items():
        do_something_with(v[0])
    return dict((k, v) for k, v in parsed_temps.items()

def do_something_with(actual):
    pass

__plugin_name__ = "Analyze Temperatures"
__plugin_hooks__ = {
    "octoprint.comm.protocol.temperatures.received": analyze_temperatures
}

I think there is no API for manipulating the Graph e.g. add an other max.line, but you can try to manipulate the below table with some JavaScript-Hacks.
Now you only need to take the snippet from @OutsourcedGuru and start writing a plugin :wink:


... if I had time I would love to do this, because I think it is a very useful feature

Good luck
Olli

In a case like this (where you need both JavaScript/CSS hacks plus a little Python coding), I would suggest taking a look at foosel's how-to on writing a full plugin using the cookiecutter. Your JavaScript then might use jQuery to insert some TD fields as Ollis has indicated.