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

ExecOnMcode

Scheduled Pinned Locked Moved
Plugins for DWC and DSF
11
76
5.0k
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
    CrazyCreator @Falcounet
    last edited by CrazyCreator 12 Apr 2022, 00:32 4 Dec 2022, 00:31

    @Falcounet
    I would like to send an http command to my network when the printer has finished printing.
    The command I wrote here turns off the smart socket and thus the printer.

    I think is anything with curl or so ...

    @BtnCmd: What is this and what can is do for me?

    http://www.crazycreatorcube.com

    undefined 1 Reply Last reply 5 Dec 2022, 10:11 Reply Quote 0
    • undefined
      Falcounet @CrazyCreator
      last edited by 5 Dec 2022, 10:11

      @CrazyCreator You can try adding a M1203 command doing curl http://192.168.1.45/relay/0?turn=off and then adding M1203 to your end-gcode.

      undefined 1 Reply Last reply 5 Dec 2022, 21:51 Reply Quote 0
      • undefined
        CrazyCreator @Falcounet
        last edited by 5 Dec 2022, 21:51

        @Falcounet said in ExecOnMcode v0.1:

        curl http://192.168.1.45/relay/0?turn=off

        Bildschirm­foto 2022-12-05 um 22.51.18.png

        http://www.crazycreatorcube.com

        undefined 1 Reply Last reply 5 Dec 2022, 21:53 Reply Quote 0
        • undefined
          Falcounet @CrazyCreator
          last edited by Falcounet 12 May 2022, 21:55 5 Dec 2022, 21:53

          @CrazyCreator The error comes from the relay you are trying to drive. I would suggest you to open a thread for your issue as it is not directly related to this plugin. Thanks
          To add a bit more details, I think you have either to be identified or to allow an IP address from your network to send this command.

          undefined 1 Reply Last reply 5 Dec 2022, 21:56 Reply Quote 0
          • undefined
            CrazyCreator @Falcounet
            last edited by 5 Dec 2022, 21:56

            @Falcounet
            maybe the switch need a password or so ... but in the old execonmcode script the same switch worked, without errors. i will see, maybe everyone have a idea what i can try.

            thanks

            http://www.crazycreatorcube.com

            undefined 1 Reply Last reply 5 Dec 2022, 22:05 Reply Quote 0
            • undefined
              Falcounet @CrazyCreator
              last edited by 5 Dec 2022, 22:05

              @CrazyCreator As said, open a thread and give a bit more informations about your setup (what kind of relay, etc ...)
              The 401 HTTP Error comes from this device so if it was working with the old execonmcode, I believe it is either because the config has changed, you were using another url or so.

              undefined 2 Replies Last reply 5 Dec 2022, 22:19 Reply Quote 0
              • undefined
                CrazyCreator @Falcounet
                last edited by CrazyCreator 12 May 2022, 22:19 5 Dec 2022, 22:19

                @Falcounet
                thanks for the hints ... i try tomorrow any thinks and then make a new thread.
                Or maybe BtnCmd can help me

                http://www.crazycreatorcube.com

                1 Reply Last reply Reply Quote 0
                • undefined stuartofmt referenced this topic 11 Dec 2022, 16:55
                • undefined
                  CrazyCreator @Falcounet
                  last edited by 12 Dec 2022, 19:31

                  @Falcounet
                  It works now 🙂

                  Solution for others reading here:
                  The shelly 1 switch had a password-protected web interface. So it didn't work.
                  Without a password I now get a warning in ioBroker, but it works for now 😉

                  http://www.crazycreatorcube.com

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    Falcounet
                    last edited by 16 Dec 2022, 17:05

                    ExecOnMcode V0.2 is released.
                    No plugin improvements has been added on that version.
                    Only change is the module imports to use dsf-python v3.4.5
                    See https://forum.duet3d.com/topic/30761/dsf-python-3-4-5-released for more details

                    undefined undefined 2 Replies Last reply 16 Dec 2022, 20:30 Reply Quote 1
                    • undefined
                      CrazyCreator @Falcounet
                      last edited by CrazyCreator 16 Dec 2022, 20:30

                      @Falcounet
                      Just installed the v0.2 over the v0.1 ... worked without any problems.
                      Which is impractical, my created commands are gone now 😉

                      http://www.crazycreatorcube.com

                      undefined 1 Reply Last reply 16 Dec 2022, 21:09 Reply Quote 0
                      • undefined
                        Falcounet @CrazyCreator
                        last edited by Falcounet 16 Dec 2022, 21:09

                        @CrazyCreator I think there is something wrong with the plugin reloading after upgrade.
                        I just tried and the config file is still there in sd/sys/ExecOnMcode/ExecOnMcode.json after plugin upgrade.
                        The plugin was in "desactivated" mode. A stop and a start on the plugin fixed it.

                        undefined 1 Reply Last reply 17 Dec 2022, 11:42 Reply Quote 0
                        • undefined
                          CrazyCreator @Falcounet
                          last edited by 17 Dec 2022, 11:42

                          @Falcounet strange but right

                          http://www.crazycreatorcube.com

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            CrazyCreator
                            last edited by 24 Dec 2022, 10:11

                            @Falcounet
                            I think you must make a little update in your plugin 😉

                            Bildschirm­foto 2022-12-24 um 10.45.45.png

                            http://www.crazycreatorcube.com

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              Garth_42 @Falcounet
                              last edited by 29 Dec 2022, 21:15

                              I am having trouble installing the newest version on my Duet3. I am getting the following error:
                              c58ff8ee-2359-473e-bb57-b33a6e91f605-image.png

                              dsf-python is installed on the RPI. Pip3 is recognized in the terminal when I enter "pip3".

                              Here is an output of M122:

                              M122
                              === Diagnostics ===
                              RepRapFirmware for Duet 3 MB6HC version 3.4.5 (2022-11-30 19:35:23) running on Duet 3 MB6HC v1.01 (SBC mode)
                              Board ID: 08DJM-956BA-NA3TJ-6JTDA-3S06M-9U8GS
                              Used output buffers: 1 of 40 (13 max)
                              === RTOS ===
                              Static ram: 152760
                              Dynamic ram: 67548 of which 204 recycled
                              Never used RAM 130160, free system stack 200 words
                              Tasks: SBC(ready,0.5%,446) HEAT(notifyWait,0.0%,322) Move(notifyWait,0.0%,351) CanReceiv(notifyWait,0.0%,774) CanSender(notifyWait,0.0%,336) CanClock(delaying,0.0%,339) TMC(notifyWait,7.6%,91) MAIN(running,91.8%,923) IDLE(ready,0.0%,30), total 100.0%
                              Owned mutexes: HTTP(MAIN)
                              === Platform ===
                              Last reset 01:16:51 ago, cause: software
                              Last software reset at 2022-05-29 08:42, reason: User, GCodes spinning, available RAM 132740, slot 1
                              Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task SBC Freestk 0 n/a
                              Error status: 0x00
                              Step timer max interval 134
                              MCU temperature: min 25.1, current 27.1, max 27.2
                              Supply voltage: min 24.0, current 24.0, max 24.1, under voltage events: 0, over voltage events: 0, power good: yes
                              12V rail voltage: min 12.1, current 12.2, max 12.2, under voltage events: 0
                              Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
                              Events: 0 queued, 0 completed
                              Driver 0: standstill, SG min 0, mspos 8, reads 15144, writes 15 timeouts 0
                              Driver 1: standstill, SG min 0, mspos 8, reads 15145, writes 15 timeouts 0
                              Driver 2: standstill, SG min 0, mspos 8, reads 15144, writes 16 timeouts 0
                              Driver 3: standstill, SG min 0, mspos 8, reads 15145, writes 15 timeouts 0
                              Driver 4: standstill, SG min 0, mspos 8, reads 15145, writes 15 timeouts 0
                              Driver 5: standstill, SG min 0, mspos 8, reads 15145, writes 15 timeouts 0
                              Date/time: 2022-12-28 21:41:46
                              Slowest loop: 1.48ms; fastest: 0.04ms
                              === Storage ===
                              Free file entries: 10
                              SD card 0 not detected, interface speed: 37.5MBytes/sec
                              SD card longest read time 0.0ms, write time 0.0ms, max retries 0
                              === Move ===
                              DMs created 125, segments created 0, maxWait 0ms, bed compensation in use: none, comp offset 0.000
                              === MainDDARing ===
                              Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                              === AuxDDARing ===
                              Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                              === Heat ===
                              Bed heaters 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
                              === GCodes ===
                              Segments left: 0
                              Movement lock held by null
                              HTTP* is doing "M122" in state(s) 0
                              Telnet is idle in state(s) 0
                              File is idle in state(s) 0
                              USB is idle in state(s) 0
                              Aux is idle in state(s) 0
                              Trigger* is idle in state(s) 0
                              Queue is idle in state(s) 0
                              LCD is idle in state(s) 0
                              SBC* is idle in state(s) 0
                              Daemon is idle in state(s) 0
                              Aux2 is idle in state(s) 0
                              Autopause is idle in state(s) 0
                              Code queue is empty
                              === CAN ===
                              Messages queued 41489, received 36956, lost 0, boc 0
                              Longest wait 1ms for reply type 6042, peak Tx sync delay 386, free buffers 50 (min 49), ts 23058/23057/0
                              Tx timeouts 0,0,0,0,0,0
                              === SBC interface ===
                              Transfer state: 5, failed transfers: 0, checksum errors: 0
                              RX/TX seq numbers: 23547/23547
                              SPI underruns 0, overruns 0
                              State: 5, disconnects: 5, timeouts: 5 total, 5 by SBC, IAP RAM available 0x2ad20
                              Buffer RX/TX: 0/0-0, open files: 0
                              === Duet Control Server ===
                              Duet Control Server v3.4.5
                              Code buffer space: 4096
                              Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 0
                              Full transfers per second: 38.22, max time between full transfers: 66.3ms, max pin wait times: 60.9ms/3.9ms
                              Codes per second: 0.00
                              Maximum length of RX/TX data transfers: 3195/64

                              Let me know if I can help with resolving this issue with any more information.

                              undefined 1 Reply Last reply 29 Dec 2022, 23:04 Reply Quote 0
                              • undefined
                                Falcounet @Garth_42
                                last edited by 29 Dec 2022, 23:04

                                @Garth_42 Are you using the DuetPi image ?
                                What does sudo find / -name pip3 returns (in a terminal on the SBC) ?

                                undefined 1 Reply Last reply 31 Dec 2022, 03:49 Reply Quote 0
                                • undefined
                                  Garth_42 @Falcounet
                                  last edited by 31 Dec 2022, 03:49

                                  @Falcounet thanks for getting back to me. I am using the DuetPi image.

                                  Here is the result when I SSH into the RPI as the root account.

                                  ab1c8ab6-2081-45dd-a0fa-e500af8cdbc4-image.png

                                  undefined 1 Reply Last reply 31 Dec 2022, 09:25 Reply Quote 0
                                  • undefined
                                    Falcounet @Garth_42
                                    last edited by Falcounet 31 Dec 2022, 09:25

                                    @Garth_42 Not sure why pip3 is installed at a different location as you are using the DuetPi image.
                                    You have to change the pip path in the DSF config which is stored at /opt/dsf/conf/plugins.json

                                    This command should do the trick :
                                    sed -i -e 's|"InstallPythonPackageCommand": .*,|"InstallPythonPackageCommand": "/usr/local/bin/pip3",|g' /opt/dsf/conf/plugins.json

                                    Then reboot the SBC and try to install the plugin again.

                                    undefined undefined 2 Replies Last reply 31 Dec 2022, 13:23 Reply Quote 0
                                    • undefined
                                      CrazyCreator @Falcounet
                                      last edited by 31 Dec 2022, 13:23

                                      @Falcounet Any update available, for use the plugin in newest beta RRF 3.5.0-b1

                                      http://www.crazycreatorcube.com

                                      undefined 1 Reply Last reply 31 Dec 2022, 13:30 Reply Quote 0
                                      • undefined
                                        Falcounet @CrazyCreator
                                        last edited by Falcounet 31 Dec 2022, 13:30

                                        @CrazyCreator No, it seems there is an issue with the plugin installation (related to the SBC permissions required by the plugin) so I'm waiting Christian to come back from holidays.

                                        undefined 1 Reply Last reply 31 Dec 2022, 13:31 Reply Quote 0
                                        • undefined
                                          CrazyCreator @Falcounet
                                          last edited by 31 Dec 2022, 13:31

                                          @Falcounet Ahh ... Ok ... Then we wait together 😉

                                          http://www.crazycreatorcube.com

                                          1 Reply Last reply Reply Quote 0
                                          53 out of 76
                                          • First post
                                            53/76
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA