Benachrichtigungen
Alles löschen

REST API for XL tools?  

  RSS
luma
 luma
(@luma)
Mitglied
REST API for XL tools?

I'm wading through what I think is the REST API spec and trying to figure out how to get information about the currently selected tool on a 5XL and nothing I'm hitting seems to have that detail.  What would be even better would be a way to know which tools are selected for a given job and some way to work out what sort of filament is being used for each.

Anyone have any idea how one might get this done?

Veröffentlicht : 14/03/2025 7:12 pm
Jav.BR gefällt das
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE: REST API for XL tools?

I don't have XL but I think it may not be available via web API.

You have higher chances of getting it via syslog metrics under 'active_extruder' number.

See https://github.com/nvtkaszpir/3d-print/tree/main/prusa3d-metrics-list

See my GitHub and printables.com for some 3d stuff that you may like.

Veröffentlicht : 15/03/2025 9:05 am
luma gefällt das
luma
 luma
(@luma)
Mitglied
Themenstarter answered:
RE: REST API for XL tools?

I gotta be honest - I'm not quite sure what to do with that.  When you say "syslog" I'm thinking of a remote logging facility - is that a thing with these printers?

Veröffentlicht : 15/03/2025 3:04 pm
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE:

Official docs says how to do it https://github.com/prusa3d/Prusa-Firmware-Buddy/blob/master/doc/metrics.md and yeah, it's not that easy.

In short it would require to set up syslog listening server. 
The good news is that they provide docker-compose file which can set up listening syslog server within minutes.

Then you need to instruct the printer to send syslog messages to that server.
It consists of adding gcode commands to enable logging to remote host and what metrics to send - in for example start gcode section.

See my GitHub and printables.com for some 3d stuff that you may like.

Veröffentlicht : 15/03/2025 3:48 pm
luma gefällt das
luma
 luma
(@luma)
Mitglied
Themenstarter answered:
RE:

Roger that - super cool that syslog export is built straight into the firmware! I have a syslog host here but I'm trying to get this all working in Home Assistant which doesn't have any way to surface that info in realtime.  I'll keep hunting, thanks for the help!

 

edit: maybe have a hacky solution - syslog-ng supports export to MQTT which I can then pickup in HA.  Going to take some hacking but workable maybe?

It'd be a lot easier if this info was available via REST 😀

Diese r Beitrag wurde geändert Vor 1 day von luma
Veröffentlicht : 15/03/2025 4:09 pm
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE:

Hm maybe syslog-ng bridge to mqtt could work, haven't tried. I would rather try to do some metrics system -> HA bridge via queries executed once per second or minute maybe, no need to flood HA with printer metrics every 100ms...

Diese r Beitrag wurde geändert Vor 1 day von _KaszpiR_

See my GitHub and printables.com for some 3d stuff that you may like.

Veröffentlicht : 15/03/2025 4:36 pm
Teilen: