Announcement

Collapse
No announcement yet.

Jon00 OctoPrint (3D Printer Interface) For HomeSeer 3

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    btw, do you know of a way to notify if the MMU errors or requires user input (thinks it needs a filament change or mmu needs help)?
    maybe a way to tell if the Progress_Completion hasn't changed in a few polls?
    seems if there's an error, the printer states are the same as when printing.
    thanks

    Comment


      #32
      There is nothing in the API to monitor MMU errors so it would have to be on monitoring progress completion as you suggest.

      I've sent you a Private Message with a link to V1.0.2 which adds a new virtual device called Progress_Stalled_Count

      This will start counting up after the second poll of the script if the progress_completion is between >0 & <100 and has not changed since the last poll. Obviously if you pause the printer, that too will cause the counter to increment.

      You can therefore trigger an event when the count reaches a specified value.

      Please let me know if it resolves your requirement.

      Click image for larger version  Name:	Capture.PNG Views:	0 Size:	23.6 KB ID:	1395505
      Jon

      Comment


        #33
        Fantastic Jon! i'll test it out and will let you know (i'm in middle of a long running print). any chance there's a way to SET/RESET the counter back to 0?

        i'm setting up an event like this:
        IF OctoPrint PrinterState_Flags_Printing had its value set to True
        AND IF OctoPrint Progress_Stalled_Count has a value that is greater than 0
        Then Send Pushover Notification
        Then <SET Progress_Stalled_Count to 0, via a script?>

        Comment


          #34
          It should automatically reset as soon as printing is resumed; therefore is this necessary?

          Also, I would set the count trigger to a specific value, otherwise it will retrigger because the count will continue to increase.
          Jon

          Comment


            #35
            ah ok. if it reset then thats all i need. i'll test it soon. thanks!

            Comment


              #36
              it worked! i cut the filament and caused the mmu sensor to think filament ran out. i was able to trigger the event, but only if i removed the
              IF OctoPrint PrinterState_Flags_Printing had its value set to True
              PrinterState_Flags_Printing
              Status 1 = Dim
              Value 1 = "True"
              String
              but it didn't trigger. i dont need that part anyway.

              I set my event to not run for 5 mins, so the > 0 should be good for me so i get repeat notifications.


              i cancelled my job, and now i see this error (even after i restart another job):
              Jun-21 4:47:38 PM Jon00_Octoprint Error at Main Block 30 Input string was not in a correct format.



              Code:
              [Value]
              SD_Ready=0
              PrinterState_Flags_Cancelling=0
              PrinterState_Flags_ClosedOrError=0
              PrinterState_Flags_Error=0
              PrinterState_Flags_Finishing=0
              PrinterState_Flags_Operational=1
              PrinterState_Flags_Paused=0
              PrinterState_Flags_Pausing=0
              PrinterState_Flags_Printing=0
              PrinterState_Flags_Ready=1
              PrinterState_Flags_Resuming=0
              PrinterState_Flags_SDReady=0
              PrinterState_Text=0
              Temperature_Bed_Actual=60.1
              Temperature_Bed_Offset=0
              Temperature_Bed_Target=60.0
              Temperature_Tool0_Actual=210.0
              Temperature_Tool0_Offset=0
              Temperature_Tool0_Target=210.0
              Temperature_Tool1_Actual=210.0
              Temperature_Tool1_Offset=0
              Temperature_Tool1_Target=210.0
              Job_AveragePrintTime=-1
              Job_EstimatedPrintTime=12199.040621921355
              Job_Filament_Tool0_Length=27.19535130997859
              Job_Filament_Tool0_Volume=65.41248560115456
              Job_Filament_Tool1_Length=-1
              Job_Filament_Tool1_Volume=-1
              Job_File_Name=0
              Job_File_Origin=0
              Job_File_Date=1592748306
              Job_File_Size=23178586
              Job_File_Path=0
              Job_File_Display=0
              Progress_FilePos=-1
              Progress_Completion=-1
              Progress_PrintTime=-1
              Progress_PrintTimeLeft=-1
              Progress_PrintTimeLeftOrigin=-1
              Progress_Stalled_Count=0
              [String]
              SD_Ready=false
              PrinterState_Flags_Cancelling=false
              PrinterState_Flags_ClosedOrError=false
              PrinterState_Flags_Error=false
              PrinterState_Flags_Finishing=false
              PrinterState_Flags_Operational=true
              PrinterState_Flags_Paused=false
              PrinterState_Flags_Pausing=false
              PrinterState_Flags_Printing=false
              PrinterState_Flags_Ready=true
              PrinterState_Flags_Resuming=false
              PrinterState_Flags_SDReady=false
              PrinterState_Text=Operational
              Temperature_Bed_Actual=60.1
              Temperature_Bed_Offset=0
              Temperature_Bed_Target=60.0
              Temperature_Tool0_Actual=210.0
              Temperature_Tool0_Offset=0
              Temperature_Tool0_Target=210.0
              Temperature_Tool1_Actual=210.0
              Temperature_Tool1_Offset=0
              Temperature_Tool1_Target=210.0
              Job_AveragePrintTime=N/A
              Job_EstimatedPrintTime=12199.040621921355
              Job_Filament_Tool0_Length=27195.35130997859
              Job_Filament_Tool0_Volume=65.41248560115456
              Job_Filament_Tool1_Length=N/A
              Job_Filament_Tool1_Volume=N/A
              Job_File_Name=Stand_V2_0.2mm_PLA_MK3SMMU2S_6h50m.gcode
              Job_File_Origin=local
              Job_File_Date=1592748306
              Job_File_Size=23178586
              Job_File_Path=Stand_V2_0.2mm_PLA_MK3SMMU2S_6h50m.gcode
              Job_File_Display=Stand_V2_0.2mm_PLA_MK3SMMU2S_6h50m.gcode
              Progress_FilePos=N/A
              Progress_Completion=N/A
              Progress_PrintTime=N/A
              Progress_PrintTimeLeft=N/A
              Progress_PrintTimeLeftOrigin=N/A
              Progress_Stalled_Count=0
              [Updated]
              Time=6/21/2020 4:47:38 PM
              [Data]
              Last_Progress_Completion=-1
              Last_Stalled_Count=0

              Comment


                #37
                ever watch RoboCop scene "I like it"? That's me right now.

                on my Prusa, i notice the Z motors are always active and warm, even if i'm not printing.

                Thanks to your script, after a print is done, I gracefully shutdown OctoPi server, then the printer power.

                Click image for larger version  Name:	octoprintshutdown.PNG Views:	0 Size:	222.0 KB ID:	1395773

                (i use a virtual switch for maintenance if i know i'll be doing stuff after the print, like leveling or taking more photos and don't want anything to turn off)

                Thanks Jon!

                Comment


                  #38
                  Good to hear. I've now corrected the errors you are seeing on Linux and you can re-enable the two devices if you wish. You can re-download the latest version from the link in my Private Message.
                  Jon

                  Comment


                    #39
                    V1.0.2 is now available for download:

                    Changes since 1.0.1:

                    Added Progress_Stalled_Count virtual device which will show an increasing count value if the printer is stalled/paused in any way.
                    Corrected bug with Job_EstimatedPrintTime & Job_AveragePrintTime on Linux.
                    Checked for correct operation on HS4
                    Jon

                    Comment


                      #40
                      I'm really liking the plugin for monitoring the status and triggering events, thanks! Is there a way to use the plugin to call a preheat command or set the bed temp? I'm trying to set up a multitap switch to do that. Thanks

                      Comment


                        #41
                        No,it only has basic control of the printer. I believe it is supported in the API but I'm busy with another project at the moment.
                        Jon

                        Comment

                        Working...
                        X