Spoolman Updater – Automate Filament Tracking

Good morning,

I can’t find a solution to this…
Spoolman / Spoolman-Updater are running on the same PC / HomeAssistant on another.

Spoolman itself is filled with all filaments and spools, manually everything works.
Bambu Lab integration (2.2.10) with P1S also runing fine on the HA

so I installed Spoolman Updater according to the installation instructions, replace the printer_id and IPs/URLs

but after a print, there was no update of Spoolman.

If I check the sensors via developer tools, everything seems correct, I also tried a manual (via Actions) rest_command

That manual update went through and updated my inventory
my print that finished three hours later was not updated, but my canceled print this morning was updated.

And I am curios about the website… where I should be able to select spools…

If i call the URL http://192.168.3.78:8088/Spools … it shows me a JSON of all my spools, if I call the swagger-page => it shows me the API-docs…

Please give me some advices how to fix my problems… it seems to be a great updater!

Thx in advance.

Bjoern

I was able to solve my own problems myself => which in the end was quite simple…

Docker containers, in their default configuration, do not perform DNS resolution or use their own DNS (if no DNS is provided via the Docker network).

Therefore,
-e APPLICATION__HOMEASSISTANT__URL=http://homeassistant.local:8123
cannot be resolved, no connection to HomeAssistant is established, and the available spools/trays/sensors cannot be retrieved.

After I entered the IP address there and restarted the container, I was able to see the website correctly and am now able to select my spools…

Now I just have to wait for my print to finish :wink:

PS:
My P1S from August 2025 doesn’t send a “finished” status via HA (BambuLab integration), but instead switches between “Idle” and “Offline”… in case anyone else is having problems with the trigger :wink:

That it doesn’t work automatically is logical, as you have not used the updater (as you don’t see the spools). When you do it manually it works, meaning you have set it all up correctly but made a mistake with the spools not visible.
You need to check the variables in your Spoolman Updater.

Ahh we typed at the same moment, good to see that you solved it yourself.

About the trigger, I wrote the yaml when I had the P1S and I don’t have it anymore, so if anything changes on the P1S side, I need to know :slight_smile:
Nevertheless, that is why the trigger is set to finished and idle, so you should not have problems with the trigger.

It seems to work for the AMS trays… but if I am using the external spool => I am selecting the correct spool on the Spool-Updater website, but it won’t save it… after an F5-refresh, the selected spool is gone…

Any idea?

I am using this entity:
-e APPLICATION__HOMEASSISTANT__EXTERNALSPOOLENTITY=sensor.p1s_01p09c560600600_externalspool_external_spool \

That happens on my end also, did you check Spoolman if the active tray is updated? If so, then it is just the same as I have, a visual problem.

Unfortunately, it is not updating the usage/weight of the external spool. Yesterday I finished three prints from the external spool, but no changes in Spoolman.

That could be correct as the external spool behaves differently. I wrote an automation a while ago for that but not tested as I don’t use the external spool.
Could you do me a favor?

  1. If you set the spool in the updater for the external spool, does it update the spool in Spoolman? Meaning, can you see that the active tray is set for that spool? That was my question above.

  2. Could you test the automation I wrote for the external spool if that updates the usage/weight? If if works, Github can be updated with the code.

You can find the code in the closed issues on Github

Does it update the spool in Spoolman?
You mean after the print is finished? - NO

Could you test the automation I wrote…
Yes, I’ll let you know. I updated my automation in HA, and the actual running print will need another ~5 hours… (of course, using the external spool)

Thank you very much for testing.

No, I mean if you set the external spool in Spoolman updater, does it update your Spoolman? If you go to Spoolman, select the spool that you set as the external spool in Spoolman updater, is the active tray field filled in?
So this is part of your remark that selecting the external spool in the updater isn’t visible.

Now I know what you mean… never have seen that field before (ok, using spoolman for abount a week now :wink: )

Yes, it is set and it changes if I am selecting another spool for the external spool. So that seems to work perfect.

Yes, your automation seems to update the Spoolman, BUT without/wrong weight… no wonder (this might be only on my system?) - sensor.p1s_01p09c560600600_print_weight = 915g

It is a single colour print… but

states(‘sensor.bambulab_filament_usage_meter’) | float(0) | round(2) = 27.45

So there must be an error or something else is missing…
Maybe I’ll dive a little bit deeper into this tomorrow…

In the automation is a system log write action, so you can track it to see what the automation has done. You can do this by going to the automation and then traces.

The trigger works, and the weight redcution seems to be working for external spool, but there seems to be a problem with the tray change/multi color (picking the correct used weight/updating the bambulab_filament_usage_meter

variables:
  tray_index: "{{ states('sensor.bambulab_ams1_tray_index')|int(-1) }}"
  external_active: >-
    {{
    state_attr('sensor.p1s_01p09c560600600_externalspool_external_spool','active')
    == true }}
  source: |-
    {% if tray_index >= 0 %}
      AMS (tray {{ tray_index }})
    {% elif external_active %}
      EXTERNAL
    {% else %}
      none
    {% endif %}
  tray_sensor: |-
    {% if tray_index >= 0 %}
      sensor.p1s_01p09c560600600_ams_1_tray_{{ tray_index }}
    {% elif external_active %}
      sensor.p1s_01p09c560600600_externalspool_external_spool
    {% else %}
      none
    {% endif %}
  tray_weight: |-
    {% if tray_index >= 0 %}
      sensor.bambulab_filament_usage_meter
    {% elif external_active %}
      sensor.p1s_01p09c560600600_print_weight
    {% endif %}
  tag_uid: "{{ state_attr(tray_sensor, 'tag_uid') }}"
  material: "{{ state_attr(tray_sensor, 'type') }}"
  name: "{{ state_attr(tray_sensor, 'name') }}"
  color: "{{ state_attr(tray_sensor, 'color') }}"

Without any logs, I am not able to check this. Can you please share the trace log?

Maybe I am too stupid or can’t see the forest… I can’t find any entry in the system log, but I found this in the traces:

params:
domain: system_log
service: write
service_data:
message: >-
[Spool-Update] Triggered by sensor.p1s_01p09c560600600_current_stage |
Source: EXTERNAL | Sensor:
sensor.p1s_01p09c560600600_externalspool_external_spool | Filament: SUNLU
PETG (PETG) | Weight: sensor.p1s_01p09c560600600_print_weight | Color:
#161616FF | Tag UID: 0000000000000000
level: info
target: {}
running_script: false

Give yourself some credit :wink:
You can find the full traces within the automation itself. If you go to the automation overview on the end of the line of the automation, three dots and select traces. There you will find, visual and textual what the automation has done.
The log you shared is the update of the spool for the external spool, not the color change AMS

From my latest trace:
Tray 3 is correct, ColorCode White is correct, Filament is correct… even if the weight was low (3.9g) for that color-change => it is not zero.

The usage_meter shows the correct amount (with purge?)

Perform action 'System Log: Write'
Executed: November 13, 2025 at 10:28:19
Result:
params:
  domain: system_log
  service: write
  service_data:
    message: >-
      [Spool-Update] Triggered by sensor.bambulab_ams1_tray_index | Source: AMS
      (tray 3) | Sensor: sensor.p1s_01p09c560600600_ams_1_tray_3 | Filament:
      Generic PLA (PLA) | Weight: sensor.bambulab_filament_usage_meter | Color:
      #FFFFFFFF | Tag UID: 0000000000000000
    level: info
  target: {}
running_script: false

Perform action 'rest_command.update_spool'
Executed: November 13, 2025 at 10:28:19
Result:
params:
  domain: rest_command
  service: update_spool
  service_data:
    filament_name: Generic PLA
    filament_material: PLA
    filament_tag_uid: '0000000000000000'
    filament_used_weight: 0
    filament_color: '#FFFFFFFF'
    filament_active_tray_id: p1s_01p09c560600600_ams_1_tray_3
  target: {}
running_script: false

Perform action 'Utility Meter: Calibrate' on bambulab_filament_usage_meter
Executed: November 13, 2025 at 10:28:19
Result:
params:
  domain: utility_meter
  service: calibrate
  service_data:
    value: '0'
    entity_id:
      - sensor.bambulab_filament_usage_meter
  target:
    entity_id:
      - sensor.bambulab_filament_usage_meter
running_script: false

Before I start with any troubleshooting, I missed something in your previous posted automation. In the one you posted and might be using, in the actions - variables there is an error.

You use this:

  tray_weight: |-
    {% if tray_index >= 0 %}
      sensor.bambulab_filament_usage_meter
    {% elif external_active %}
      sensor.p1s_01p09c560600600_print_weight
    {% endif %}

and as stated on Github, it should be this:

tray_weight: "{{ states('sensor.bambulab_filament_usage_meter') | float(0) | round(2) }}"

If you are indeed using the wrong tray_weight then indeed it will not work as with that you will return the name of the sensor and not the value :slight_smile:

First, I want to say thank you for the work you put into this.

I’m running into an issue with new spools being created against my wishes :slight_smile:

Since I am using filament not supported by BambuLab, the data being shared in HA is “Generic” and a simple color based on what I select on the touchscreen of my A1.

When this information is packaged in the automation from HA to be sent to spoolman-updater, it’s not mapping to the spool I told it that I had loaded in that particular tray.

For example:

I have a brand of Overture PLA filament in color black loaded in Tray 1. This is what I have in Spoolman, and, using the UI of spoolman-updater, I have selected the aforementioned spool for my Tray 1 slot.

However, HA sends over ‘Generic PLA’ and despite being in the same tray, it ends up creating a new spool (with a new filament and manufacturer in Spoolman).

Is this expected behavior? Is there a way for spoolman-updater to only update the spool that is in the tray it’s receiving an API call for, regardless of the color/match? I thought I had read that it’s up to me to manually update spoolman-updater with which spool is in which tray. With that, I accept the risk of updating whatever spool that is.

Or am I missing something entirely?

Thank you