Providing bed temperature value to the OctoPI via API


#1

Hi. I have built a heated bed support for my printer and connected it to a raspberry PI via GPIO.

The heated bed is not connected to the printer (its motherboard) itself at all, I am controlling it through a python script which is running on the raspberry pi (the same one, on which the octopi is running too).

When octopi sets a bed temperature, I read this through the octopi API and my python script sets the bed to the temperature desired by octopi.

The problem is, that I don't know how to tell the octopi the current bed temperature. Normally, the octopi gets the bed temperature directly from the printer, via the USB cable, but my bed is not connected to the printer, so of course the printer has no idea that there is a heated bed mounted on it.

So my question is, how can I use the octopi API to tell the octopi that the heated be is currently X degrees hot..?

thanks


#2

You can't via the API. That's simply not possible in the current implementation and also not something I'd change in the future.

You can build a plugin though that hooks into the received temperatures and adds the bed temperature there. The same plugin could also capture bed commands when they are about to be sent, use those to set the temperature on the bed and not forward them to the printer.


#3

Thanks. I guess I will just just skip that part then, since I only needed it to be able to use the "wait for bed to heat" gcode in my prints.