I’ve been working on adding websocket and subscriptions to my idex tools application. Today I added the toolhead object but got unexpected results. I’ve had no issues with subscribing to other printer objects so far.
According to Klipper docs these are the possible attributes returned for that object:
position
extruder
homed_axes
axis_minimum
axis_maximum
max_velocity
max_accel
minimum_cruise_ratio
square_corner_velocity
Oddly the only thing I have seen returned is estimated_print_time which isn’t even listed. I’ve been doing a generic subscribe passing None for wanted attributes. I also tried adding the attributes I want as a list. All return the same thing, just a flood of estimated_print_time for toolhead.
While I could probably continually query a subscription model is so much easier in a QT app since I can emit a signal when I need to notify a plugin in the application that a state has changed.
Edit: So it seems toolhead object is more focused on when a print is ongoing which was a misunderstanding on my part. I still have not seen the homed state passed which I thought would be sent when homing was completed.