GithubHelp home page GithubHelp logo

kantlivelong / octoprint-psucontrol Goto Github PK

View Code? Open in Web Editor NEW
203.0 10.0 111.0 409 KB

Smart control of your power supply via GPIO, GCODE Command, System Command, or variety of sub-plugins.

License: GNU Affero General Public License v3.0

Python 67.89% JavaScript 9.50% Less 0.32% Jinja 22.30%

octoprint-psucontrol's Introduction

OctoPrint PSU Control

This OctoPrint plugin controls an ATX/AUX power supply to help reduce power consumption and noise when the printer is not in use.

Power supply can be automatically switched on when user specified commands are sent to the printer and/or switched off when idle.

Supports Commands (G-Code or System) or GPIO to switch power supply on/off.

PSUControl

Setup

Install the plugin using Plugin Manager from Settings

Settings

See the Wiki

Troubleshooting

See the Wiki

API

See the Wiki

Support

Help can be found at the OctoPrint Community Forums

Feature Requests

Feature Requests

octoprint-psucontrol's People

Contributors

agreen avatar clinta avatar edekeijzer avatar foosel avatar jberts avatar kantlivelong avatar max232l avatar nicksinger avatar psychokiller1888 avatar synman 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

octoprint-psucontrol's Issues

Unable to connect to the printer

Once I flip the switch on PSU raspberry pi comes to life and loads the system. Meanwhile, everything else is turned off (including printer). Once octoprint is loaded and I click on the button to turn on my ATX PSU printer (Anet A8) turns on and successfully loads the software (I am using Skynet). However, because the printer was not initialized as an USB device originally (that's my guess) I am unable to connect to it.
Kindly advise on the issue.

Sensing on same pin?

I'm using an enclosed relay, this specifically. How advisable or inadvisable would it be to use the same pin for switching and sensing? My hopeful educated guess is that it would be better than using last action.

Possible to make GPIO pin timed ?

Hi.

Im trying to control the power of my Solidoodle Press.
And the problem is that the printer is controlled by a power switch on the top.
It would be great if the plugin could handle lets say. power on = GPIO high 2 sec And then low again.
To switch power on off.

GPIO pin

Hey, sorry if this has been asked before.

i just installed my ATX psu and its working great so far, how ever i was messing around in the PSU control settings and noticed that there is a way to get it to monitor the state of the PSU.

currently when i connect to my octoprint it turns the printer on how ever the PSU state is still in the off position.

i understand that i just need to install a jumped from the 3.3v rail to a pin and than define it in the settings.

do i need to download any sort of library to the arduino? or will it just work?

PSU Control is not ACL aware

I discovered by happen chance today that PSU Control is not protected by any authentication / authorization scheme provided by OctoPrint.

This means that if your server is accessible to the outside world and you have PSU Control installed that an anonymous user can power on/off your printer. This presents a significant challenge for internet connected instances of OctoPrint that rely on authentication to gain administrative access to OctoPrint and its plugins.

screen shot 2017-02-09 at 6 34 21 pm

Feature request

Hello Shawn Bruce,
first, this PSU control is really excellent and very helpful.
My PSU is permanently on, I use the ATX power control output as an additional output for turning cooling fans on/off to reduce noise in idle mode. Here does your PSU control wonderful things.

What I want to request is a little extension to PSU control. It is some kind of safety agains overheating.
You currently have implemented that PSU control can turn the PSU off only when the temperature(s?) are below a configured level. -> Excellent!
What I miss is an option to enforce a turned-on PSU as long as that limit is exceeded!

Background:
I had it several times that I had to reset the Arduino or OctoPi. In this case it happens that the Arduino (Marlin Firmware) defaults to a turned off PSU. This causes in turn that a heated up hotend is not cooled any more and needs very long to get an uncritical temperature.
In case that you would add a trigger to turn on the PSU when the temperature is higher than ...°C, it would be perfect.

[Request] Make confirmation of switching off optional

Hi,

there should be an option to disable "Are you sure" confirmation when switching off the PSU.

Best would be a select option, choosable between:

  • Always ask
  • Never ask
  • Only ask if criteria for "automatic power off" is not met

doesn't power PSU (wainting for heaters)

Hello, i've an issue with your plugin.

i've setup auto poweroff with an idle timeout at 5min and wait for temperature 150°c.

but the plugin can't shutdown psu.

in log :

octoprint.plugins.psucontrol - INFO - Waiting for heaters(tool0) before shutting off PSU...

but temp is below 150°c (if i setup 190°c it works, it's my printing temp).

can you help me ? thanks

Invert sense pin

I hooked up my PSU sense with an optocoupler, but this has a side effect of inverting the logic for the pin. It would be handy if there was an "Invert" checkbox for the sense pin. I hooked it up using the internal pullup of the rpi GPIO,

Execute additional commands

Hello.
I notice that Marlin RC8 has a massive problem on my printer. The first printjob works fine, but all succeeding one have so much extrusion, that I must immediately abort, otherwise the nozzle srucks in 1mm thick filament...
I found out that disconnecting and re-connecting resets the Arduino. After that, the next printjob works again.

It would be great if OctoPrint-PSUControl could enforce a disconnect when turning off the ATX powersupply. Octoprint will then automatically re-connect, reset hereby the Arduino, and everything is fine.

PSU Control turns off printer on initial power up.

So, my issue is that when I flip the power switch on the side of printer it powers everything up and after a few seconds, maybe 30, the printer powers back off. It happens only when this plugin is installed. Whether or not I have the "Automatically Turn On", or the "Invert" options checked.

I'm using a relay to switch the 12v from the PSU to the Mainboard, I have it connected to the (NC) pin as I wan't it to power on with the switch.

The RPi is powered via a 5v regulator that is wired directly to the PSU so it is always on when the physical switch is on.

I tried it with connecting the Mainboard to the (NO) on the relay, but then the sensing pin is reversed. (I even tried agreen "invert sense" pull request to no avail). And I lose the functionality of my printer turning on with the switch.

Its almost like the plugin wants to (NO) the relay no matter how its wired.

HELP! I have no idea what I'm dong wrong.

PS: I've made the modifications to the 5V relay board to run off of RPI 3.3V GPIO pins using a 1k resistor.

5v instead of 3.3v?

Not quite an issue but more of a feature request:

I have my PSU connected to a relay box where the gpio signal for on is 5v instead of 3.3v, 0v is off.
Is there a way to configure/alter the code to send this voltage instead?

I currently use this command to turn it on from bash (ran from the config.yaml):
gpio export 17 out; gpio -g write 17 0
And using wiringpi on python:
wiringpi.pinMode(17, 1)
wiringpi.digitalWrite(17, 0)

Thanks

Question: Control via App

Hi guys,

just wondering if there is a possibility to control the PSU not only via the webinterface but also via an android octoprint control app (like printoid).

In Printoid I can add custom SSH, GCODE and CURL commands. Is there an API I can call for the PSU Control Plugin?

Greetings Alex

Stops working arbitrarily

I'm not sure if it's an issue of this plugin or an Octoprint issue. I've installed Octoprint in a Raspberry Pi 2 B+ with this plugin. After several hours running (I use to turn it on in the morning, and the issue usually occurs at night) the Octoprint system menu suddenly disappears. I don't know why but, when this happens, PSU control button (in the navbar) still is there but has no effect. I try to turn the printer off, the confirmation dialog appears normally, I confirm, but nothing happens, and the icon keeps in green, like nothing happened. If I go to a shell and set manually the GPIO pin, it works properly.

[Request] Turn PSU on when OctoPrint server starts up.

Hello, I love your plugin, but I am using it with a solid state relay to turn the entire printer on and off, so I would like a user saveable feature under PSUControl settings that automatically turns the PSU on when OctoPrint finishes starting up.

Example: rebooting the Raspi would automatically turn the PSU on once the OctoPrint server is finished starting up.

I think this would be easy to implement; most likely could be added in the init.py function:

def on_settings_initialized(self):

Thank you! :)

Incorrect initial state when GPIO is inverted

I am using this plugin with the invert checkbox checked. This succesfully bring GPIO pin (i.e 18) to low to activate PSU but when I reboot the pi, pin state is low, making PSU run continuously.

When I pick another GPIO pin as a test case the previous pin (18 in this case) stays high, conculding that the plugin is making the transition to the low state.

As this will cause an infinite PSU activation on a power cycle, it should be fixed. I will have a look at the code and send a PR if I have time.

Error with auto on/off

2017-01-30 18:46:59,381 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by M190)
2017-01-30 18:46:59,383 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2017-01-30 18:46:59,484 - octoprint.util.comm - ERROR - Error while processing hook psucontrol for phase queuing and command M190 S85:
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.1-py2.7.egg/octoprint/util/comm.py", line 2113, in _process_command_phase
hook_result = hook(self, phase, command, command_type, gcode)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol/init.py", line 208, in hook_gcode_queuing
self.turn_psu_on()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol/init.py", line 229, in turn_psu_on
self.check_psu_state()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol/init.py", line 117, in check_psu_state
r = GPIO.input(self.senseGPIOPin)
ValueError: The channel sent is invalid on a Raspberry Pi

Waiting for it to turn off doesn't work either. I haven't logged that though. I guess that's the same issue.

Triggering plugin from shell

Is there a way to do this? Reason I ask is because I use Printoid (Android app to connect to OctoPrint) and I'd like to be able to use this plugin with it, by using the app's shell function capabilities.

PSU Auto Off & Auto Connect issues

Hello,

I'm kinda reopening the discussion of the issue #24.
I don't know if it is a bug or a feature, but my Octoprint won't automatically shut off the printer, even if the timout is reached, and there isn't anything in the terminal (except received "wait"s). The manual shutoff from the button works correctly.

The second point I'd like to discuss is the Auto Connect. I know the Port Listener plugin does the job. But it does it for USB only. I'm using the UART port from a Raspberry to communicate with the printer's motherboard (it's clearly better and fits correctly in the case I printed), and in this case, the PortListener doesn't detect any new port (as the UART of the raspberry stays up even if the PSU is off)...

Hope it'll make that awesome plugin even better!

Error to start

Hi, I test it OctoPrint 1.3.0 and 1.3.1 and same error to start plugin. I read the logs and see this error:

File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol/init.py", line 86, in initialize GPIO.setup(self.senseGPIOPin, GPIO.IN) RuntimeError: No access to /dev/mem. Try running as root!

Plugin not activate

Connecting to printer after power on

Is there any possibility to connect to the printer after I've powered it on by the plugin?
Now I must click on the "Connect" button when I powered it on via plugin.

on/off switch not working after update

After the latest update, the plugin is not working anymore for me.
I have set it up with GPIO pin 16 of my raspberry pi3 to switch my atx power supply, but after update i can't click the power button (lightning symbol) on octoprint.
Before the update the button would work (become green), but wouldn't switch power supply, i had to manually set a different number of pin, save, then go back in settings and set correct pin again, then save, then it would work.
But now i can't even click the button anymore, just stays greyed out.
Pls advice.

Automatic Shutdown after 15 mins idle - waiting for heaters

Dear PSUControl-Team,

i wish my printer is shutting down, after printing - and then after an idle from 15 minutes.
But the printer e.g. the PSU wont shut down. In the logfiles repeat:

2017-05-11 03:55:00,486 - octoprint.plugins.psucontrol - INFO - Waiting for heaters(tool0) before shutting off PSU...
2017-05-11 03:55:05,498 - octoprint.plugins.psucontrol - INFO - Waiting for heaters(tool0) before shutting off PSU...
2017-05-11 03:55:10,509 - octoprint.plugins.psucontrol - INFO - Waiting for heaters(tool0) before shutting off PSU...
2017-05-11 03:55:15,522 - octoprint.plugins.psucontrol - INFO - Waiting for heaters(tool0) before shutting off PSU...
2017-05-11 03:55:20,533 - octoprint.plugins.psucontrol - INFO - Waiting for heaters(tool0) before shutting off PSU...
2017-05-11 03:55:25,544 - octoprint.plugins.psucontrol - INFO - Waiting for heaters(tool0) before shutting off PSU...
2017-05-11 03:55:30,555 - octoprint.plugins.psucontrol - INFO - Waiting for heaters(tool0) before shutting off PSU...

But it was 3 hours after printing. So, the heaters arent hot anymore.

Can i disabled waiting for heaters? Or can i setup an force-shutdown after x minutes?

Thanks in advance.

PS: I use the ANET A8 with 2 Port Relai on Raspberry. My Setup from PSU Control is:
GPIO Mode BCM
GPIO Pin for switching (pin 17)
No Sensing
No Power on
Power off is checked, after 15 minutes and 70°
Disconnect on power off is checked.

PSU Control does not play nicely with TouchUI

I'll likely open this as an issue in the TouchUI repo as well but there is currently a problem between TouchUI and PSU Control. When on a low density touchscreen (3.5 LCD attached to the Pi) with PSU Control and TouchUI active when you try to open the System/Settings/Logon spanner (see attached) the entire context menu is blanked out.

You can also simulate this fairly easily by just shrinking your browser's width (see attached).

screen shot 2017-02-10 at 6 02 16 pm

GPIO conflict

Due to the presence of GPIO.cleanup() in the initialise sequence causes other plugins that use GPIO and have already been initialised to fail. Basically clearing any other GPIO those need to use.

And there's also a conflict with GPIO.BOARD vs GPIO.BCM on other plugin. Try/except would be needed?

Doesn't seem to work, GPIO problem

I installed this plugin today but nothing seems to happen with my relay, checking the logs I get this at the boot:
2017-02-21 22:25:47,217 - octoprint.plugins.psucontrol - INFO - Running RPi.GPIO version 0.6.3 2017-02-21 22:25:47,218 - octoprint.server - ERROR - Error while trying to migrate settings for plugin psucontrol, ignoring it Traceback (most recent call last): File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.1-py2.7.egg/octoprint/server/__init__.py", line 293, in run settings_plugin_config_migration_and_cleanup(implementation._identifier, implementation) File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.1-py2.7.egg/octoprint/server/__init__.py", line 284, in settings_plugin_config_migration_and_cleanup implementation.on_settings_initialized() File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol/__init__.py", line 95, in on_settings_initialized self._configure_gpio() File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol/__init__.py", line 109, in _configure_gpio GPIO.setmode(GPIO.BOARD) ValueError: A different mode has already been set!

And when I try to start it with G0 and later using the icon in the top (would it be possible to have that up there from boot?) I get this in the log:
2017-02-21 22:27:05,286 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G0) 2017-02-21 22:27:05,287 - octoprint.plugins.psucontrol - INFO - Switching PSU On 2017-02-21 22:27:05,288 - octoprint.plugins.psucontrol - ERROR - The GPIO channel has not been set up as an OUTPUT 2017-02-21 22:27:11,309 - octoprint.plugins.psucontrol - INFO - Switching PSU Off 2017-02-21 22:27:11,310 - octoprint.plugins.psucontrol - ERROR - The GPIO channel has not been set up as an OUTPUT 2017-02-21 22:27:13,044 - octoprint.plugins.psucontrol - INFO - Switching PSU On 2017-02-21 22:27:13,045 - octoprint.plugins.psucontrol - ERROR - The GPIO channel has not been set up as an OUTPUT

Running Version 1.3.1 (master branch) on a Rpi3, relay connected like the image attached, the on_led is dimly lit all the time, if I connect the Signal wire to the 3.3V pin the relay turns on and the on_led shines brighter so the relay is working.
rpi relay_bb

Add M106 to default Triggers

M106 needs to be added to the trigger commands for turning on the PSU. Mine wasn't turning on and it lead to thermal runaways since the bed would not actually heat up when starting a print. I ended up having to use the lightning bold icon to turn on the PSU before starting a print.

PSU not switched on by PSUControl

Hi,

first of all: I think this is a great plugin, exactly what I needed. However - I cannot get it to work with GPIO. Hardware wise, I followed the transistor method described in http://www.instructables.com/id/Using-the-Raspberry-Pi-to-control-an-ATX-power-sup/, using GPIO 29 for pulling the PSU_ON line low. This works fine from the command line, and also through a menu option I added to OctoPrint's system menu. However, the PSU is not turned on by PSUControl. Furthermore, if I add GPIO 28 as feedback, all prints start to be choppy, with filament blurbs in smaller features (looks like the communication with the controller can't keep up with the print).
The logs below are for an attempt of a print. PSUControl claims it turned the PSU on, but it did not. I then used the menu option to turn the PSU on (at 18:22:29,390). After the print I tried to turn the PSU off/on/off (using the green flash) - the logs don't show an error, but the PSU stayed on all the time.
Also (maybe important) - unless I manually set the mode of GPIO to out (through ssh), nothing works at all.

Any help is welcome.

