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

Notification via Pushover or other service

Scheduled Pinned Locked Moved
Firmware wishlist
23
45
12.4k
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
    iDevelo
    last edited by 5 Mar 2017, 20:07

    @Jackal:

    Hi guys, I have created a version of Duet Web Control integrated with Pushover.
    I didn't check how Octopi implements this, so my implementation is very basic.
    I use the M117 G-code with a specified prefix (keyword) to send messages to Pushover

    Under Settings > User Interface you will see a Pushover panel.
    Put your Token and User Key in there for the Pushover API
    The Keyword field will filter messages starting with that string and send to Pushover

    After saving the settings, you can try to send M117 through the console to test it out.
    e.g. M117 Push:Hello World
    will send "Hello World" to your devices (if you have set Push: as the keyword)

    Please let me know if this works for you
    Download: https://www.dropbox.com/s/szvsdn0pv9ki09t/DuetWebControl-1.14a%2Bpush.bin?dl=0

    Is this on GitHub? With a pull request? 🙂

    1 Reply Last reply Reply Quote 0
    • undefined
      Jackal
      last edited by 3 Jun 2017, 07:36 6 Mar 2017, 04:50

      I have put it on Github now, but I believe it needs further refinement before doing a pull request (I am not a skilled programmer)
      https://github.com/SleepyPrince/DuetWebControl/tree/pushover

      Please leave a comment or any suggestions after you have tried it out

      1 Reply Last reply Reply Quote 0
      • undefined
        T3P3Tony administrators
        last edited by 6 Mar 2017, 12:54

        That's great work Jackal, hopefully Christian will have a look at it and include it in a future version

        www.duet3d.com

        1 Reply Last reply Reply Quote 0
        • undefined
          kraegar
          last edited by 6 Mar 2017, 13:23

          Personally, rather than support for a single notification service, I'd rather see an API for pulling data from DWC. So we could poll the data its already displaying without generating more gcode for the duet itself to worry about. (Temps, file progress, etc)

          Then it'd be trivial to use a PI or similar to do stuff with that data - push notifications, light up LEDs, turn on/off a webcam, whatever by reacting to data pulled from the API.

          (If such an API already exists, I haven't found it referenced yet)

          Co-Creator of the RailcoreII CoreXY printer
          https://www.thingiverse.com/thing:2407174

          1 Reply Last reply Reply Quote 0
          • undefined
            Flyer007
            last edited by 6 Mar 2017, 14:04

            Nice work on the Push; But I agree the API would be sweet and open up a bunch of capability.

            @kraegar:

            Personally, rather than support for a single notification service, I'd rather see an API for pulling data from DWC. So we could poll the data its already displaying without generating more gcode for the duet itself to worry about. (Temps, file progress, etc)

            Then it'd be trivial to use a PI or similar to do stuff with that data - push notifications, light up LEDs, turn on/off a webcam, whatever by reacting to data pulled from the API.

            (If such an API already exists, I haven't found it referenced yet)

            1 Reply Last reply Reply Quote 0
            • undefined
              chrishamm administrators
              last edited by 6 Mar 2017, 14:33

              @Jackal:

              I have put it on Github now, but I believe it needs further refinement before doing a pull request (I am not a skilled programmer)
              https://github.com/SleepyPrince/DuetWebControl/tree/pushover

              Please leave a comment or any suggestions after you have tried it out

              Could you push your source changes to GitHub too? That way I could check how much work would be required.

              Duet software engineer

              1 Reply Last reply Reply Quote 0
              • undefined
                Jackal
                last edited by 6 Mar 2017, 14:40

                There are a few http requests you can send to DWC
                https://github.com/chrishamm/DuetWebControl/blob/master/README.md
                Probably rr_status is what you need

                1 Reply Last reply Reply Quote 0
                • undefined
                  T3P3Tony administrators
                  last edited by 6 Mar 2017, 14:49

                  How do you see a general API working, further than the existing rr_…... Http requests?

                  www.duet3d.com

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    kraegar
                    last edited by 6 Mar 2017, 15:17

                    Didn't know about rr_status. It may do what I was looking for, I'll have to play with it and see what's reported.

                    I'd envision it polling from the DWC itself rather than relaying the requests on to the firmware, to keep the processing load lower, but perhaps that's not needed.

                    Typically in an API like that I'd expect any value displayed within the interface to be a pollable value in the API. So the current temps, current print layer, all your xyz axis, zprobe status, whatever. Just give each value a name for the API, and have it report those when queried for that value.

                    Co-Creator of the RailcoreII CoreXY printer
                    https://www.thingiverse.com/thing:2407174

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      Jackal
                      last edited by 3 Jun 2017, 15:38 6 Mar 2017, 15:37

                      @chrishamm:

                      @Jackal:

                      I have put it on Github now, but I believe it needs further refinement before doing a pull request (I am not a skilled programmer)
                      https://github.com/SleepyPrince/DuetWebControl/tree/pushover

                      Please leave a comment or any suggestions after you have tried it out

                      Could you push your source changes to GitHub too? That way I could check how much work would be required.

                      Oh, I didn't realize I only committed the compiled files. It should be fixed now.
                      You would probably laugh at my poor coding :hc:
                      I just hack things together to make it work, I believe you will have a better way to do it.

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        chrishamm administrators
                        last edited by 6 Mar 2017, 17:14

                        Thanks for the new commit.

                        Well, TBH I'm not planning on adding support for cloud-based services to DWC as I see no good reason to send data to external web services unless more people explicitly ask for this. One exception may be STL drag'n'drop which would require slicing to be done on an external server, but that's just an idea I might implement someday.

                        Modern browsers already provide Web Notifications and in fact I thought you were using this technique to achieve pushover notifications (also see https://www.w3.org/TR/notifications/)), so I'm wondering if there is any good reason why we cannot use this standard instead. If you want to see a demo, have a look at this page: https://davidwalsh.name/demo/notifications-api.php

                        Duet software engineer

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          Jackal
                          last edited by 6 Mar 2017, 17:51

                          I believe they want push notification for unsupervised printing.

                          By the way, in case it is not obvious, my implementation depends on DWC using jQuery ajax to interact with Pushover.
                          That means you will need DWC running on a browser while printing to have push notification.

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            kraegar
                            last edited by 6 Mar 2017, 18:56

                            the current rr_status is good. If you added in the currently printing filename, if that's possible, to type 3, it should be easily doable to implement auto-generated timelapses whenever a file is printing.

                            Push notifications should be doable easily with this, and lighting up LED strips, etc should also work just fine.

                            (I can start a new thread if that's more appropriate)

                            Co-Creator of the RailcoreII CoreXY printer
                            https://www.thingiverse.com/thing:2407174

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              chrishamm administrators
                              last edited by 6 Mar 2017, 19:40

                              @Jackal:

                              That means you will need DWC running on a browser while printing to have push notification.

                              That's the point, you need to have one DWC instance running anyway to send push messages to that web service so I think it would be sufficient if DWC generated those messages on its own. DWC is capable of running on mobile devices as well and it could be expanded to show "native" push notifications, so I see no reason why we need to rely on a web-based service for the same purpose.

                              @kraegar:

                              the current rr_status is good. If you added in the currently printing filename, if that's possible, to type 3, it should be easily doable to implement auto-generated timelapses whenever a file is printing.

                              The way DWC gets the name of the file being printed is by checking the status character and if it changes to printing, it requests rr_fileinfo once which sends back the filename and some more info. If you're looking for further documentation about the status responses, check out this link: http://reprap.org/wiki/RepRap_Firmware_Status_responses

                              Duet software engineer

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                jmg123
                                last edited by 7 Mar 2017, 00:50

                                How about using mqtt? there is a reference implementation based on the lwip tcp/ip stack used in the duet. Could hook it up to all manner of local or cloud based things. Those who don't mind using the cloud could use it in conjunction with IFFT to get native notifications or turn lights/things on or off. For those who don't like cloud services, they can setup their own local broker and subscribers/clients and still get the benefit.

                                1 Reply Last reply Reply Quote 1
                                • undefined
                                  sdemmery
                                  last edited by 27 Apr 2017, 16:51

                                  @T3P3Tony:

                                  That's great work Jackal, hopefully Christian will have a look at it and include it in a future version

                                  Ive finally got my DuetWifi & new printer all built honestly Duet is just awesome if only Pushover were implemented it would be perfect for me. Appreciate the work Jackal has done but clearly that version of DWC is & has been left behind by the official release (loving FW 1.18 & DWC 1.15 BTW)

                                  So my question any progress on implementation into the official release? Seems it should be a simple case of implementing & testing Jackal's code right? Or am I over simplifying 🙂 Also appreciate it might not be top of the list, but if it were available i think many would move to use Pushover.

                                  Thanks]
                                  Stuart

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    someuniqname
                                    last edited by 27 Apr 2017, 17:12

                                    if i understand it right there are fees involved with pushover. so far i have been using octoprint's telegram messaging which works great not just as messaging but also to control octo+the printer

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      T3P3Tony administrators
                                      last edited by 28 Apr 2017, 08:55

                                      I think push notifications of some sort would be really useful, however pushover is probably not appropriate for most users

                                      1. it costs money to get an account as a user (after a 7 day trial)
                                      2. We would saturate the free message limits as a application very quickly, after that is costs money to send the messages:
                                        https://pushover.net/faq#overview-limits
                                        We might be able to get round #2 with some form of unique registration per Duet board but it does not seam worth exploring further.

                                      There are other options though:
                                      https://aws.amazon.com/sns/
                                      https://onesignal.com/
                                      https://pusher.com/

                                      Presumably all of these would need some form of app to be installed on your mobile device to make the most of it.

                                      www.duet3d.com

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        sdemmery
                                        last edited by 28 Apr 2017, 10:51

                                        @T3P3Tony:

                                        I think push notifications of some sort would be really useful, however pushover is probably not appropriate for most users

                                        1. it costs money to get an account as a user (after a 7 day trial)
                                        2. We would saturate the free message limits as a application very quickly, after that is costs money to send the messages:
                                          https://pushover.net/faq#overview-limits
                                          We might be able to get round #2 with some form of unique registration per Duet board but it does not seam worth exploring further.

                                        There are other options though:
                                        https://aws.amazon.com/sns/
                                        https://onesignal.com/
                                        https://pusher.com/

                                        Presumably all of these would need some form of app to be installed on your mobile device to make the most of it.

                                        I will be honest I can't totally remember what the deal was with Pushover & the charges but i paid around £5 one off charge and I have sent literally 1000s of notifications from my account all my home automation uses it too. I suspect this would have nothing to do with Duet, it would be down to the user to supply their unique API key from their account? Therefore no cost or implications to Duet. That said any sort of remote notification would be very helpful. Yes you would need the Fee (once you have a paid account) app installed but it is very good.

                                        Stuart

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          sdemmery
                                          last edited by 28 Apr 2017, 10:53

                                          Just for ref here are the costs from Pushovers site, I don't work for them by the way just found it a great service 🙂

                                          How much does Pushover cost?

                                          Short answer: After a 7-day free trial, it costs $4.99 USD once, per-platform (iOS, Android, Desktop), to use on as many of your own devices1 on that platform as you want. There are no monthly or yearly fees and you can receive as many notifications as you want.

                                          Long answer: As an end-user receiving push notifications, our iOS, Android, and Desktop clients are free to try for 7 days. After 7 days, you'll need to purchase a $4.99 USD license for each platform you wish to use it on. Once you've licensed a particular platform, you can use it on as many of your own devices that you personally use1 with no additional recurring fees. For example, once you make an in-app purchase in our iOS app on your iPhone, you can also use it on your iPad without having to pay again. If you also want to use it on your Android tablet, you would need to purchase an additional license for Android.

                                          As an application developer or service provider sending notifications through our API, you can send a certain number of notifications for free each month. See our question about message limitations for more information.

                                          For information on volume license pricing, please see this answer.

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