Giter Site home page Giter Site logo

octoprint-discordremote's People

Contributors

bchanudet avatar cameroncros avatar gcurtis79 avatar grantrules avatar hcooper avatar jneilliii avatar kijk2869 avatar lyricpants66133 avatar mmirate avatar nhulsch avatar octopusproteins avatar patronics avatar sgtkillx avatar shaynemk avatar stwend avatar timothy-b avatar totallytavi avatar vfrdirk avatar wchill avatar zinc-os avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

octoprint-discordremote's Issues

Set up instructions?

I have my bot token and channel ID in the plugin. For the base URL I used the local IP as the pi is not port forwarded. The gamepad icon is green and my bot says online in my discord channel but nothing is sent or received from either direction.
Is there any special permissions when setting the bot up so it can read/write in the channel

disregard the top commands that is the google assistant bot I was testing out.

image

Add Name of printer

Is it possible to have the printer name post in discord? I have 2 printers posting to same channel but doesnt say which is which etc

Add estimate time to 📢 Printing is at {progress}%

It would be great if there was a command for "how long its currently been printing" and "eta till print is finished"

Then this "📢 Printing is at {progress}%"

could be changed to

📢 Printing is at {progress}%
So far i've been printing for 2 hours.
Current ETA is 1 hour 65 minutes.

etc

ipgetter address blacklisted

Some of the sites used in ipgetter.py seem to be on a blacklist causing my router to send me emails and notifications every few minutes. I have disabled "Show External IP" but this does not seem to have any effect.

image

Bot will not respond to commands

I am probably missing something obvious, but I can't get the bot to respond to commands in discord. Everything else is working. I can see the bot on the channel, I can send commands from octoprint which shows up in Discord, but not send commands from discord itself.

Any ideas?

I see there have been issues raised on this in the past, but I couldn't find a solution there.

Update Version

Hello !
Could you please also update the setup.py version to match you release's one when you push new releases so after we update in octopi it stops notify us there is an update availble ?

Thx !

Get current status

Get the printer and if possible, the print status.
Info:

  • Bed temp
  • extruder temp
  • filament used?
  • current print
    • file name
    • progress
    • ETA?

Send Commands

Hi, can you please list the commands that can be sent to the bot through Discord? I've used the Telegram bot so I know to try /files and /print, but beyond that I'm lost. Thanks!

Mispelling

after doing /files the Estimated time printing is Extimated time.

Bot listens to all users, rather than specific users

Currently, the bot listens to anyone who is not the bot itself. This is a mild security problem, but is solvable by locking down the channel.

Change this so the printer owner can specify specific users who the bot will listen to.

Feautre request: add a minimum update interval configuration option.

Frequent 10% intermediate updates are not always helpful when printing smaller jobs. Proposing the addition of a "minimum update interval" configuration option. The system would then update on the X% if the interval between the current and last update were > the "minimum update interval". The start and end notification should be exempt from this configuration.

Having too many notifications potentially has the implication of users simply tuning out the update. By making this a configurable parameter, users are able to select the interval that works best for them.

Personally I use this reminder to periodically check on my prints.

Thanks.

Long tooltip breaks TouchUI navigation

The long tooltip of the navbar icon breaks the navigation on touchscreen devices with the touchui plugin.
Maybe change it to show only DiscordRemote.
screenshot_chrome_dev_20181103-114434

No bot shows up

Hi, i'm having some issues getting the bot to even show up on my channel.

i've made sure that the token id and channel id are correct.
as well I seem to be getting some errors in regards to the discord remote plugin, please see https://pastebin.com/e6GTnH1Q

Thanks!

Print Process: done

It seems since the latest update, the Print Process: done message is not being triggered.

v2.18

  • Added file and timelapse retrieval features - Thanks to OctopusProteins

Add CI

Add a free CI service

Bot disconnects

Hi, I just installed the plugins and everything was working fine until I started a print. I was waiting on my 10% notification and when came back a while later, the bot had disconnected from discord, I wasn’t able to send commands and the print was at 18%.

Any ideas? Thanks!

