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

notifications upon start/pause/finish of print

Scheduled Pinned Locked Moved
Third-party software
18
65
6.3k
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.
  • ?
    A Former User
    last edited by 2 Jul 2019, 18:44

    ☝ that. especially like that you can self host it

    1 Reply Last reply Reply Quote 0
    • undefined
      jay_s_uk
      last edited by 2 Jul 2019, 21:38

      I'd be interested in telegram support

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      undefined 1 Reply Last reply 3 Jul 2019, 19:49 Reply Quote 0
      • undefined
        zapta @Torin
        last edited by zapta 7 Mar 2019, 03:13 2 Jul 2019, 23:41

        @torin said in notifications upon start/pause/finish of print:

        @zapta https://www.thespaghettidetective.com/ <-that.

        Very nice! Now we need an open source one that doesn't require octoprint. πŸ˜‰

        (I am trying to avoid those print servers and Duet makes it very easy)

        1 Reply Last reply Reply Quote 0
        • undefined
          Torin @jay_s_uk
          last edited by 3 Jul 2019, 19:49

          @jay_s_uk If you will open releases page it should be there(v3) in about 10-15 minutes, it's building as we speak.
          Brief instructions in the readme.

          1 Reply Last reply Reply Quote 0
          • undefined
            taglia
            last edited by 3 Dec 2020, 06:40

            Hi all. I've been using this for quite some time and it has always been very reliable. Unfortunately, the API response format has changed (I noticed this in RRF v3.2beta4). I have fixed the problem, but I don't have the time right now to make it generic and support both the old and new versions of the firmware.

            @Torin I have submitted a merge request.

            If anyone has this problem, you can get my fork.

            1 Reply Last reply Reply Quote 1
            • undefined
              Torin
              last edited by 3 Dec 2020, 06:44

              Merged πŸ™‚ Cheers dude!

              1 Reply Last reply Reply Quote 1
              • undefined
                scumdead
                last edited by 24 Feb 2021, 20:39

                Bonjour,

                Je rencontre un problème avec reprap notify :
                "Error parsing JSON: json: cannot unmarshal array into Go struct field .fanRPM of type int"
                J'ai une duet 2 wifi en 1.04, et j'utilise RRF 3.2.1.

                J'aimerais beaucoup pouvoir recevoir un email en fin d'impression...

                Merci pour votre aide.

                undefined 1 Reply Last reply 24 Feb 2021, 21:55 Reply Quote 0
                • undefined
                  Torin @scumdead
                  last edited by 24 Feb 2021, 21:55

                  @scumdead Can you give it a go with new release?
                  https://gitlab.com/Toriniasty/reprap_notify/-/releases/v5

                  Also could you please write in english, I only understood what you've said because of the error in the post. Hope it will be all good now.

                  Also added re-notify feature.

                  undefined 1 Reply Last reply 7 Mar 2021, 21:53 Reply Quote 0
                  • undefined
                    scumdead
                    last edited by 25 Feb 2021, 06:13

                    Thanks for the answer, I’m testing this day, and tell you if it works.
                    Sorry for my poor english.

                    1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User
                      last edited by A Former User 25 Feb 2021, 10:10

                      @Torin

                      This would be cool as a plugin 😎

                      undefined 1 Reply Last reply 25 Feb 2021, 19:21 Reply Quote 0
                      • undefined
                        scumdead
                        last edited by scumdead 25 Feb 2021, 18:13

                        It works perfectly, thank you very much.πŸ‘
                        (Linux amd64 version)

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          Torin @A Former User
                          last edited by 25 Feb 2021, 19:21

                          @LB If you're talking about renotification then it is already there πŸ˜‰

                          ? 1 Reply Last reply 26 Feb 2021, 15:16 Reply Quote 1
                          • ?
                            A Former User @Torin
                            last edited by A Former User 26 Feb 2021, 15:16

                            @Torin
                            YUHUU!

                            😡 but where:

                            52a058a1-cb41-4d0d-a940-f71049b639dc-grafik.png

                            4f0dc9c3-8704-4aba-950b-980915389d40-grafik.png

                            Do I have to download something and import it or how would it work?

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              Torin
                              last edited by 27 Feb 2021, 10:11

                              @LB said in notifications upon start/pause/finish of print:

                              Do I have to download something and import it or how would it work?

                              Ah. Okey. To be fair, I haven't seen plugins functionality and I'm not sure how it is supposed to work. Maybe one day I will have a look and see if there's any possibility.... Anyhow, to make the notifier work just download one file from release page matching your system that's running, configure it via example yaml file and start it.

                              1 Reply Last reply Reply Quote 1
                              • undefined
                                mct82
                                last edited by 7 Mar 2021, 20:10

                                @Torin Can you provide a little guidance on the Slack integration setup?

                                I have created a workflow and successfully posted to a channel, however I'm not able to determine which variable names to use to extract information from the web request. Slack doesn't provide many details for troubleshooting.

                                slack-var-config

                                The workflow completes successfully with a single variable named "text", but this appears to be empty. Do I need to reconfigure the contents of notifications.go to eliminate the nested json (slack docs say they aren't supported for variables)?

                                if viper.GetBool(`notifications.slack.enabled`) && viper.Get(`notifications.slack.webhookurl`) != `` && contains(returnStatus(status.Status), viper.GetStringSlice(`notifications.pushover.when`)) {
                                		go func(messageText string, messageTitle string) {
                                			log.Printf("Sending slack message\n")
                                			message := slackRequestBody{
                                				Attachments: []attachment{{
                                					Title: messageTitle,
                                					Text:  messageText,
                                					Color: "good",
                                				},
                                				},
                                			}
                                			sendSlackNotification(message)
                                		}(messageTitle, messageText)
                                	}
                                
                                

                                Also seems like "viper.GetStringSlice" should refer to notifications.slack.when, correct?

                                undefined 1 Reply Last reply 7 Mar 2021, 20:44 Reply Quote 0
                                • undefined
                                  Torin @mct82
                                  last edited by 7 Mar 2021, 20:44

                                  @mct82 Hey, that's a good spot with if condition. I found the same problem in email and telegram too πŸ˜‚ ... So if you will head down to releases page there should be a new one with the fix.

                                  In regards to Slack. I can't remember, but it should just work ootb when you change enable do true and put webhook url in. If you will still struggle let me know, I will try to see and check it during week.

                                  https://gitlab.com/Toriniasty/reprap_notify/-/releases/v6

                                  undefined 1 Reply Last reply 7 Mar 2021, 21:02 Reply Quote 0
                                  • undefined
                                    mct82 @Torin
                                    last edited by mct82 3 Jul 2021, 21:03 7 Mar 2021, 21:02

                                    @Torin Thanks for the quick update!

                                    I documented a little of my setup to help with troubleshooting, maybe something has changed on Slack's end?

                                    Here is my webhook setup:

                                    slack-webhook.png

                                    And here is the next action in the workflow:

                                    slack-action.png

                                    This is the result posted to the channel:

                                    slack-msg.png

                                    Is there a way to post to a channel from a webhook w/o using the workflow tool? Maybe that's something I missed....

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      Torin
                                      last edited by 7 Mar 2021, 21:17

                                      Actually just tested it quickly. It works literally as you did. Just copy paste slack webhook url, put it in config and it should just appear.

                                      text is not needed, as it is send via attachments in slack:
                                      https://api.slack.com/reference/messaging/attachments

                                      undefined 1 Reply Last reply 7 Mar 2021, 21:34 Reply Quote 0
                                      • undefined
                                        mct82 @Torin
                                        last edited by 7 Mar 2021, 21:34

                                        @Torin Well it works perfectly when set up properly 😊

                                        So to change the content of the attachment, I just need to update these sections and recompile?

                                        func sendNotification(status rrStatusType, fileinfo rrFileinfoType) {
                                        	messageTitle := `Your friendly 3d printer status`
                                        	messageText := fmt.Sprintf(`Status: %v, print file name: %v, print time: %v`, returnStatus(status.Status), fileinfo.FileName, niceTime(fileinfo.PrintDuration))
                                        
                                        	if status.TimesLeft.File != 0 && status.Status == `P` {
                                        		messageText = fmt.Sprintf(`, print time left: %v`, niceTime(int(status.TimesLeft.File)))
                                        	}
                                        

                                        and

                                        
                                        	if viper.GetBool(`notifications.slack.enabled`) &&
                                        		viper.Get(`notifications.slack.webhookurl`) != `` &&
                                        		contains(returnStatus(status.Status), viper.GetStringSlice(`notifications.slack.when`)) {
                                        		go func(messageText string, messageTitle string) {
                                        			log.Printf("Sending slack message\n")
                                        			message := slackRequestBody{
                                        				Attachments: []attachment{{
                                        					Title: messageTitle,
                                        					Text:  messageText,
                                        					Color: "good",
                                        				},
                                        				},
                                        			}
                                        			sendSlackNotification(message)
                                        		}(messageTitle, messageText)
                                        	}
                                        

                                        Thank you for putting this together!

                                        undefined 1 Reply Last reply 8 Mar 2021, 07:38 Reply Quote 0
                                        • undefined
                                          mct82 @Torin
                                          last edited by 7 Mar 2021, 21:53

                                          @Torin said in notifications upon start/pause/finish of print:

                                          Also added re-notify feature.

                                          The re-notify feature does not appear to be working under windows. I receive the first notification for any new status, but no subsequent updates after status changes. I see a reference to time.Now().Unix() in the main.go source, could this be part of the issue?

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