Notification via Pushover or other service
-
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)
-
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.
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
-
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.
-
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 -
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
-
I think push notifications of some sort would be really useful, however pushover is probably not appropriate for most users
- it costs money to get an account as a user (after a 7 day trial)
- 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 think push notifications of some sort would be really useful, however pushover is probably not appropriate for most users
- it costs money to get an account as a user (after a 7 day trial)
- 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
-
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.
-
I just set up my duet and I'm planning on setting up a Duet Push Notification system.
So far my plan is to handle everything externally by using unused duet pins connected to an ESP8266 or ESP32 board which will send the push notifications via SimplePush service ($5 one time fee)If anyone else is interested in this setup let me know and I will post back once things are up and running well.
My aim is to push the following notifications: Job End, Errors (still working this one out) and possibly job percentage in 10% increments. Also I'll see if its possible to add M117 commands as push notifications.
-
@McAdam When I was thinking about controlling an RGB LED strip with the Duet I wanted to see if I can connect an arduino to the PanelDue-port (as I don't have one) and use the serial port that seems to be exposed there. Didn't get around to it, though. Looking through the code it seems that M117 messages will be sent through that serial line as JSON, if it detects a device on that port. The presence seems to be detected by receiving a command through that port.
-
Did this end up going anywhere? I would find it useful to be notified (push notification, text message, or email) if the printer pauses for any reason (filament detector, heater fault, etc).
I don't print fully unattended but am often in a different part of the office, away from the printer and sometimes away from computers.
-
FYI: I implemented something like this for the "Pushed" service, which is free: a small Python script running on an Raspberry Pi Zero on the same network.
I guess one could also run this with MicroPython on an even smaller microcontroller or maybe integrate it into the esp8266 or similar…
https://gist.github.com/Kriechi/63c29ed4ad860744107ee4a1b5cf10a2If anybody want to collaborate & extend it, I can make it into repository…
-
Something like the OctoPrint Telegram plug-in would be great.
https://github.com/fabianonline/OctoPrint-Telegram/blob/stable/README.md
-
is polling rr_status from a python script safe? The documentation mentions this:
Since RepRapFirmware can only process one HTTP request at a time (excluding rr_fileinfo and rr_upload on certain platforms), DuetWebControl should attempt to avoid parallel requests
but it seems like i'm connecting not to the reprapfirmware but to the duet web control which must pass through the call and return the results?
-
There is no such thing as "duet web control" that is processing requests.
There is only your client (browser) and RepRapFirmware.DWC is running in your browser - and does exactly what you said: it is constantly polling RRF for new information. So using it in a python script is as safe as using DWC in your browser. By default DWC polls every 0.25sec or so - which IMO is quite high - without interfering with your regular printing stuff. All in all pretty safe.
-
so doing it from a browser and doing it from a python script won't result in parallel requests? or will a parallel request just be delayed until rrf can respond?
-
@kd:
is polling rr_status from a python script safe? The documentation mentions this:
Since RepRapFirmware can only process one HTTP request at a time (excluding rr_fileinfo and rr_upload on certain platforms), DuetWebControl should attempt to avoid parallel requests
but it seems like i'm connecting not to the reprapfirmware but to the duet web control which must pass through the call and return the results?
That's out of date. RRF on the Duet WiFi and Duet Ethernet can process multiple http requests concurrently.
-
So as an interim measure, I set up a script to text me (via email) when the status of the printer changes. First, set up mail from a command line:
http://codana.me/2014/11/23/sending-gmail-from-os-x-yosemite-terminal/
I made a new gmail account for this since the password gets stored in plaintext on your computer.
Then, set up a bash script. Currently running on my computer but I'll move this to an always on Raspberry Pi soon.
#!/bin/bash PREVSTATUS=$(curl -s http://printername.local/rr_status?type=1 | awk '{print substr($0,12,1)}') while [ 1 ] do STATUS=$(curl -s http://printername.local/rr_status?type=1 | awk '{print substr($0,12,1)}') if [ $STATUS != $PREVSTATUS ] then echo $STATUS | mail -s "Printer Status Changed" email@address.com fi PREVSTATUS=$STATUS done
email@address.com is used to send a text message to my phone, most mobile carriers allow you to send an email to produce a text, a quick google of your wireless carrier and "email to text" should turn up the specific email address in your case.
Be sure to update "printername" as well.
Then I get a single character text message, I'm really only concerned with "P" and "S" but here they all are:
case 'F': // Flashing new firmware setStatusLabel("Updating", "success"); break; case 'H': // Halted setStatusLabel("Halted", "danger"); break; case 'D': // Pausing / Decelerating setStatusLabel("Pausing", "warning"); printing = true; paused = true; break; case 'S': // Paused / Stopped setStatusLabel("Paused", "info"); printing = true; paused = true; break; case 'R': // Resuming setStatusLabel("Resuming", "warning"); printing = true; paused = true; break; case 'P': // Printing setStatusLabel("Printing", "success"); printing = true; break; case 'M': // Simulating setStatusLabel("Simulating", "success"); printing = true; break; case 'B': // Busy setStatusLabel("Busy", "warning"); break; case 'T': // Changing tool printing = isPrinting; setStatusLabel("Changing Tool", "primary"); break; case 'I': // Idle setStatusLabel("Idle", "default"); break;
I'll probably add to the bash script to only text me when the printer is stopped, but for now I'll get a text anytime the status changes, provided that it doesn't change faster than the curl update rate (about 5 seconds).
Quick and dirty, probably better ways out there but this is free and worked for me!
-
Pushbullet is another option that is free
https://docs.pushbullet.com/ -
would it be possible to have some gcodes that hit the url required to submit a message directly from the duet?
I'm particularly after a way to send a notification to my phone at the end of a print.