-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote ON/OFF switch of the printer #86
Comments
I also need the ability to turn ON/OFF my printer(s) before and after a print. |
You can get those as 1,2,4,8 channels, so you can control whatever you want. |
Some parts of Script from this video can be implemented. |
What video? |
He is using php script run from webbrowser |
Very nice. Now how do we get it into AstroPrint? |
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. |
Great work.
How do we get it into AstroPrint?
…On Tue, Feb 21, 2017 at 1:24 PM, Havana Kuba ***@***.***> 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
<#86 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHKy3iAjG-vHHOC6GV-MUCKIk6psYbAhks5re1XwgaJpZM4Hom1O>
.
--
Rich
|
@CoDanny CoDanny |
You encourage me to get this project moving, I did all of this today. :) |
now php script for all channels need to be write, the problem is I don`t know php :( |
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 ***@***.***> 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
<#86 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHKy3triu3g-BrLloNl2AmaGy2lE48XGks5re2MogaJpZM4Hom1O>
.
--
Rich
|
@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 |
What's the time frame for plugin interface? |
It's planned but we have other things to develop first. At this point I can't give you a date. |
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 ***@***.***> 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
<#86 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHKy3sbUB2fDnz_GXT03iEveaFkWRQG1ks5rfJJOgaJpZM4Hom1O>
.
--
Rich
|
@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. |
Hi for now I`m using this temporary solution called WEBIOPi |
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 ***@***.***> 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
<#86 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHKy3mzoP0-IV_v7JBrNE2F7bKhEhfo3ks5rfLUqgaJpZM4Hom1O>
.
--
Rich
|
I have made custom interface to switch on/off light in my printer on raspberry pi 3 with installed astroprint on it. sudo apt-get install python-dev then fallow https://github.com/doublebind/raspi then make www directory in /home /pi using filezilla copy index.html to /home/pi/www sudo /etc/init.d/webiopi start - to start sudo update-rc.d webiopi defaults - add to autostart |
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 |
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 |
Similar to M107 to switch the fan |
Alright guys take a look (here)[https://github.com/foosel/OctoPrint/wiki/Controlling-a-relay-board-from-your-RPi]. Changes are done to config.yaml. I did that on astro but it is not enough - the buttons does not show in right menu. So I went to /AstroBox/src/astroprint/templates/app.jinja2 (no idea what language is that - ruby?) and duplicated buttons used for shutdown and reboot. Now I think js is controlling that buttons so I'm gonna go through app.js (16k lines... yahhh) unless someone does have better idea. Probably we could use that scripts @havanakuba wrote. I think php can't be directly inserted into that jinja files. Also I don't know if js alone can manipulate gpio. Easies way would be to invoke I used octoprint set up as in that link I gave here but I had issues in maintaining connection to printer itself. (relay works very nicely, I'm using 1ch one). So far astro is maintaining connection. Hope we will come up with something together. Edit: just pasted unminified js and at the very end there is this code. I don't know how it is doing system commands like restart astrobox.
|
OK its in js
Does it mean that js can control system? |
Nice research MikeDabrowski
…On Mon, Apr 10, 2017 at 2:22 PM, MikeDabrowski ***@***.***> wrote:
OK its in js
doTurnoff: function() {
$.ajax({
url: API_BASEURL + "system",
type: "POST",
data: {
action: "shutdown"
},
success: _.bind(function() {
setTimeout(_.bind(function() {
this.$el.addClass("done");
this.$el.find(".icon-off").removeClass("blink-animation")
}, this), 6E3)
}, this),
error: _.bind(function() {
this.$el.find(".icon-off").removeClass("blink-animation");
noty({
text: "There was an error starting turn off sequence.",
timeout: 5E3
})
}, this)
})
}
Does it mean that js can control system?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHKy3sqgZN5hE22H40hkdN9fNlP4SAr1ks5rup18gaJpZM4Hom1O>
.
--
Rich
|
Ok, I fetched source code and looked it through. Good news its rather python doing system commands than js. Bad news I have no experience in python for web and have no idea where to place relevant command. So if any of the creators could drop some hints which file to edit to place python code or system instructions we'd be very glad. Its very small change actually. @CoDanny ? |
for python web programming it's basically HTML programming wrapped in python code |
Yea, but which file to edit and how to make html button perform system level action? |
take a look at this https://bitbucket.org/fotosyn/fotosynlabs/raw/9d78640ca4ef8ffcea12194b8528b52ccad8b426/BerryCam/berryCam.py i havent done any web python stuff but here is some stuff on it |
This is perfect. With Octoprint supporting it already, this would seem very trivial for one of the AstroPrint Gurus. |
@robermeyer Man its an overkill, simple relay module is for 1.3USD approx on ebay, works great just pay attention if its 3.3 or 5v. Problem is in astrobox not supporting custom switches. I have no time to dig deeper and other issues preventing me from using astrobox. But maybe during summer I will try to do something about it |
I am looking for something with no exposed 110Volts.
Simply connecting 2 wires to the RASpi and your ready to go. Safe and
reliable.
Those jumper wires on that $1.30 board don't work for me.
The Youtube videos show how unreliable those jumpers are with having to
debug such a trivial interface.
Those $1.30 relay boards don't have a grounded plug or socket or protective
case.
That is fine for proof of concept. I already know it works. I want a
production version 🙂
You have to have the Plug, Socket and case to make it useful and not
dangerous.
I have kids that like to touch shiny stuff!
$20.00 is cheap if AstroPrint had 10-20 lines of code to turn it ON/OFF.
I just bought another RASPi to install OCTOPRINT. I will see how well this
works with this power box.
AstroBox may be better in some ways but in others they are moving very slow
right now.
…On Fri, Apr 21, 2017 at 12:05 PM, MikeDabrowski ***@***.***> wrote:
@robermeyer <https://github.com/robermeyer> Man its an overkill, simple
relay module is for 1.3USD approx on ebay, works great just pay attention
if its 3.3 or 5v. Problem is in astrobox not supporting custom switches. I
have no time to dig deeper and other issues preventing me from using
astrobox. But maybe during summer I will try to do something about it
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHKy3gl9cYZN_wYwJ8n43-vColNqrhuRks5ryP3vgaJpZM4Hom1O>
.
--
Rich
|
Fell the same need, and agree that this option should be made available has soon has possible, since it is such a simple procedure that can have so many applications (energy save, light and appliances related to the print control). |
Hi has any progress been made on this? |
@raptordemon No, at the moment we're busy with other things. When the AstroBox API is released this will be possible by the community |
PSU toggling support is one of 2 plugins that made me make the conversion back to OctoPi. I miss my Astrobox, please support this sort of plugin. |
|
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
The text was updated successfully, but these errors were encountered: