Comments (17)
Any news on this bug?
from octoprint-mqtt.
I have my hands full with core OctoPrint development and haven't had a chance to look into this yet.
from octoprint-mqtt.
i'm still getting this error flooding my log.
2018-10-11 17:42:22,490 - octoprint.printer.standard - ERROR - Exception while adding temperature data point to callback <mqtt.MqttPlugin object at 0xb307b030>
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/standard.py", line 167, in _sendAddTemperatureCallbacks
callback.on_printer_add_temperature(data)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_mqtt/init.py", line 204, in on_printer_add_temperature
or abs(value["actual"] - self.lastTemp[key]["actual"]) >= threshold
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
just curious if this is serious or not. my octoprint crashes every once in a while (week-two) and it did once in mid print and this flood of errors is making it hard to find anything else
from octoprint-mqtt.
@SoundGuy, I just checked this on my OctoPrint 1.3.9 running on OctoPi 0.14.0 and am not getting this temperature error. Not sure if this is a conflict with IFTT or maybe something was fixed between version 1.3.8 and 1.3.9 of OctoPrint that resolves this issue.
from octoprint-mqtt.
from octoprint-mqtt.
Do you get the same noise in your log with the ifttt plugin disabled?
from octoprint-mqtt.
Hi,
I'm getting the same error messages as SoundGuy on my Octoprint server with Klipper firmware on the connected printer. From what I can see, the reason for the error is the following:
-
As background information: Klipper firmware is divided in two parts: One part running on the same raspberry host as octoprint, the other part running on the MCU of the printer. Octoprint connects to the host-software part, not the MCU.
-
When the Klipper host software starts, the MCU might still be offline (i.e. raspberry powered up, printer powered down). In that case. when Octoprint send an M105 to get the temperature information, klipper responds with an "ok T:0". Note: No bed information is in that initial response.
-
Later on the printer is powered up and the MCU is properly connected to the host software. If Octoprint sends an M105 now, Klipper will properly respond with "ok T0:23.2 /0.0 B:24.3 /0.0", i.e. Bed information is included now
-
It looks to me like the Octoprint MQTT plugin cannot handle this case that the Bed (or any other additional temperature sensor) is added in the M105 responses over the lifetime of a connection to a printer. The calculation of the temperature-delta will fail with the given error message.
from octoprint-mqtt.
If that's the case I wonder if this issue might be a larger problem related to the temperature polling of OctoPrint itself. The MQTT plugin just hooks into the function in order to publish the information. During this time are there issues with the temp graph? @SoundGuy are you also using Klipper firmware?
from octoprint-mqtt.
@jneilliii : The temperature graph handles it properly: After "host-only" startup the graph shows only the tool temperature (off). Once the MCU goes online, the bed temperature line appears.
from octoprint-mqtt.
On it. Aside from this error, there's a really subtle error that I didn't see at first:
if key not in self.lastTemp or \
or abs(value["actual"] - self.lastTemp[key]["actual"]) >= threshold \
or value["target"] != self.lastTemp[key]["target"]:
4 internet points to whoever spots it :)
from octoprint-mqtt.
doh- actually I did that when I was doing some debugging, that's not the committed version.
from octoprint-mqtt.
Double or?
from octoprint-mqtt.
Yeah, fun times eh?
I have the fix committed, I'll make a PR after 0.8 ships.
from octoprint-mqtt.
Let's merge the fix into 0.8, less prs that way?
from octoprint-mqtt.
I'd rather roll this into 0.8.1 with other minor fixes. That way we can get the other stuff out the door first.
(can you tell I do devops/release management for a career?)
from octoprint-mqtt.
No problem. I barely understand git and have never worked with other programmers on a team, so if you see me doing something wrong on this project, or you guys want to manage it differently I'm all ears. This one is a little different because it was left over from before, I just made minor tweaks directly to devel branch. Moving forward I guess we should come up with a development workflow, let me know your thoughts.
from octoprint-mqtt.
@tedder: as far as I can see, there's a little copy-paste-error in your commit, see 9fc3e60#r31176383
With that proposed change, your coding is working fine for me, the exception is gone and temperatures are properly reported via mqtt.
btw: thanks for very quick resolution!! :-D
from octoprint-mqtt.
Related Issues (20)
- [Feature Request] Be able to change bed/tools target temperature HOT 1
- Total and Current layer Numer
- Bug - Slicing /progress/slicing
- [Feature Request] Publish current layer + total layers to mqtt HOT 7
- No MQTT connected event message sent when Octoprint autoconnects to printer HOT 2
- OctoPrint disconnects immediately from MQTT broker
- How to setup multiple printers? HOT 4
- Error while calling MQTT plugin HOT 1
- MK3s "paused for user" due to collision HOT 2
- MQTT plugin doesn't show an error when TLS certificate validation fails
- HomeAssistant. Sensors of print time is "unknown".
- Home assistant plugin- Unknown Print time left HOT 11
- Naming warnings for MQTT when using with Home Assistant HOT 2
- cant find topic for filament scale HOT 2
- Your plugin is causing errors in Home Assistant, regarding device/ entity naming schema. HOT 2
- Plugin fails to connect to Mosquitto HOT 1
- Feature Request: Suppress specific topics HOT 2
- Entities Unavailable in Home Assistant HOT 2
- Since the last update I see constatly this in logs and don't get any updates via MQTT HOT 4
- Plugin is incompatible with paho-mqtt 2 HOT 1
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-mqtt.