• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Powering on using TP-Link smart Plug

Scheduled Pinned Locked Moved
Duet Hardware and wiring
6
13
1.5k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    E1ixir
    last edited by 4 Jun 2019, 08:05

    Hello friends,
    First of all, please pardon my poor english, French is my native language 🙂

    I'm new to Duet, and I'm trying to make my Duet Wifi mobo powering on my printer. I know it's possible with an ATX Supply... but I have no ATX PSU at the moment.

    I don't know how it Octoprint exactly works, but my Octoprint server manage to send M80 commands to wake up my printer, via a TP-LInk smart Plug and a special plugin.

    Could DWC possibly do the same? That would be great.
    Thank you very much for your advice.

    1 Reply Last reply Reply Quote 0
    • undefined
      dc42 administrators
      last edited by 4 Jun 2019, 08:23

      It would be possible, but it would require some code to be added to DWC to control the Smart Switch. I found some Python code at https://github.com/softScheck/tplink-smartplug that could be translated into Javascript for use in DWC.

      I'll alert chrishamm to this request (he maintains Duet Web Control).

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      undefined 1 Reply Last reply 4 Jun 2019, 09:38 Reply Quote 0
      • undefined
        Veti
        last edited by 4 Jun 2019, 08:53

        you could set up an openhab instance on a raspberry pi.
        use the gpio plugin to read the ps_on signal from the duet.
        then use the TP-Link Smart Home Binding to turn on the plug.

        undefined 1 Reply Last reply 4 Jun 2019, 09:44 Reply Quote 0
        • undefined
          E1ixir @dc42
          last edited by 4 Jun 2019, 09:38

          @dc42 Thanks you so much, that would be great. We are numerous using the Tplink plug with our Cr10 printers here in France. 😀😀😀

          1 Reply Last reply Reply Quote 0
          • undefined
            E1ixir @Veti
            last edited by 4 Jun 2019, 09:44

            @veti thank you for your answer but it seems a bit complicated to me as I have no idea of how to do that concretely😟😉

            1 Reply Last reply Reply Quote 0
            • undefined
              mudcruzr
              last edited by 4 Jun 2019, 10:00

              Maybe I'm missing something here but why not simply plug the printer in via the smartplug and use your smartphone or even better Alexa to turn the printer on & off. That's what I do, before I go to my workshop I say "Alexa, turn on workshop" and everything that's plugged in via a smartplug switches on. Of course I can control each smartplug individually too.
              Another advantage is that I can leave the workshop with the printers finished printing but with the hotend fan still running while the printers cool down and turn everything off later. Previously I'd wait, twiddling my thumbs, until the hotend had cooled down before switching off for the night.

              1 Reply Last reply Reply Quote 0
              • undefined
                E1ixir
                last edited by E1ixir 6 Apr 2019, 10:41 4 Jun 2019, 10:37

                Hello,
                The interest is to switch power off automaticly with a simple M81 gcode command when print job is finished. You can also switch it off in case of emergency even when not at Home.

                1 Reply Last reply Reply Quote 0
                • undefined
                  sinned6915
                  last edited by sinned6915 6 Dec 2019, 04:11 12 Jun 2019, 04:04

                  I might be missing something, but can't you assign a PS_ON pin in RRF?
                  DWC seems to know about 'ATX Power On' and Off on my setup.

                  That pin then needs to drive an external relay. Problem is the pin is 3.3V and most relay modules are 5V. There might be a similar 3V trigger one, but I already had the 5V one.

                  So I use the pin output to control the gate on a mosfet to drive the relay board. Just like the Duet HW schematic.

                  Here is my current setup for controlling my ATX controlled printer-

                  alt text

                  I use the same setup to control a opto-coupled relay like this one to control a Meanwell psu on a different printer.

                  alt text
                  http://www.hiletgo.com/ProductDetail/1958599.html.

                  The 5V realy can be triggered either high or low. I use it to control the mains voltage to my printer.

                  undefined 1 Reply Last reply 12 Jun 2019, 05:49 Reply Quote 0
                  • undefined
                    DocTrucker @sinned6915
                    last edited by DocTrucker 6 Dec 2019, 06:02 12 Jun 2019, 05:49

                    @sinned6915 said in Powering on using TP-Link smart Plug:

                    That pin then needs to drive an external relay. Problem is the pin is 3.3V and most relay modules are 5V. There might be a similar 3V trigger one, but I already had the 5V one.

                    On a duet PS_ON is driven by a mosfet last time I checked? Think v0.6 and v0.8.5 could only switch about 5V but duet 2 had no problem switching 24VDC force guided safety relays once flyback dioded were added.

                    ...I will however now go away and check!

                    Edit: Page 3 of the Duet2wifi 1.4 schematic shows a PMV40UN2 which is rated for 30V gate - source.

                    https://github.com/T3P3/Duet/blob/master/Duet2/Duet2v1.04/DuetWifi_Schematic_v1.04.pdf

                    That'll be a bit dejavu for someone on here because I had advised to use a relay in order to sink anything over 5V using the PS_ON and they posted more-or-less the above verbatum!

                    Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      sinned6915
                      last edited by 12 Jun 2019, 20:30

                      umm, the schematic in the pic i posted is a snip from the Duet 2 wifi schematic.

                      undefined 1 Reply Last reply 12 Jun 2019, 20:38 Reply Quote 0
                      • undefined
                        DocTrucker @sinned6915
                        last edited by 12 Jun 2019, 20:38

                        @sinned6915 that diagram wasn't loading when I commented, maybe an issue my end. Either way I'm not sure I follow the need for the extra external electronics?

                        Running 3 P3Steel with Duet 2. Duet 3 on the shelf looking for a suitable machine. One first generation Duet in a Logo/Turtle style robot!

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          E1ixir
                          last edited by E1ixir 6 Dec 2019, 20:51 12 Jun 2019, 20:48

                          Thank you very much for your answers.... There are already several discussions on the forum about using an ATX power supply Or a Meanwell PSU to remotely power the printer on/off... but the original subject was about powering on/off using a TP Link smart plug... (wich means having a plug'n'play solution, with no need to have any special skills in electronics) 😉

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            sinned6915
                            last edited by 12 Jun 2019, 21:41

                            Octoprint and the TP-Link plugins use python scripts and API keys to manage the smart plug.

                            If you want to use the DWC capability to remotely turn off and turn on the printer then you must use a hardware device wired to the board to control a device.

                            If you already use Octoprint and the TP-link plugin, then why don't you just keep using it? PSU control and TP-Link will still work the the Duet board connected via USB.

                            1 Reply Last reply Reply Quote 1
                            • First post
                              Last post
                            Unless otherwise noted, all forum content is licensed under CC-BY-SA