2017-04-03 18:21:33,246 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by M140)
2017-04-03 18:21:33,247 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2017-04-03 18:22:29,390 - octoprint.server.api.system - INFO - Performing command for custom:Printer on: gpio write 29 1
2017-04-03 18:28:53,828 - octoprint.util.comm - INFO - Finished in 378.068 s.
2017-04-03 18:34:12,918 - octoprint.plugins.psucontrol - INFO - Switching PSU Off
2017-04-03 18:34:18,382 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2017-04-03 18:34:22,900 - octoprint.plugins.psucontrol - INFO - Switching PSU Off

gpio setup

When I run this with the enclosure plugin and a few others I get this error and non functioning behavior from psu control. I set the enclosure plugin option to use BOARD pins as that seemed to match your usage and would eliminate a pin conflict I thought.

Here's a log file:
2017-03-24 01:06:20,832 - octoprint.server - INFO - Starting OctoPrint 1.3.2 (master branch) 2017-03-24 01:06:20,833 - octoprint.server - INFO - ****************************************************************************** 2017-03-24 01:06:21,049 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages... 2017-03-24 01:06:25,430 - octoprint.plugin.core - INFO - Found 19 plugin(s) providing 15 mixin implementations, 14 hook handlers 2017-03-24 01:06:25,525 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages... 2017-03-24 01:06:26,007 - octoprint.plugin.core - INFO - Found 19 plugin(s) providing 15 mixin implementations, 14 hook handlers 2017-03-24 01:06:26,017 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/pi/.octoprint/uploads... 2017-03-24 01:06:26,081 - octoprint.filemanager.storage - INFO - ... file metadata for /home/pi/.octoprint/uploads initialized successfully. 2017-03-24 01:06:26,520 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk 2017-03-24 01:06:40,173 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python -m pip" as command to invoke pip 2017-03-24 01:06:44,743 - octoprint.util.pip - INFO - Version of pip is 9.0.1 2017-03-24 01:06:44,745 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python2.7/site-packages, --user flag needed => no, virtual env => yes 2017-03-24 01:06:44,750 - octoprint.plugin.core - INFO - Initialized 15 plugin implementation(s) 2017-03-24 01:06:44,777 - octoprint.plugins.psucontrol - INFO - Running RPi.GPIO version 0.6.3 2017-03-24 01:06:44,778 - octoprint.plugins.psucontrol - INFO - Using sensing to determine PSU on/off state. 2017-03-24 01:06:44,778 - octoprint.plugins.psucontrol - INFO - Configuring GPIO for pin 19 2017-03-24 01:06:44,779 - octoprint.plugins.psucontrol - INFO - Using GPIO for On/Off 2017-03-24 01:06:44,780 - octoprint.plugins.psucontrol - INFO - Configuring GPIO for pin 3 2017-03-24 01:06:44,794 - octoprint.plugin.core - INFO - 19 plugin(s) registered with the system: | Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugins/announcements | Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugins/corewizard | Cost Plugin (0.1.2) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_cost | CuraEngine (<= 15.04) (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugins/cura | Detailed Progress Plugin (0.1.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_detailedprogress | Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugins/discovery | EEPROM Marlin Editor Plugin (0.1.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_eeprom_marlin | Enclosure Plugin (2.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_enclosure | FileManager (0.1.2) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_filemanager | GCODE System Commands (0.1.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_gcodesystemcommands | Gcodebar Plugin (0.1.4) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_GCodeBar | Plugin Manager (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugins/pluginmanager | PSU Control (0.1.3) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_psucontrol | !Slic3r (1.0.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_slic3r | Slicer (1.0.2) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_slicer | Software Update (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugins/softwareupdate | !STL Viewer (0.3.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_stlviewer | !TouchUI (0.3.6) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_touchui | !Virtual Printer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugins/virtual_printer 2017-03-24 01:06:44,797 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue... 2017-03-24 01:06:44,810 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue 2017-03-24 01:06:44,815 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets... 2017-03-24 01:06:44,846 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/.webassets-cache... 2017-03-24 01:06:45,388 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance "i2 Samuel XL" for _http._tcp 2017-03-24 01:06:45,409 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance "i2 Samuel XL" for _octoprint._tcp 2017-03-24 01:06:45,413 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance "i2 Samuel XL" for SSDP 2017-03-24 01:06:45,497 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid 2017-03-24 01:06:45,540 - octoprint.server - INFO - Listening on http://127.0.0.1:5000 2017-03-24 01:06:46,026 - octoprint.server - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://192.168.1.207/'} 2017-03-24 01:06:46,071 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:06:46,149 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:06:49,797 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:06:52,917 - octoprint.server.util.sockjs - INFO - New connection from client: 192.168.1.17 2017-03-24 01:06:54,826 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:06:55,769 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin 1.1.0-RC8 (Github)" 2017-03-24 01:06:56,237 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:06:56,298 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:06:58,676 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin 1.1.0-RC8 (Github)" 2017-03-24 01:07:01,223 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:06,305 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:06,413 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:07:06,470 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:07:11,312 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:16,314 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:16,530 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:07:17,636 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:07:21,317 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:26,319 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:27,694 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:07:27,749 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:07:31,322 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:36,325 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:37,808 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:07:37,864 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:07:41,327 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:46,330 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:47,923 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:07:47,978 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:07:51,333 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:56,345 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:07:58,037 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:07:58,092 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:08:01,347 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:06,349 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:08,152 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:08:08,207 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:08:11,352 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:16,358 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:18,267 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:08:18,322 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:08:21,361 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:26,364 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:27,555 - octoprint.server.util.sockjs - INFO - Client connection closed: 192.168.1.17 2017-03-24 01:08:28,405 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:08:28,498 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:08:32,419 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:37,619 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:37,704 - octoprint.server.util.sockjs - INFO - New connection from client: 192.168.1.17 2017-03-24 01:08:38,562 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:08:38,618 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:08:42,622 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:47,628 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:48,677 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:08:48,733 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:08:52,632 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:57,635 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:08:58,793 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:08:58,848 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:09:02,639 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:07,642 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:08,908 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:09:08,964 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:09:12,645 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:17,647 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:19,024 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:09:19,079 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:09:22,650 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:27,652 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:29,139 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:09:29,196 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:09:32,654 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:37,657 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:39,256 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:09:39,311 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:09:42,659 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:47,663 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:49,372 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:09:49,428 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:09:52,666 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:57,669 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:09:59,487 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:09:59,543 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:10:02,671 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:07,674 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:09,601 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:10:09,658 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:10:12,676 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:17,679 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:19,717 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:10:19,775 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:10:22,681 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:27,683 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:29,835 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:10:29,891 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:10:32,685 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:37,688 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:39,950 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:10:40,005 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:10:42,403 - octoprint.plugins.psucontrol - INFO - Switching PSU On 2017-03-24 01:10:42,405 - octoprint.plugins.psucontrol - ERROR - The GPIO channel has not been set up as an OUTPUT 2017-03-24 01:10:42,506 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:42,690 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:44,071 - octoprint.plugins.psucontrol - INFO - Switching PSU On 2017-03-24 01:10:44,072 - octoprint.plugins.psucontrol - ERROR - The GPIO channel has not been set up as an OUTPUT 2017-03-24 01:10:44,173 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:44,296 - octoprint.plugins.psucontrol - INFO - Switching PSU On 2017-03-24 01:10:44,297 - octoprint.plugins.psucontrol - ERROR - The GPIO channel has not been set up as an OUTPUT 2017-03-24 01:10:44,398 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:45,903 - octoprint.plugins.psucontrol - INFO - Switching PSU On 2017-03-24 01:10:45,904 - octoprint.plugins.psucontrol - ERROR - The GPIO channel has not been set up as an OUTPUT 2017-03-24 01:10:46,005 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:47,692 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:50,064 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:10:50,120 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:10:52,695 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:10:57,699 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:00,179 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:11:00,235 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:11:01,392 - octoprint.plugins.psucontrol - INFO - Auto-On - Turning PSU On (Triggered by G0) 2017-03-24 01:11:01,394 - octoprint.plugins.psucontrol - INFO - Switching PSU On 2017-03-24 01:11:01,394 - octoprint.plugins.psucontrol - ERROR - The GPIO channel has not been set up as an OUTPUT 2017-03-24 01:11:01,495 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:02,701 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:07,704 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:10,293 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:11:10,348 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:11:12,706 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:17,709 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:20,407 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:11:20,461 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:11:22,110 - octoprint.server.util.sockjs - INFO - Client connection closed: 192.168.1.17 2017-03-24 01:11:22,465 - octoprint.server.util.sockjs - INFO - New connection from client: 192.168.1.17 2017-03-24 01:11:22,724 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:27,735 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:30,520 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:11:30,575 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:11:32,737 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:37,740 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:40,634 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:11:40,688 - octoprint.plugins.enclosure - INFO - Failed to read Humidity 2017-03-24 01:11:42,742 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:47,747 - octoprint.plugins.psucontrol - ERROR - You must setup() the GPIO channel first 2017-03-24 01:11:50,746 - octoprint.plugins.enclosure - INFO - Failed to read Temperature 2017-03-24 01:11:50,801 - octoprint.plugins.enclosure - INFO - Failed to read Humidity

