Octoprint - support for multiple printers

Before I create the PR, could you check if this fix your issue?

https://github.com/reefab/home-assistant/blob/octoprint_path_fix/homeassistant/components/octoprint.py

Put this file in the ~/.homeassistant/custom_components/ remove the path part of the host key and put it in a path: key.

this is how i set up my configuration.yamlā€¦with the custom component it is failing

i see this, https://github.com/reefab/home-assistant/commit/6164db412911ed4e06845623d4c1a6007c18e1b1#diff-797652caf078813a834d889aef979a64R39

do i have my path set up incorrectly?

Paths should be fine, it prepends/appends slashes automatically. Moving to private message to narrow it down.

Did the path option ever making into the official build? Or is that something I need to manually add into the component? Interested since I have mine set up similarly and this would be perfect for me.

The PR has been made, the path option should be shortly in an official build.

Edit: now merged, it will be in the next main release.

2 Likes

The documentation is still not up to date

@w1ll1am23 @ladefoged81 @jomungand @reefab @contagon @noisufnoc @AmiSMB

Hello all,

now we have to use the integration config in the UI and its recommanded to delete the config in configuration.yaml,

the problem is the discover works only for my first instance who is in /home/pi/.octoprint who the path is /i3mega/

there is no discovery for my 2nd instance /chiron/ who is in /home/pi/.octoprint2 (port 5002).

If i try to manually add it there is a error message in the integration config : ā€œAbandonnedā€¦ Device is already configuredā€.

I have post an issue on Github in homeassistant-core but i donct know who made this integration to ask directly to the developperā€¦

I am the only one concerned please?

I have 1 Octopi server with 2 instances and it seems that the integration in the UI cant managed 2 instancesā€¦

more info : the api-key is well created for my second instance in the octoprint ui for my second printer after validate with ā€œAllowā€ but back in the integration in HA it doesnt work : ā€œAbandonnedā€¦ Device is already configuredā€.

Any help to contact the developper to add multiple instance feature would be appreciated. Thanks!

File an issue on github (unless thereā€™s an existing one), itā€™s clearly a bug.

Hi. What happens if you already have a sensor: listed in configuration.yaml? It says already used?

This is not valid, you add octoprint via Configuration ā†’ Integrations now.

1 Like

Same problem for me, I have 3 artillery x1 but it finds just one. Did you fix it?

yes! find it on Github :slight_smile:

This is what I did:

1- SSH to OctoPrint instance
2- Edit config.yaml under /home/pi/.octoprint2 (or 3 or 4 depending on how many instances)
3- Changed plugins/discovery/upnpUuid with a random number (just changed the last digit to something else) and saved file
4- sudo service octoprint2 restart
5- Added the integration for my second instance in HomeAssistant

Done!

:wink: