How to fetch Enclosure Temperature using REST API


#1

Using the excellent enclosure plugin, I've added a temperature sensor for my enclosure and It is displaying in the header.

I've put together a little wireless printer monitor using https://github.com/Qrome/printer-monitor.

What I'd like to do is to enhance the printer monitor code so that it would display the enclosure temperature as well as the tool and bed temperatures.

Ideally, I'd like to be able to add it to the results coming back from /api/printer.

I'm just wondering if there's a way to enhance the api, or if there's a way to create a plugin to do that.

Thanks in advance for steering me in the right direction.


#2

Hmmm, Looking at the Enclosure plugin looks like it has an 'api' of it's own. Maybe the right route would be to look into enhancing that....

Off to clone it and look at the code...


#3

And the more I dig into this, it looks like what I want is the blueprint plug in.

Time to get my dev environment seutp.


#4

I'm waiting for Octoprint to store and graph more variables :slight_smile:


#5

Well, Followed the tutorial and stole some code from the enclosure plugin and made my own plugin to grab the enclosure temperature then modified the code for the printer monitor to display it with the bed and tool temps. Easy peasy, and now I know enough to be dangerous with plugins and api calls, lol.

New photo by Brent Dowell