[Feature Request] Upload file

Will it ever be possible to upload a .gcode file to the discord channel with /upload and have it load into octoprint?

This would be amazing!

ip address

ip get set back to on when it updated to a new version when it sends this message I just woke up! What are we gonna print today?
Local IP: 172.17.62.26 External IP:xxx.xxx.xxx.xxx when i have it set to just local ip and /status keeps it state before the update

Discordbot problems

Hi, the part about creating a new discordbot and giving it the right rights to write something in the channel is poorly covered. I have added my bot to my discord channel and everything looks green and ok. It joins my discord channel but I am unable to get it to write anything in the channel. I have doublechecked all the channel settings and tried giving the bot all kinds of different bot permisions. Even tried admin =8, but it still doesnt want to write anything in the channel. Any tips to checking what could have gone wrong?
Here is the octopi error log
https://pastebin.com/EUJTBPbT
(for the record i have changed my discord bot token after pasting this log

Plugin using vast amounts of upstream bandwidth (10+ Mbps!) talking to Cloudflare (report-uri?) (when unconfigured?)

Hi,

I installed this plugin but didn't get around to configuring it yet, so it's been sat idle for a few weeks, I guess. Today I checked out the usage graphs for my ISP and noticed that since around midday (BST) on Saturday, we've been using a huge amount of upstream bandwidth - on the order of 50 GiB/day.

I tracked it down to my Octoprint Pi, down to Octoprint itself, and after running a packet sniffer on my router, which returned packets referencing discordapp.com, I traced it to this plugin. Restarting Octoprint saw the data spam continue, albeit at a much lower rate (judging by the graphs for my ISP, the data stream gradually increases over the course of 60-90 minutes). When I disabled this plugin and restarted Octoprint, the data spam ceased entirely, with just a couple of kbps background traffic remaining.

Graph from Saturday, the red line is our uploads, showing around 5 Mbps, but note that we have two bonded VDSL lines, so seeing 5 Mbps on one line means that there's also 5 Mbps on the other line for a total of 10 Mbps:
A&A ISP CQM graph for Saturday 23rd June showing upstream bandwidth usage being almost non-existent until around 12:30pm at which point it gradually climbs, over the course of a few hours, up to about 5 Mbps

Graph from Sunday (Monday, Tuesday and Wednesday look much the same):
A&A ISP CQM graph for Sunday 24th June showing upstream bandwidth usage being about constant at around 5 Mbps all day

The traffic was all going to a Cloudflare IP address, 104.16.59.5.

Upon checking my Octoprint logs folder I found that my octoprint.log file was 36 MiB, but previous days' logs were more than 200 MiB.

The most recent octoprint.log almost entirely consists of these lines repeated forever:

2018-06-27 12:24:02,508 - octoprint.plugins.discordremote - INFO - Message queued 2
2018-06-27 12:24:04,162 - octoprint.plugins.discordremote - ERROR - <Response [404]>: {"code": 0, "message": "404: Not Found"} - {'Expect-CT': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'Content-Length': '40', 'Via': '1.1 google', 'Set-Cookie': '__cfduid=dc0ac58b2ced576345210d7d85df498be1530098643; expires=Thu, 27-Jun-19 11:24:03 GMT; path=/; domain=.discordapp.com; HttpOnly', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'Server': 'cloudflare', 'Connection': 'keep-alive', 'Date': 'Wed, 27 Jun 2018 11:24:04 GMT', 'CF-RAY': '43178b876ae36b55-LHR', 'Alt-Svc': 'clear', 'Content-Type': 'application/json'}

However the older log files (Saturday and earlier) also include some HTML alongside the report-uri line:

<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>


<title>discordapp.com | 502: Bad gateway</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->
<style type="text/css">body{margin:0;padding:0}</style>




</head>
<body>
<div id="cf-wrapper">



    <div id="cf-error-details" class="cf-error-details-wrapper">
        <div class="cf-wrapper cf-error-overview">
            <h1>

              <span class="cf-error-type">Error</span>
              <span class="cf-error-code">502</span>
              <small class="heading-ray-id">Ray ID: 42e1069a3c146ba3 &bull; 2018-06-20 20:36:07 UTC</small>
            </h1>
            <h2 class="cf-subheadline">Bad gateway</h2>
        </div><!-- /.error-overview -->

        <div class="cf-section cf-highlight cf-status-display">
            <div class="cf-wrapper">
                <div class="cf-columns cols-3">

<div id="cf-browser-status" class="cf-column cf-status-item cf-browser-status ">
  <div class="cf-icon-error-container">
    <i class="cf-icon cf-icon-browser"></i>
    <i class="cf-icon-status cf-icon-ok"></i>
  </div>
  <span class="cf-status-desc">You</span>
  <h3 class="cf-status-name">Browser</h3>
  <span class="cf-status-label">Working</span>
</div>

<div id="cf-cloudflare-status" class="cf-column cf-status-item cf-cloudflare-status ">
  <div class="cf-icon-error-container">
    <i class="cf-icon cf-icon-cloud"></i>
    <i class="cf-icon-status cf-icon-ok"></i>
  </div>
  <span class="cf-status-desc">London</span>
  <h3 class="cf-status-name">Cloudflare</h3>
  <span class="cf-status-label">Working</span>
</div>

<div id="cf-host-status" class="cf-column cf-status-item cf-host-status cf-error-source">
  <div class="cf-icon-error-container">
    <i class="cf-icon cf-icon-server"></i>
    <i class="cf-icon-status cf-icon-error"></i>
  </div>
  <span class="cf-status-desc">discordapp.com</span>
  <h3 class="cf-status-name">Host</h3>
  <span class="cf-status-label">Error</span>
</div>

                </div>

            </div>
        </div><!-- /.status-display -->

        <div class="cf-section cf-wrapper">
            <div class="cf-columns two">
                <div class="cf-column">
                    <h2>What happened?</h2>
                    <p>The web server reported a bad gateway error.</p>
                </div>

                <div class="cf-column">
                    <h2>What can I do?</h2>
                    <p>Please try again in a few minutes.</p>
                </div>
            </div>

        </div><!-- /.section -->

        <div class="cf-error-footer cf-wrapper">
  <p>
    <span class="cf-footer-item">Cloudflare Ray ID: <strong>42e1069a3c146ba3</strong></span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span>Your IP</span>: 90.155.91.100</span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span>Performance &amp; security by</span> <a href="https://www.cloudflare.com/5xx-error-landing?utm_source=error_footer" id="brand_link" target="_blank">Cloudflare</a></span>

  </p>
</div><!-- /.error-footer -->


    </div><!-- /#cf-error-details -->
</div><!-- /#cf-wrapper -->
</body>
</html>
 - {'Expect-CT': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'Content-Length': '4093', 'Set-Cookie': '__cfduid=d86c5c4d1c8933a36c592d26952c5991e1529526967; expires=Thu, 20-Jun-19 20:36:07 GMT; path=/; domain=.discordapp.com; HttpOnly, cf_use_ob=0; expires=Wed, 20-Jun-18 20:36:37 GMT; path=/', 'Expires': 'Thu, 01 Jan 1970 00:00:01 GMT', 'Server': 'cloudflare', 'Connection': 'keep-alive', 'Pragma': 'no-cache', 'Cache-Control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'Date': 'Wed, 20 Jun 2018 20:36:07 GMT', 'X-Frame-Options': 'SAMEORIGIN', 'Content-Type': 'text/html; charset=UTF-8', 'CF-RAY': '42e1069a3c146ba3-LHR'}

My guess is that this plugin was attempting to do something, accidentally ended up being very spammy to someone (possibly the Report-URI service), and then that person blocked my Pi's IP address at Saturday lunchtime (the guy who runs Report-URI lives in the UK, so that's a perfectly reasonable time for him to be dealing with things like that), and then this plugin wasn't expecting the Report URI requests to 404 and just started spamming those requests, somehow doing so at increasing frequency - every 1-2 seconds judging by this octoprint.log!

But I suspect that the main issue will be that there is no logic to keep the plugin in "idle"/standby mode if it's not configured :)

I'm happy to share my log files privately, along with the packet dumps I collected, if that helps.

And hopefully this hasn't resulted in my entire IP address range being blocked by Report-URI, as that was a service I was planning to use at some point. It won't matter too much if only the Raspberry Pi's IP address was blocked, but if the block extends to my whole IP range I won't be happy =/

Thanks :)

Printing at 100% message

Is there a way to exclude the 100% message, but still get the incremental messages? I like having the "Print complete" message, but when getting status updates every X% as well as having the complete message, I get double pinged upon completion.

Percent complete off

Haven't been printing with octoprint lately because I was having some errors with it, but started it up again earlier this evening. I noticed that discordremote's reporting % complete wasn't lining up with octoprint's % complete shown (example i got the 70% message while octoprint was showing 87%)

/status commands not working

running octoprint on puppy linux 14.04 thar. Everything appears to be set up correctly both on octoprint and discord text channel, all commands work apart from /status, tried from discord and from octoprint page.

[Feature] Pause for [x] Seconds before Snapshot

Can we have a way to wait for x seconds before taking a snapshot? This I think would mostly be for the "done" photo. My photos are being taken immediately after the 100% is hit, which means my extruder may be blocking part of the print and so I can't see a good snapshot of the part. Just a thought. Thanks!

Support to change command prefix

Here's another enhancement idea:
Let the user change what character they want in front of the command. So they could change to
.help, or even ./help

@cameroncros If you want this setting, I have the code already and I'll make a PR.

Progress my time instead of %

can we have the bot send the message at a determined time interval? like, i dont want 10 snapshots of a 20min job, but i dont want 2 of a 20h job
so using it by time (for example, every 30 mins) so it sends a message after the specified interval has passed

it would be amazing to get a notification every 30mins (or whatever you set it to) on discord, i monitor my prints while away with it and its very useful, Amazing plugin btw!!

Feature suggestion: Turn of Bot

Could you add the possibility to turn of the bot with a simple button. so it doesn't spam you when you are for exampe at Home were you don,t really need it. It would be good if you can toggle this even mid print

Capability for custom commands

This would be an excellent feature to add. For example, one could add a custom command "/light" and use their RPI to toggle a lamp. I would be willing to help add this, I just need to know what this would entail with regards to how the plugin is set up. Maybe the command could trigger a python script, etc.

Having issues installing.

I have tried restarting and rebooting but I cannot get the plugin to install.
Installation gets to "Running setup.py install for Pillow: started" and then freezes. After a little while I get this error message: Error!
Could not install plugin, unknown error, please consult octoprint.log for details

I have attached my log.
plugin_pluginmanager_console (1).log
octoprint (3).log

Thanks for the help. I am trying to get my printer to work with google assistant. With IFTTT I can post to a discord channel so when I get this up and running I should be able to control my printer with my google home and phone

Feature request: custom commands

Hi, was wondering it is possible to run customs commands that would send a bash command for raspberry Pi users to shut off the printer or what ever relays they have?

[request] message test

a button to ping the discord bot so i dont have to remove one charter to reload the bots connection

progress messages no longer being reported

I haven't been getting progress report messages for the past couple days. The 100% and complete messages are coming through, just not the incremental steps. this very well could be because i'm using a RC build, but wanted to bring it to your attention.

Notifications with image always called “snapshot.png”

In Octorant (that this plugin is based on/inspired by), whenever you get a notification (including those with snapshots) the notification actually displays the message of the notification, such as the percentage of progress the printer has made. However with this plugin whenever the message includes an image the notification (on the Discord iOS app anyway) just says “snapshot.png”, not the actual text of the status message.

Status Message separate from snapshot

I know a while back in issue #51 you changed it so that it would send multiple messages, one with just the status update, and one with the picture. Would it be possible to have an option that you could toggle between having the old way and the current way? I personally preferred getting one message over two, and the current fix always has the picture second, so my notification still shows "snapshot.png" instead of the status.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.