Spoolman Integration

@b4r7 The latest version supports calling a service which updates a particular spool via spoolman api. Hope this is what you can use for your project :slight_smile:

Thank you for your quick reply! Assuming that I don’t have SSL on a local network with my HA being at 192.168.1.xx:8123 and I used HACS to install Spoolman, when adding an integration, what would the URL be? Would it be the HA IP? This is as basic a setup as can be. It’s HTTP for sure. I think I’m losing my mind here or I’m just missing something extraordinarily simple. Ughhhh.

It seems that there is a misunderstanding. What is your url to access the spoolman dashboard where all your filaments and spools are shown?

You can’t use HACS to install spoolman. You only can use HACS to install my integration but not Spoolman itself.

Well that would explain it! Spoolman needs to be installed as a service on some device and then be connected through the HA connector! I mistakenly thought that an instance of Spoolman itself was being created on the HA platform. Thank you so much for your time and have a wonderful day. 40 years as an engineer and I forgot how to RTFM!

1 Like

Sorry if this is a noob question, but is it possible to calculate filament consumption on Home Assistant with Bambu Lab, or does that only work with Klipper/OctoPrint?

I guess not because Klipper sends the usage to Spoolman back. Bambu has to open some things in their ecosystem to enable this.

How often does the HA Integration update spool usage and new spools? Seems like it is taking days to update at times and I need to reload the addin to get it to refresh.

Thanks for a great addon.

@crzykidd The integration refreshes the data from spoolman by the interval which is set in the initial config

1 Like

Is there a card that would allow me to quickly move a filament from one storage location to another? I am looking for a fast method. Currently I have all my filament in storage bins and move them from the bin to my 5 spool drybox for printing with the MK4 MMU3. I would like to just select the spool and select what location to move it to (static drop down list) that would then call the service to update location in spoolman. For the life of me I can’t find a simple way to do that in HA.

I have a service to do that but thats pretty unconvinient for this use case. I love the idea @crzykidd and I’ve created a FR for that particular case on my repo.

1 Like

Yes I can do it with the service, but struggling with an easy way to do that in HA. I think it will require a lovelace card or some sort of template.

1 Like

Hey @Disane87 , I just found your integration and set it up. I’m really digging spoolman and I love Home Assistant so this is the perfect marriage! I have an Enraged Rabbit Carrot Feeder (ERCF or more simply a single extruder, multi-filament changer). I think it’s causing some problems with the integration. The guy who writes the software for the ERCF (MoggieUK) created a mechanism to automatically update the spoolman entry on the printer when the filaments get swapped during a print. There are 8 “tools” on my printer because I have an 8-way ERCF and I’m wondering if it is working as intended.

My spoolman setup (currently) looks like this:

  • The top 8 spools are loaded into each of the klipper tools (currently ready on the ERCF) – there are locations for each one of those for each buffer on the ERCF.
  • You can see that spool_id #14 has used dates because I had it loaded but unloaded it for a different spool, recently.
  • The bottom two (and many others below those) are unloaded and have not yet been used with spoolman.

After installing the integration it created devices and areas for each one of the locations in spoolman along with a “spoolman” and “Unknown” device:

  • When I look at the first “spoolman” device, it has the spool_id #14 - glow in the dark green.
  • When I look at the second “Unknown” device, it lists all the spools that have not yet been used with spoolman.
  • When I look at each remaining klipper tool device it contains the spool loaded into that tool.

Is this how it is supposed to work?

I tried to use the auto-entities-card+mushroom-template-card example on your GitHub page to show the filaments in a HA card but it doesn’t seem to be working with my setup, I just get an empty card. Unfortunately, I haven’t ever used the mushroom cards before but it is installed.

Do you know how I can go about debugging this or recommendations on getting it to work?

Thank you!

Thank you for your kind words @SpikeyGG! Yeah that seem to be working as intended since every location in Spoolman will create a device in HA with spools as entities. The intention of this was to recreate the physical locations of the spools (like a long term storage or drybox). Unfortunately this practice has some flaws and changing a location in spoolman needs a reload of the integration. In one of the next release I will change that.

The card itself should work because its pretty generic and has no other sideffects only the integration name. Did you restart HA after installing mushroom?

Thanks for the confirmation. That update sounds great, looking forward to that.

I did restart HA and it didn’t seem to change anything. I did notice that if I cut the whole yaml down to just:

type: custom:mushroom-template-card
vertical: false
icon_color: "#{{ state_attr(entity, 'filament_color_hex') }}"
icon: mdi:printer-3d-nozzle
badge_icon: |
  {% if state_attr(entity, 'archived') == true %}
    mdi:archive
  {% elif state_attr(entity, 'klipper_active_spool') == true %}
    mdi:check-circle
  {% endif %}
badge_color: |
  {% if state_attr(entity, 'archived') == true %}
    orange
  {% elif state_attr(entity, 'klipper_active_spool') == true %}
    green
  {% else %}
    default_color
  {% endif %}
primary: |
  {% set location = state_attr(entity, 'location') %} {% if location %}
    {{ state_attr(entity, 'filament_name') }} ({{ location }})
  {% else %}
    {{ state_attr(entity, 'filament_name') }}
  {% endif %}
secondary: "{{ (state_attr(entity, 'remaining_weight') | float)  | round(2) }} g"
tap_action:
  action: more-info

It shows a single nozzle icon on the right but also displays this warning/error at the bottom of the yaml block. If I try to remove the vertical: false entry, it just removes the warning but changes nothing else. :confused:

I’m not sure where to go from here for further debug, since there doesn’t seem to be any feedback mechanism about what is happening.

Thank you for tracking down this issue :slight_smile: it seems you haven’t installed auto-entities-card like I stated in the docs:

You can use the default entities card for this: Or auto-entities-card for getting all entities by this integration dynamically: GitHub - thomasloven/lovelace-auto-entities: 🔹Automatically populate the entities-list of lovelace cards
And a mushroom-template-card card for example. lovelace-mushroom/docs/cards/template.md at 0460e99fed8fd7c203d679c6b7acd8fd5f683fd2 · piitaya/lovelace-mushroom · GitHub
A simple card utilizing mushroom-template-card and auto-entities to dynamically show all spools could look like this:

hah, you would think that but I’ve been using the auto-entities-card for months with other things. Anyway, I don’t know why but I just looked at it again and now it’s working. So, never mind this request I guess… chalk it up to weird browser cache problems, maybe?

Thanks for putting together the integration, it’s pretty sweet seeing these things from HA!

1 Like

@Disane87, question for you. Because of the ERCF control in Spoolman there are additional attributes attached to the spool:
image

They are Extra printer name and Extra mmu gate map. I tried to do something like this:

      sort:
        method: attribute
        attribute: location
        reverse: false
      attributes:
        archived: false
        extra_mmu_gate_map: -1
      options:
        type: custom:mushroom-template-card

but it didn’t work. Do you know if there is some way to use these new attributes in the lovelace filters?

Ah, I got it. I use the location attribute because it’s actually set by the ERCF software too.

Success!

1 Like

I guess that the params are typed correctly but you can debug that in the developer tab of home assistant and have a look into the state tab and inspect a spool in example. But generally it should work, since I use all stuff coming from the api and cast it into the attributes.

Glad it worked now on you end! Have some fun with the integration!

Did you build the ERCF by yourself or did you purchased a kit? I‘m actually planning to build one but I’m pretty concerned about the process and the time which I need to spend on that particular project. Yeah 3D printing is a time and money consuming hobby but at the moment I only want some „working out of the box“ stuff like Bambu AMS. What was your experience by getting the ERCF together with Klipper and such?

1 Like