Comments (7)
Hi,
has this been using the test of the webhook or after a real print / dry-run? For test mode the filename is set to "None" - even if you have a file selected before.
Regards Jรถrg
from octoprint-webhooks.
No, this is for real prints. In fact, when I do a test webhook event I don't get "None" - I get the previously selected print name
from octoprint-webhooks.
@2blane Any insight on this?
from octoprint-webhooks.
The information isn't always provided. This plugin grabs as much info as it can from OctoPrint but a lot of fields can be blank depending on if OctoPrint gives us the data. If this is a recurring problem I will reopen, but for now I'd suggest try uploading and starting your job in different ways if possible to see if you can get the name field to fill out.
from octoprint-webhooks.
The name field is fine when it starts printing (I have another webhook for that) - it's just when it finishes printing that it doesn't have the name. So I'm not sure how a different method of uploading will fix this (in fact - I've tried multiple different ways of uploading - even just reprinting from OctoPrint's history all with the "None" name result in the print finished event)
from octoprint-webhooks.
It's been a long time (almost exactly a year) but this is definitely a recurring problem. It happens every time I print and I haven't been able to figure out an easy solution. Recently I've had more time and I've been working on a PR for #17 and may have time to look into this.
In the meantime, it seems that when the Print Done event is fired, the "job" payload is all null:
{
"file": {
"name": null,
"path": null,
"display": null,
"origin": null,
"size": null,
"date": null
},
"estimatedPrintTime": null,
"averagePrintTime": null,
"lastPrintTime": null,
"filament": null,
"user": null
}
Any idea why this might be? Is anyone else seeing the same?
As a workaround it seems like I might be able to use @extra.name
so I'll test that out
from octoprint-webhooks.
A little bit more digging:
It seems that @job
has many null (or None) values because @job
comes from self._printer.get_current_data()
. At the time of the PrintDone event, that returns the values in the comment above. However, the PrintDone event's payload (@extra
) has the info needed.
I would suggest that either:
- the
get_job_information
method has some better fallback for getting this information - the payload of the PrintDone event is used for
@job
instead
Thoughts?
from octoprint-webhooks.
Related Issues (20)
- Content Type HOT 1
- Ability to subscribe to custom events HOT 3
- Modified settings not saved when saving general setting HOT 7
- API error invalid url no schema supplied HOT 2
- No Webhook when Print Resumed HOT 1
- Custom headers ignored HOT 2
- basic auth using custom header not working HOT 6
- This plugin regularly breaks other OctoPrint settings HOT 3
- Failure during installation of the plugin on.
- Send Test Webhook failure HOT 3
- unable to configure webhook HOT 1
- Ability to post as Form data? HOT 1
- Webhook after cooldown
- Messages are only sending Topic and Message even when all DATA params are set
- Is there a way to add tabs/buttons to the main UI?
- Request support for PATCH method HOT 1
- "Invalid JSON for DATA setting" HOT 2
- Plugin not loading due to PIL import error (Docker image)
- !!! - PLUGIN HAS MOVED - !!!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octoprint-webhooks.