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

    Script to control Wemos from gcode using DSF

    Scheduled Pinned Locked Moved
    DSF Development
    4
    11
    718
    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.
    • T3P3Tonyundefined
      T3P3Tony administrators @oozeBot
      last edited by

      @oozeBot I forked this from the previous SBC topic as it stands alone as something useful.

      www.duet3d.com

      1 Reply Last reply Reply Quote 0
      • PCRundefined
        PCR
        last edited by

        Would add that you need execonmcode installed!

        1 Reply Last reply Reply Quote 0
        • CrazyCreatorundefined
          CrazyCreator @oozeBot
          last edited by CrazyCreator

          Hello @oozebot

          I think I understand what your script is doing, but unfortunately I have absolutely no idea what I have to change to make it work with my Shelly.

          In my theory, I just want to call a web address. I don't actually need the different parameters.
          It should just be turned off stupidly.

          I think only the web call (http://192.168.1.47/relay/0?turn=off) would have to be stored in the wemo.sh.
          Unfortunately, I don't know whether I need the curl, content-type, charset etc either. i have no idea about these things

          http://www.crazycreatorcube.com

          1 Reply Last reply Reply Quote 0
          • CrazyCreatorundefined
            CrazyCreator
            last edited by

            anybody can help me with a hint

            http://www.crazycreatorcube.com

            oozeBotundefined 1 Reply Last reply Reply Quote 0
            • oozeBotundefined
              oozeBot @CrazyCreator
              last edited by

              @CrazyCreator - this is untested, but all you need is something like the following. Google curl for more info.

              #!/bin/sh
              curl -s 'http://192.168.1.47/relay/0?turn=off' > /dev/null
              
              CrazyCreatorundefined 1 Reply Last reply Reply Quote 0
              • CrazyCreatorundefined
                CrazyCreator @oozeBot
                last edited by

                @oozebot
                Well that sounds understandable even to me. ๐Ÿ˜‰

                But I still ask one more question:
                Where do you create the scripts folder where your wemo.sh is then located?

                http://www.crazycreatorcube.com

                CrazyCreatorundefined 1 Reply Last reply Reply Quote 0
                • CrazyCreatorundefined
                  CrazyCreator @CrazyCreator
                  last edited by

                  @oozeBot Can you give me a little tip where I should create the folder and then wemo.sh must go?

                  http://www.crazycreatorcube.com

                  oozeBotundefined 1 Reply Last reply Reply Quote 0
                  • oozeBotundefined
                    oozeBot @CrazyCreator
                    last edited by

                    @crazycreator the script can go most anywhere in the file system. If you look close at the service script I provided above, youโ€™ll see we use a folder named โ€œscriptsโ€ off the root.

                    CrazyCreatorundefined 2 Replies Last reply Reply Quote 1
                    • CrazyCreatorundefined
                      CrazyCreator @oozeBot
                      last edited by

                      @oozebot
                      Many thanks for the answer .. now I can try ๐Ÿ™‚

                      http://www.crazycreatorcube.com

                      1 Reply Last reply Reply Quote 0
                      • CrazyCreatorundefined
                        CrazyCreator @oozeBot
                        last edited by

                        @oozebot
                        I could kiss you right now ๐Ÿ˜‰

                        It works absolutely perfectly.

                        I now have a real physical switch on the printer to turn it on and off and can still switch it off automatically at the end of a print ๐Ÿ™‚ Love it

                        http://www.crazycreatorcube.com

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