GithubHelp home page GithubHelp logo

vitormhenrique / octoprint-enclosure Goto Github PK

View Code? Open in Web Editor NEW
396.0 45.0 202.0 673 KB

OctoPrint Enclosure Plugin

License: GNU General Public License v3.0

Python 58.07% JavaScript 10.65% C++ 0.93% CSS 0.54% Jinja 29.80%
temperature-sensor enclosure raspberry-pi gpio sensor filament-sensor temperature-alarm octoprint enclosure-plugin printer

octoprint-enclosure's Introduction

Find the plugin useful? Buy me a coffee Donate

THIS PLUGIN IS DEPRACATED!

I'm moving away from it, and when ready the replacement plugin would be here: https://github.com/vitormhenrique/OctoPrint-Enclosure-V2

Before opening an issue...

Check the troubleshooting guide. Issues with no log, no print screen will be closed until the necessary documentation is available.

Also, be aware that upgrading from versions lower than 4.00 will DELETE all settings. More information on release notes

OctoPrint-Enclosure

Control pretty much everything that you might want to do on your raspberry pi / octoprint / enclosure

Here is a list of possibilities:

  • Add temperature sensors on your enclosure or near your printer
  • Add active heaters on your enclosure and keep the temperature nice and high for large ABS
  • PWM controlled outputs
  • PWM controlled outputs based on temperature sensor
  • Active cooling for good PLA printing
  • Schedule GPIO's to turn on and off with a fixed period of time during printing.
  • Mechanical buttons to pause and resume printer jobs
  • Mechanical buttons to send GCODE to the printer
  • Mechanical buttons to control raspberry pi GPIO
  • Multiple filament sensors for dual or more extruders
  • Alarm when enclosure temperature reaches some sort of value
  • Notifications using IFTTT when events happen (temperature trigger / print events / etc)
  • Add sub-menus on navbar to quick access outputs and temperature sensors

Check pictures on thingiverse: http://www.thingiverse.com/thing:2245493

Installation

Install the plugin using the Plugin Manager bundled with OctoPrint, you can search for the Enclosure plugin or just use the url: https://github.com/vitormhenrique/OctoPrint-Enclosure/archive/master.zip.

Hardware

This plugin support many hardware temperature sensors, led, relays, heater...

Here are detailled instructions on how to setup them.

Temperature sensors

To control the enclosure temperature or get temperature triggered events, you need to install and configure a temperature sensor. This plugin can support DHT11, DHT22, AM2302, DS18B20, SI7021, BME280 and TMP102 temperature sensors.

DHT11, DHT22 and AM2302 sensors

Wire the sensor following the wiring diagram on the pictures on thingiverse; you can use any GPIO pin.

For DHT11 and DHT22 sensors, don't forget to connect a 4.7K - 10K resistor from the data pin to VCC. Also, be aware that DHT sensors some times can not work reliably on linux, this is a limitation of reading DHT sensors from Linux--there's no guarantee the program will be given enough priority and time by the Linux kernel to reliably read the sensor. Another common issue is the power supply. you need a constant and good 3.3V, sometimes a underpowered raspberry pi will not have a solid 3.3V power supply, so you could try powering the sensor with 5V and using a level shifter on the read pin.

You need to install the Adafruit library to use the temperature sensor on Raspberry Pi. Recent versions of this plugin have moved to supporting the CircuitPython-based library on Python3 installed below.

Open a raspberry pi terminal and type:

pip3 install adafruit-circuitpython-dht
sudo apt-get update
sudo apt-get install libgpiod2 -y

This will install all requirements of the library.

You can test the library by using the sample code from https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/python-setup.

DS18B20 sensor

Follow the wiring diagram on the pictures on thingiverse. The DS18B20 uses "1-wire" communication protocol, DS18B20 only works on GPIO pin number 4 by default. You also need to add OneWire support for your raspberry pi.

Start by adding the following line to /boot/config.txt

dtoverlay=w1-gpio

After rebooting, you can check if the OneWire device was found properly with

dmesg | grep w1-gpio

You should see something like

[    3.030368] w1-gpio onewire@0: gpio pin 4, external pullup pin -1, parasitic power 0

If you're using the internal pullup resistor, you'll need to enable it manually by running these Python commands. Or, you can simply configure the sensor inside of the Enclosure plugin, which will do this for you.

You should be able to test your sensor by rebooting your system with sudo reboot. When the Pi is back up and you're logged in again, type the commands you see below into a terminal window. When you are in the 'devices' directory, the directory starting '28-' may have a different name, so cd to the name of whatever directory is there.

sudo modprobe w1-gpio
sudo modprobe w1-therm
cd /sys/bus/w1/devices
ls
cd 28-xxxx (change this to match what serial number pops up)
cat w1_slave

The response will either have YES or NO at the end of the first line. If it is YES, then the temperature will be at the end of the second line, in 1/000 degrees C.

Copy the serial number, you will need to configure the plugin. Note that for the serial number includes the 28-, for example 28-0000069834ff.

The DS18B20 needs a pullup resistor on the data pin. On modern Pi models, you can use a resistor built into the Pi, configured in software. To do this, set the "Input Pull Resistor" option to "Input Pullup". If this doesn't work, you need to use a 4.7K to 10K resistor from the data pin to VCC.

SI7021, BME280, TMP102 and MCP9808 sensors

Enable I2C on your raspberry pi, depending on raspi-config version, step by step can be different:

sudo raspi-config
  • Use the down arrow to select 9 Advanced Options
  • Arrow down to A7 I2C
  • Select yes when it asks you to enable I2C
  • Also select yes when it asks about automatically loading the kernel module
  • Use the right arrow to select the button
  • Select yes when it asks to reboot

Install some packages (on raspberry pi system python not octoprint virtual environment):

sudo apt-get install i2c-tools python-pip python-smbus

Find the address of the sensor:

i2cdetect -y 1

Neopixel

If your setup does not have pip install pip: sudo apt-get install python-pip

Install the required library: sudo pip install rpi_ws281x

rpi_ws281x really needs sudo, and you need to setup up so your rpi does not ask for a password when runing a python script, so run:

sudo visudo

and add pi ALL=(ALL) NOPASSWD: ALL to the end of the file.

Also backlist the audio kernel:

sudo nano /etc/modprobe.d/snd-blacklist.conf

add the blacklist snd_bcm2835 to the end of the file.

GPIO

This release uses RPi.GPIO to control IO of raspberry pi, it should install and work automatically. If it doesn't please update your octoprint with the latest release of octopi. You can use relays / mosfets to control you lights, heater, lockers etc... If you want to control mains voltage I recommend using PowerSwitch Tail II.

Relay

The relays module that I used couple SainSmart 2-Channel Relay Module. Those relays are active low, that means that they will turn on when you put LOW on the output of your pin. In order to not fry your Raspberry Pi pay attention on your wiring connection: remove the jumper link and connect 3.3v to VCC, 5V to JD-VCC and Ground to GND.

Heater

For heating my enclosure I got a $15 lasko inside my enclosure. I opened it and added a relay to the mains wire. If you’re uncomfortable soldering or dealing with high voltage, please check out the PowerSwitch Tail II. It is fully enclosed, making it a lot safer.

CAUTION: VOLTAGE ON MAINS WIRE CAN KILL YOU, ONLY ATTEMPT TO DO THIS IF YOU KNOW WHAT YOU ARE DOING, AND DO AT YOUR OWN RISK

CAUTION 2: THIS HEATER IS NOT INTENDED TO FUNCTION THIS WAY AND IT MIGHT BE A FIRE HAZARD. DO IT AT YOUR OWN RISK

Cooler

You can get a USB Mini Desktop Fan and control it over a relay.

Filament sensor

You have the ability to add a filament sensor to the enclosure, it will automatically pause the print and run a gcode command to change the filament if you run out of filament, I can be any type of filament sensor, the sensor should connect to ground if is set as an "active low" when the filament run out or 3.3v if the sensor is set as "active high" when detected the end of filament, it does not matter if it is normally open or closed, that will only interfere on your wiring. I'm using the following sensor:

http://www.thingiverse.com/thing:1698397

Plugin configuration

You need to enable what do you want the plugin to control. Settings from plugin version < 3.6 are not compatible anymore, you will loose all settings after upgrading the plugin.

There are mainly two types of configuration on the plugin, Inputs and Outputs.

Outputs are meant to control THINGS (temperature, lights, locker, extra enclosure fans etc...) You can even use a PowerSwitch Tail II and completely shut down your printer after the print job is done.

Outputs can be set to the following types:

  • Regular GPIO
  • PWM GPIO
  • Neopixel Control via Microcontroler
  • Neopixel Control directly from raspberry pi
  • Temperature and Humidity Control
  • Temperature Alarm
  • Gcode Output

Most outputs create UI elements on enclosure plugin tab that let you set values / turn on or off gpios etc. You have the ability to automatically turn on or off outputs when the printer starts or finishes. You can even specify a hour on HH:MM 24 hour format, events will only be schedule when the print starts, and will only be triggered for the very next time that hour occur.

Temperature Alarm will control another GPIO output after a certain temperature is met. This is useful if you want to add some sort of alarm near your printer, or even build some fire extinguisher on your enclosure. Note that I'm not responsible for any damage caused by fires, you should have proper smoke detectors on your house installed by professionals.

Inputs are methods that trigger actions or input values to the plugin (temperature sensor, GPIO trigger)

Inputs can be of two different types:

  • Temperature Sensors
  • GPIO

Temperature Sensors will be used to input temperature and humidity data, they can be linked to a especial output like temperature control and temperature alarm.

GPIO inputs will trigger events for the plugin, this feature can be used to add buttons to the enclosure and cause pressing those buttons to act on the printer or other pre-configured outputs.

After selecting GPIO for the input type, and selecting output control on the action type, the button will be able to turn on / off or toggle linked regular_gpio outputs, basically being able to control your lights / fan using mechanical buttons instead of the octoprint interface. You can also use buttons to send g-code commands.

Selecting print control on the action type will trigger printer actions when the configured GPIO receives a signal. The actions can be Resume and Pause a print job or Change Filament. You can use the "change filament" action and set up the input GPIO according to your filament sensor, for example, if your filament sensor connects to ground when detects the end of the filament, you should choose PULL UP resistors and detect the event on the falling edge. You can also add mechanical buttons to pause, resume and change filaments near your printer for convenience.

Advanced Area

If you want to enable notifications check the following issue

You can control outputs using a simple API

Or use g-code commands

Tab Order

I often use more this plugin than the time-lapse tab, so having the plugin appear before the timelapse is better for me.

You can do this by changing the config.yaml file as instructed on octoprint documentation . Unless defined differently via the command line config.yaml is located at ~/.octoprint.

You just need to add the following section:

appearance:
  components:
    order:
      tab:
      - temperature
      - control
      - gcodeviewer
      - terminal
      - plugin_enclosure

octoprint-enclosure's People

Contributors

ameixler avatar coliss86 avatar columbo818 avatar d-buchmann avatar dabu5 avatar dak0r avatar deafloo avatar dracrius avatar hucker avatar jneilliii avatar lopromise avatar marrony avatar marshaul avatar munzli avatar n8many avatar pciavald avatar piranit avatar qtemp avatar raoulh avatar rfbomb avatar rhooper avatar rjaros87 avatar shagoy avatar skyhisi avatar stefancohen avatar thijstriemstra avatar tirpitz93 avatar unchartedbull avatar vitormhenrique avatar yeraze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

octoprint-enclosure's Issues

MOAR IO!

Bet you saw this coming. I need one more io at least lol. I ended up putting hotend, ramps, and an eclosure fan on relays, plus the lights and I'm maxed out. I holding out hope for temp triggers some point down the line so I am installing the fire supression soleniod setup now since I have the parts ready.

Adding Blob detection.

Hi,

I'm actually designing a blob detection ( https://github.com/ChrisP-Git/BlobDetector ) that detects if the print get unstuck from the bed and stick to the nozzle, which will create a plastic blob that can detroy extruder wiring.

The thing is based on a laser barrier managed by an arduino that will trigger a digital port in case of obstruction. In this case, the print should be stopped. It's different from end of filament detection where the print should be paused.

What would be perfect would be an additionnal action with specific GPIO port.

Would that be possible, or even make sense to you ?

Output control doesn't work if temperature control is not configured

When the temperature control isn't configured, you get the following error message:

2017-07-07 13:43:43,642 - octoprint.plugins.enclosure - WARNING - An exception of type ValueError occurred on configureGPIO. Arguments: ('The channel sent is invalid on a Raspberry Pi',)

The fix is to check if isEnabled is set:

--- __init__.py.old     2017-07-07 14:23:26.880788941 +0000
+++ __init__.py.new     2017-07-07 14:22:39.850940495 +0000
@@ -370,7 +370,8 @@
     def configureGPIO(self):
         try:
             for control in self.temperature_control:
-                 GPIO.setup(self.toInt(control['gpioPin']), GPIO.OUT, initial=GPIO.HIGH if control['activeLow'] else GPIO.LOW)
+                if control['isEnabled']:
+                    GPIO.setup(self.toInt(control['gpioPin']), GPIO.OUT, initial=GPIO.HIGH if control['activeLow'] else GPIO.LOW)
             for rpi_output in self.rpi_outputs:
                 pin = self.toInt(rpi_output['gpioPin'])
                 if rpi_output['outputType'] == 'regular':

Fan control via temperature

Hi,

Awesome plugin to start with. I was planning something along these lines when yours was released - saved me a whole bunch of work.

My current problem is that I'm using temperature control to control a small fan. Set up to turn on a relay at x degrees, it works perfectly. However, when the temperature drops below x degrees again, the relay does not turn off.

Am I doing something wrong?
Is this the way it's designed?

Cheers,
Mike.

Setting Enclosure Temperatur via G-Code / Octoprint

I have this crazy idea to set the enclosure temperatur depending on the filament type im using.
And not simple switch the fan on/off but using PWM with a PID control loop. (Dont have a heater, too scary)

I build a fan controller with an Arduino where i can set the temp and the fan speeds up if the temp gets too high. But it is missing the link to Octoprint.

I am ok with mixing examples for the arduino and make them run with a good looking code, but Linux on the Pi is something i have trouble with.

As a first step setting the temp in Octoprint would be great.

[Request] Navbar toggle button

Hi, It's me again, is it possible, in the next releases, to add toggle buttons for relay on the navbar (near the settings icon for example) like the "Octoprin PSU control" plugin? Maybe giving the possibility to choose which toggle add to the navbar and which not. Thank you!!

Default temperature for enclosure

Hi,
It would be nice to have a default temperature value in settings. It starts heating automatically when octoprint printing starts.

can't toggle without connection

When the printer is disconnected the buttons grey out and can't be clicked. being able to use the gpios at all times would be great if possible

NeoPixel Support

Hello, I've been trying to control a LED-Strip with your plugin and it doesn't seem to be working. I have communication with the Arduino but it doesn't seem to receive or the Raspberry to send anything. Does it work or is it still a work in progress?

I'd be happy to help with the Arudino code but I unfortunately know very little about coding for the RPi.

Thanks for the very useful plugin!
Marcel W.

Temperature and humidity in the navbar?

Hello,

Could the temperature and humidity be shown like this:
octoprint_-_google_chrome_2017-04-16_12-35-32_04352082

Maybe the possibility to set the names for the two values yourself (to make it fit)? Like T: 22C H: 35%
The "Navbar Temperature Plugin" shows the Pi temperature.

RuntimeError: Failed to add edge detection

Hi,
Filament sensor won't work for me. I see "RuntimeError: Failed to add edge detection" in logs.
I think it is about permissions. I added pi user to gpio group and my system is up to date.

Temperature charting

I have no idea if it's possible but adding a line to the temperature chart for enclosure temperature would be so helpful to me. I'm trying to see if my enclosure heating system is effective and well balanced but that's impossible without some kind of record of temperatures over time.

I already use OctoPrint-TempsGraph to improve my chart, so maybe there's a way to connect to that?

GPIO Input

When adding an input for GPIO control, the event trigger field is set to "fall" even if the "rise" option is selected.

Would it also be possible to add functionality to shut off the heater/temperature control from the GPIO input? I've added a smoke detector to my enclosure and would like to be able to shut off both the printer as well as the heater if smoke is detected.

(Also really minor but it looks like there's a typo in the plugin url in setup.py, so the octoprint plugin manager does not redirect to this github page properly.)

How to: Pause printer & executing gcode

I'm using a filament sensor and everything works well when I use "pause printer".
But there's a problem: The nozzle stays hot, the printer stops directly at the position where it got the signal. Means: Directly at the printed part.

My expectation for "pause printer" would have been:

  • printer stops x/y motions
  • print head will be raised (10-20mm would be enough)
  • printer stops heating (because if I'm not at home, it shouldn't stay heated unattended)
  • then I could manually change the filament (after manual preheating)
  • and after loading the new filament I click on "continue" in Octoprint and the print head lowers down to the last print position - and continues printing

Currently this is not working for me this way:

  • either it stops and stays heated (possibly for hours) ["pause printer"] OR
  • or it just ignores the filament sensor completely ["change filament"]

Is there anything I can do to achieve the behaviour I described?

Thank you!

serial connection to marlin 1.1 fails when toggling gpios

I setup five gpio outputs and went tot test them. if i toggle them for a bit at some point the printer disconnects with error:

Offline: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:1792

debug was enabled, here's log:

2017-04-11 20:05:26,089 - octoprint.plugins.enclosure - INFO - temperature_reading: [{u'sensorType': u'18b20', u'isEnabled': True, u'gpioPin': 4, u'useFahrenheit': False}]
2017-04-11 20:05:26,091 - octoprint.plugins.enclosure - INFO - temperature_control: [{u'autoStartup': False, u'isEnabled': False, u'defaultTemp': u'40', u'controlType': u'cooler', u'activeLow': True, u'gpioPin': u'3'}]
2017-04-11 20:05:26,092 - octoprint.plugins.enclosure - INFO - rpi_outputs: [{u'gpioPin': u'17', u'autoShutdown': True, u'label': u'Lights', u'autoStartup': True, u'active': False, u'activeLow': True, u'shutdownTimeDelay': u'3600', u'startupTimeDelay': 0}, {u'autoShutdown': True, u'shutdownTimeDelay': u'180', u'autoStartup': True, u'startupTimeDelay': 0, u'active': False, u'activeLow': True, u'label': u'Ramps Fan', u'gpioPin': u'27'}, {u'autoShutdown': False, u'shutdownTimeDelay': 0, u'autoStartup': False, u'startupTimeDelay': 0, u'active': False, u'activeLow': True, u'label': u'Fire Extinguisher', u'gpioPin': u'18'}, {u'autoShutdown': True, u'shutdownTimeDelay': u'3600', u'autoStartup': True, u'startupTimeDelay': 0, u'active': False, u'activeLow': True, u'label': u'Hotend Fan', u'gpioPin': u'22'}, {u'autoShutdown': False, u'shutdownTimeDelay': 0, u'autoStartup': False, u'startupTimeDelay': 0, u'active': False, u'activeLow': True, u'label': u'Cooling', u'gpioPin': u'3'}]
2017-04-11 20:05:26,093 - octoprint.plugins.enclosure - INFO - rpi_inputs: [{u'setTemp': 100, u'eventType': u'temperature', u'controlledIO': u'17', u'label': u'', u'inputPull': u'inputPullUp', u'edge': u'fall', u'setControlledIO': u'low', u'gpioPin': 0}]
2017-04-11 20:05:29,978 - octoprint.plugins.enclosure - INFO - Temperature read was: 25.4
2017-04-11 20:05:33,404 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/util/comm.py", line 1792, in _readline
ret = self._serial.readline()
File "build/bdist.linux-armv7l/egg/serial/serialposix.py", line 475, in read
raise SerialException('device reports readiness to read but returned no data (device disconnected or multiple access on port?)')
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2017-04-11 20:05:40,859 - octoprint.plugins.enclosure - INFO - Temperature read was: 25.4
2017-04-11 20:05:51,708 - octoprint.plugins.enclosure - INFO - Temperature read was: 25.4
2017-04-11 20:05:56,375 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin 1.1.0-RC8 (Github)"
2017-04-11 20:05:58,525 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin 1.1.0-RC8 (Github)"
2017-04-11 20:06:02,578 - octoprint.plugins.enclosure - INFO - Temperature read was: 25.4
2017-04-11 20:06:13,449 - octoprint.plugins.enclosure - INFO - Temperature read was: 25.4
2017-04-11 20:06:24,319 - octoprint.plugins.enclosure - INFO - Temperature read was: 25.5
2017-04-11 20:06:34,084 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/util/comm.py", line 1792, in _readline
ret = self._serial.readline()
File "build/bdist.linux-armv7l/egg/serial/serialposix.py", line 475, in read
raise SerialException('device reports readiness to read but returned no data (device disconnected or multiple access on port?)')
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2017-04-11 20:06:35,188 - octoprint.plugins.enclosure - INFO - Temperature read was: 25.5
2017-04-11 20:06:46,058 - octoprint.plugins.enclosure - INFO - Temperature read was: 25.5
2017-04-11 20:06:56,909 - octoprint.plugins.enclosure - INFO - Temperature read was: 25.5
2017-04-11 20:07:05,832 - octoprint.server.util.sockjs - INFO - Client connection closed: 192.168.1.17

Request: output status

Would love to be able to see the current status of an output. Right now you can't tell if an output is on or off.

Absolutely love this plugin, so thanks. Looking forward to next version. Sounds like some great additions!

failed to read temp and hum

Me again. I'm getting failed to read errors, I use a dht11 on pin 4 (or 7 however you look at it).

I enabled debug and attaching relevent bits:

2017-03-24 01:57:36,623 - octoprint.plugins.enclosure - INFO - DEBUG -> Reading temperature stdout: <open file '<fdopen>', mode 'rb' at 0x6a0aae38> 2017-03-24 01:57:36,625 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:57:36,681 - octoprint.plugins.enclosure - INFO - DEBUG -> Reading humidity stdout: <open file '<fdopen>', mode 'rb' at 0x6a0aaee8> 2017-03-24 01:57:36,683 - octoprint.plugins.enclosure - INFO - Failed to read Humidity

Let me know anything else you need to identify the conflict.

shutdown timouts

This may not be an issue in the next release already but I have two IO's set for fans. They are set to turn off 3 minutes after a print. the issue I'm seeing is that if the print ends and I start another before the shutdown delay has passed then they will still shutdown during that next print. since the IO start sequence has already fired at that point, they will remain off through whole operation.

I hope that's clear. ask any questions you need

Auto shutdown not working as expected

This plugin is great. I use it all the time and it's nice to know my printer will shut down after I have gone to bed! ;-)

I understand how auto shutdown works, but there is a pretty common scenario where it does something unexpected. Say, you have auto shutdown set for 500 seconds after print completes. These steps will cause a problem:

  1. Start a print
  2. Get a bad first layer
  3. Cancel print job
  4. Correct problem
  5. Restart print job
  6. Job is running fine until 500 seconds after the first cancel of print job in step 3

If you are using it to turn the PSU on and off (which is a fairly common set up), your second print job will fail because the shut down. You can manually start up the PSU again, but by that time the print has been messed up and things are out of sync.

Is it possible to cancel the outstanding shut down timers when a new job is started?

GPIO pin numbering

Thanks for the plugin. It'll be just what I need. For now, I'm just trying to control the PC power supply that supplies power to my printer. I have configured GPIO 17 (board pin 11) as an output. However, using the button, for that GPIO, in your interface does not change the output voltage. So I must be doing something wrong.

To check my sanity, I went into Python and used the RPi.GPIO module to control the pin and that works. If I configure GPIO.BCM, it's pin 17 that works. If I configure GPIO.BOARD, it's pin 11 that works.

Can you figure out what I'm doing wrong?

I have version 3.51 of the plugin.

Output state changes on config change

If I make any changes to enclosure config, outputs always turn off rather than staying in their previous state.

Reproduce:

  1. Create output and turn output on/high
  2. Change any enclosure config item (does not have to be related to output)
  3. Save config. Output is now in low/off state.

In my case, it turns off the printer.

Additionally, when octoprint server is restarted, outputs return to low/off state.

Other Temperature Sensors

Is there any possibility to change the sensor type to DS18B20? So DHT sensors are sometimes hard to get in some countries. Would be nice if there is an easy way to change this. Also would be interesting adding a second or some more fans.

Thanks in advance
Regards
Dominik

Turn off temperature control from GPIO input

Would it also be possible to add functionality to shut off the heater/temperature control from the GPIO input? I've added a smoke detector to my enclosure and would like to be able to shut off both the printer as well as the heater if smoke is detected.

Incorrect link in temperature sensor setup

Under Temperature Sensor configuration, within Sensor Type, there is a link to this github page for information about sensor libraries. The URL is incorrect, and the browser treats it as a relative rather than static link. I think it needs https:// in the URL.

Failed to convert to float using DS18B20?

I'm getting an error in my logs that says "octoprint.plugins.enclosure - INFO - Failed to convert to float" when trying to read the temperature from a DS18B20 sensor. If I run the scrip manually, I get the proper temperature:

pi@octopi:~/.octoprint/plugins/OctoPrint-Enclosure/extras $ sudo ~/.octoprint/plugins/OctoPrint-Enclosure/extras/GetTemperature1820.py 1820
20.3

It seems sTemp is empty after the Popen to the get temperature script...

Anything I'm missing?

GPIO only works after toggling "Use Board Pin".

I have a led connected to GPIO17.
Every time I reboot octoprint I need to toggle the "Use Board Pin #", save it and toggle it again before the GPIO works. After the toggle everything works as expected until a reboot.

Temperature sensor shown values

Just got a DHT11 connected and am testing that out. Have a suggestion and issues.

  1. Please show temperature type indicator (F/C) next to temperature readout

  2. The temperature shown sometimes has massive precision. I saw a temp a minute ago that showed something like (69.8000000000). Couldn't see beyond the last 0, as it overfilled the table cell.

  3. Temperature readout is all over the place sometimes. Right now it's about 68 degrees, and usually shows 68, but sometimes shows completely random numbers like 154.4 and 300+. I assume this is a return from the DHT library, but I'm unsure how I could test this further at a command prompt.

temperature broken with new upate

Hello,
I updated your plugin to the latest version and after reboot I couldn't see anymore the temp and humidity readings, it was just blank. I tried reinstalling, nothing. I wiped the SD card and started with octoprint and the plugin from scratch, still it won't show any values. I looked for the folders /.octoprint/plugins/octoprint-enclosure/extras/ but they are all missing now, they haven't been created when the plugin was installed via Plugin Manager. I no longer find GetHumidity.py and GetTemperature.py scripts in there, are they no longer required? I tried to add everything but I can no longer locate them at "https://raw.githubusercontent.com/vitormhenrique/OctoPrint-Enclosure/master/extras/GetHumidity.py ".
Please help me figure this out cause I've been struggling to get it to work but nothing. If I run the example scripts to check the sensors, it outputs proper values.

Heater disabled but getting log errors

2017-02-03 15:07:06,556 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:06,612 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:06,615 - octoprint.plugins.enclosure - INFO - Turning heater off.
2017-02-03 15:07:16,672 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:16,725 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:16,727 - octoprint.plugins.enclosure - INFO - Turning heater off.
2017-02-03 15:07:26,783 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:26,839 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:26,843 - octoprint.plugins.enclosure - INFO - Turning heater off.
2017-02-03 15:07:36,899 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:36,957 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:36,961 - octoprint.plugins.enclosure - INFO - Turning heater off.
2017-02-03 15:07:46,993 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:47,024 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:47,029 - octoprint.plugins.enclosure - INFO - Turning heater off.
2017-02-03 15:07:57,085 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:57,141 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:07:57,145 - octoprint.plugins.enclosure - INFO - Turning heater off.
2017-02-03 15:08:07,201 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:08:07,256 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:08:07,260 - octoprint.plugins.enclosure - INFO - Turning heater off.
2017-02-03 15:08:17,316 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:08:17,372 - octoprint.plugins.enclosure - INFO - Failed to convert to float
2017-02-03 15:08:17,376 - octoprint.plugins.enclosure - INFO - Turning heater off.

OctoPrint-telegram integration

Why don't you consider the integration with "OctoPrint-telegram" plugin integration adding the possibility to switch relay, see temperature,... from telegram bot? And what about adding the switch button on the navbar? Beautiful plugin, anyway!

Gap Control and over temperature protection

Thanks for the plug-in

I did something similar using Arduino, but am fairly new to the raspberry pi and Octoprint.

Is it possible to add two additional features?

  • gap control - allow the temperature to drift by a user specified gap above and below the set temperature. This could potentially prevent short runs on the heating element

  • allow the user to specify a maximum temperature and then either shutdown the heating element (and not use it again) or assume a worst case scenario and completely shutdown the printer

Thanks again

add input button no action

windows 10, firefox latest stable, no ad block etc. octoprint is on rpi3.

Add output works fine. The first time I hit add input it closed the settings menu. every time since it just does nothing

I2C LCD

Hi, your plugin is awesome, but missing one thing. Is it possible to implement I2C 1604 or 2004 LCD and display temperatures and status of the enclosure? I'm thinking about LCD next to hardware buttons in one case as enclosure controller.
Thanks

Notifications of events

This is obviously an enhancement request.

I currently use a plugin that notifies me when prints start/stop etc via telegram messenger. I'd love to get notifications (for example filament run out, smoke sensors etc) in the same way.

Can plugins in OctoPrint talk to each other? Obviously, with the multitude of different plugins, it'd be hard to cater for them all.

Just a thought though.

Cheers,
Mike.

Typo in 3.1

Setting up input
Event type: printer
Printer action drop down: Says "Hise", should be "Rise"

OctoPi Install

I have attached and read temperature from my 2302 fine from the command line but the Octoprint interface shows no data.

I'm guessing this is because when I try and add the executable flag to the python scripts I get a file not found error, checking manually over SSH the plugins folder is empty... The plugin shows up in the web interface fine.

Im guessing this is because i used the prebuilt Octopi image? Can you help please!

LM35 Temp Sensor

Could you add support for an LM35 temp sensor?

I have one wired up already thinking it might work, but unlike a DS18B20 it creates a 00-xxxxxxx directory and not a 28-xxxxxxx

Thanks,

D.

MQTT support?

Hi,
This plugin looks very nice and it seems like it extends OctoPrint with many features I could use. One challenge for me, is that I prefer to use MQTT driven external devices, rather than connecting via GPIO's on Raspberry. Is it possible to modify this to use MQTT commands instead?

trigger action on temp

The fan and other io being able to react to temperature readings, gpio triggers, web post\get etc.

Start/Stop Time Support

Is it possible to add start/stop time support based on actual time. For example, I have my lights turn on at start of print but would like them to go off at 10pm.

Thank you and keep up the great work!

Enabling and Disabling Filament Sensors

Hi!
I Try to use this plugin, but in my printers has two extruders. I did two sensors and connect its Pin 2 & 3.

  1. How to explain plugin which sensor is swich on?
  2. When in the first extruder finish filament sensor on and head go home heatbed too go down. I change filament, press Resume. Head go to right position and start print, but heatbed stay at home dont go up!
    I use default script which was in your plugin.
    Firmware Marlin for Ultimaker, Printer my, Alekmaker, (it looks as Ultimaker and use same parts.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.