AstroBox icon indicating copy to clipboard operation
AstroBox copied to clipboard

Remote ON/OFF switch of the printer

Open havanakuba opened this issue 8 years ago • 46 comments

I'm using my raspberry pi, and I came with idea to add a button to web interface to turn off your printer after finish print or printer lights during print this can be done easily on raspberry via relay connected to gpio

havanakuba avatar Mar 03 '16 16:03 havanakuba

I also need the ability to turn ON/OFF my printer(s) before and after a print.
I have 2 delta printers so I would like to be able to turn either one ON/OFF remotely.
Concurrently maybe turn ON/OFF a light per printer for the camera on demand. How about an exhaust fan. I see this is almost a year old and not assigned to anybody and no milestone. Obviously if nobody starts on it, it will never get done. What can be done to get this started?

robermeyer avatar Feb 20 '17 19:02 robermeyer

I was thinking to use this cheap relays. My DIY skils are very good (due to what I do for living) but my python programming skills are not that great. But improving every day if I have some time left.

fullsizerender

havanakuba avatar Feb 20 '17 20:02 havanakuba

You can get those as 1,2,4,8 channels, so you can control whatever you want.

havanakuba avatar Feb 20 '17 20:02 havanakuba

Some parts of Script from this video can be implemented.

havanakuba avatar Feb 20 '17 21:02 havanakuba

What video? I agree that the hardware exists. I was thinking SSR myself but either would work. The SSR one is available already with a plug attached. Just need to get it into the GUI so its useful. In some cases you want to turn things ON/OFF with print status. Other times it would be a simple button ON/OFF peripheral. I would be happy with button ON/OFF remote for a start.

robermeyer avatar Feb 20 '17 21:02 robermeyer

https://www.youtube.com/watch?v=OQyntQLazMU

havanakuba avatar Feb 20 '17 21:02 havanakuba

He is using php script run from webbrowser

havanakuba avatar Feb 20 '17 21:02 havanakuba

Very nice. Now how do we get it into AstroPrint? Since I can't have a bunch of jumper wires laying around we would need a connector to attach to the Raspberry-Pi.

robermeyer avatar Feb 20 '17 21:02 robermeyer

I have made connection tape using dupont connector an 6 core tape img01

havanakuba avatar Feb 21 '17 20:02 havanakuba

I have used: GPIO 4 as in1 GPIO 3 as in2 GPIO 2 as in3 GPIO 17 as in4 gpio_pins copy

havanakuba avatar Feb 21 '17 21:02 havanakuba

img_9919

havanakuba avatar Feb 21 '17 21:02 havanakuba

And created 8 scripts based on the one from the video Two (on, off) for each relay channel

scripts

havanakuba avatar Feb 21 '17 21:02 havanakuba

Here are the scripts I created

I new to github, python and coding. I feel it should be done in the different way. Sorry for that. If someone can point me what I`m doing wrong, Really appreciate some help.

scripts.zip

havanakuba avatar Feb 21 '17 21:02 havanakuba

Great work. How do we get it into AstroPrint?

On Tue, Feb 21, 2017 at 1:24 PM, Havana Kuba [email protected] wrote:

Here are the scripts I created

I new to github, python and coding. I feel it should be done in the different way. Sorry for that. If someone can point me what I`m doing wrong, Really appreciate some help.

scripts.zip https://github.com/AstroPrint/AstroBox/files/791518/scripts.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AstroPrint/AstroBox/issues/86#issuecomment-281485301, or mute the thread https://github.com/notifications/unsubscribe-auth/AHKy3iAjG-vHHOC6GV-MUCKIk6psYbAhks5re1XwgaJpZM4Hom1O .

-- Rich

robermeyer avatar Feb 21 '17 21:02 robermeyer

@CoDanny CoDanny
Is it possible for this to get moving some how? I am confident many users would appreciate the feature.

robermeyer avatar Feb 21 '17 22:02 robermeyer

You encourage me to get this project moving, I did all of this today. :)

havanakuba avatar Feb 21 '17 22:02 havanakuba

now php script for all channels need to be write, the problem is I don`t know php :(

havanakuba avatar Feb 21 '17 22:02 havanakuba

It looks like the code is mostly JavaScript, so PH is not going to help.

On Tue, Feb 21, 2017 at 2:20 PM, Havana Kuba [email protected] wrote:

now php script for all channels need to be write, the problem is I don`t know php :(

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AstroPrint/AstroBox/issues/86#issuecomment-281500824, or mute the thread https://github.com/notifications/unsubscribe-auth/AHKy3triu3g-BrLloNl2AmaGy2lE48XGks5re2MogaJpZM4Hom1O .

-- Rich

robermeyer avatar Feb 21 '17 22:02 robermeyer

@robermeyer This isn't something that most of our users are even able to do. I agree though that some of our most advanced users will appreciate this. We can't add this functionality to the core platform but will certainly add it as a plugin when the plugin interface is ready

CoDanny avatar Feb 22 '17 10:02 CoDanny

What's the time frame for plugin interface?

robermeyer avatar Feb 22 '17 18:02 robermeyer

It's planned but we have other things to develop first. At this point I can't give you a date.

CoDanny avatar Feb 22 '17 19:02 CoDanny

That's not encouraging. In our engineering, planned without a date usually means it not going to happen until somebody new comes in and changes priorities. Sounds like you are the guy the set priorities.

On Wed, Feb 22, 2017 at 11:53 AM, Daniel Arroyo [email protected] wrote:

It's planned but we have other things to develop first. At this point I can't give you a date.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AstroPrint/AstroBox/issues/86#issuecomment-281783475, or mute the thread https://github.com/notifications/unsubscribe-auth/AHKy3sbUB2fDnz_GXT03iEveaFkWRQG1ks5rfJJOgaJpZM4Hom1O .

-- Rich

robermeyer avatar Feb 22 '17 21:02 robermeyer

@robermeyer Yes, I am (one of them). I'm the company's CTO. It doesn't mean it won't get done. Having a plugin API is important, we realize that it will let others contribute to the product and alleviate some of the problems and limitations that our most advanced users are facing.

It's just that other things in the core product are currently in development. We're a small team and can't do everything at once. Note that the team not only works on the AstroBox but also on the AstroPrint Cloud (astroprint.com) and a few other companion apps to be released soon.

CoDanny avatar Feb 22 '17 21:02 CoDanny

Hi for now I`m using this temporary solution called WEBIOPi

https://github.com/doublebind/raspi

havanakuba avatar Feb 22 '17 22:02 havanakuba

For the cost of a Raspberry Pi and an AC SSR interface, its probably just a DIY project to turn ON/OFF the printer separately. It was nice having a remote interface that would go through the firewall. If I wait for this PlugIN to develop I will probably be working on my 4D printer by then and won't need it anymore. I have 2 printers so I will need 2 Raspberry PI's anyway. Whats one more :-)

I will look into the WEBIOPI myself. Thanks for the tip.

On Wed, Feb 22, 2017 at 2:22 PM, Havana Kuba [email protected] wrote:

Hi for now I`m using this temporary solution called WEBIOPi

https://github.com/doublebind/raspi

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AstroPrint/AstroBox/issues/86#issuecomment-281824257, or mute the thread https://github.com/notifications/unsubscribe-auth/AHKy3mzoP0-IV_v7JBrNE2F7bKhEhfo3ks5rfLUqgaJpZM4Hom1O .

-- Rich

robermeyer avatar Feb 22 '17 22:02 robermeyer

I have made custom interface to switch on/off light in my printer on raspberry pi 3 with installed astroprint on it. install python and gpio

sudo apt-get install python-dev sudo apt-get install python-pip3 sudo apt-get install python-rpi.gpio

then fallow https://github.com/doublebind/raspi

then sudo nano /etc/webiopi/config in [HTTP] change port to 8080 this step it is not essential will work without change. uncomment and change path in doc-root = /home/pi/www/

make www directory in /home /pi

using filezilla copy index.html to /home/pi/www ch1.zip ch4.zip

sudo /etc/init.d/webiopi start - to start sudo /etc/init.d/webiopi stop - to stop sudo /etc/init.d/webiopi status - to check status

sudo update-rc.d webiopi defaults - add to autostart

havanakuba avatar Feb 23 '17 02:02 havanakuba

img_0083 img_0084

havanakuba avatar Feb 23 '17 02:02 havanakuba

img_9927 img_9921

havanakuba avatar Feb 23 '17 02:02 havanakuba

nice, currently i am working on a heated encloser. In order to get the current info from astroprint i am using lxml to pull the data from the web page

Austinthemighty avatar Feb 23 '17 15:02 Austinthemighty

What about a custom gcode to switch the relays, with a parameter to select which one and a second parameter to specify on or off

sabbiolino80 avatar Apr 09 '17 11:04 sabbiolino80