Add a second relay signal

Could you add the possibility to switch on two relay instead of only one? This is useful to, for example, switch on a led strip with the printer. Thank you.

[Suggestion] Auto shuttoff after print with delay, and auto connect after power with delay

After power on I always have to manually connect. It would be nice if the extension could configurably handle this on its own.

Auto shutoff is something I think everyone wants. I see "power off when idle" but the docs and configuration are very nonspecific about what idle means and it doesn't seem to turn my printer off automatically when finished printing. Ideally this might happen after some configurable delay of me not initiating another print.. Maybe somewhere in the ten minute neighborhood in my case.

If this is something that interests the lead on this project, I would be happy to try some implimentation and do a pull request. Wanted to pitch the idea and see if I'm missing some prexisting or future planned feature first.

[Request] Add option to inverse On/Off GPIO pin

It would be great if you could add an option to inverse the GPIO signal for active low setups (e.g. a relay board).
With this setting enabled, your plugin would set GPIO.LOW to turn the printer on and GPIO.HIGH to turn it off.

M80 s

Marlin has added support for M80 S which gives the status of the power on pin of a board
this could be used as a alternative to the gpio monitoring

[Request] Add ability to disconnect when switching PSU off

My PSU does also supply power to the printers mainboard. That means octoprint will display 'connection timeout' when PSU switches off, and i have to manually reconnect when switching PSU on.

It would be nice if your plugin would handle that as well, including an (ideally configurable) delay between 'PSU On' and 'reconnect to printer' to allow firmware to boot up.

PSU won´t turn off when Idle, stuck in loop?

Got an issue where my PSU won´t turn off when the Idle time is reached.
It keeps stuck in some loop waiting for heaters but everything is turned off and cooled below the set temp. This line keeps repeating in the standard Log: "Waiting for heaters(tool0) before shutting off PSU..."

And in the Debug log it looks like this over and over:
"DEBUG - Heater tool0 = 187.3C
INFO - Waiting for heaters(tool0) before shutting off PSU..."

So, it seems to register the last known temp from the extruder, but it never changes and it´s stuck in the loop.

Suggestions?

Printer: Anet A8
Octoprint version: 1.3.2
PSUcontrol version: 0.1.4
Complete Debug Log:
octoprint-log.txt

Fail running on Pcduino3

I'm running Octoprint on a Pcduino3. It's supported? Sometimes PSUControl suddenly stops working.
Log:

2017-03-20 14:21:24,064 - octoprint.plugin.core - ERROR - Something went wrong while retrieving package info data for module octoprint_psucontrol
Traceback (most recent call last):
  File "/home/pablo/OctoPrint/venv/local/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugin/core.py", line 608, in _find_plugins_from_entry_points
    module_pkginfo = InstalledEntryPoint(entry_point)
  File "/home/pablo/OctoPrint/venv/local/lib/python2.7/site-packages/OctoPrint-1.3.2-py2.7.egg/octoprint/plugin/core.py", line 1335, in __init__
    pkginfo.Installed.__init__(self, package, metadata_version=metadata_version)
  File "/home/pablo/OctoPrint/venv/local/lib/python2.7/site-packages/pkginfo-1.2.1-py2.7.egg/pkginfo/installed.py", line 15, in __init__
    __import__(package)
  File "/home/pablo/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint_psucontrol/__init__.py", line 11, in <module>
    import RPi.GPIO as GPIO
  File "/home/pablo/OctoPrint/venv/local/lib/python2.7/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!

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.