Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OctoDash support multiple instances of OctoPrint #1148

Open
ToledoRayburn opened this issue Oct 31, 2020 · 13 comments
Open

OctoDash support multiple instances of OctoPrint #1148

ToledoRayburn opened this issue Oct 31, 2020 · 13 comments
Labels
enhancement New feature or request
Projects

Comments

@ToledoRayburn
Copy link

**Is your feature request related to a problem? I have a raspberry PI with 4 instances of OctoPrint installed controlling 4 printers. I installed OctoDash to the raspberry PI. It was aware of what instance I wanted OctoDash to control.

Describe the solution you'd like
It would be nice to be able to setup OctoDash to interact with all instances of OctoPrint. The feature would allow you to know what instance is active by displaying the Title from OctoPrint. There also would be a means to switch between active octoprint instance. Preferably this would be done with hot buttons on the main screen.

Link other projects
If you want OctoDash to include other OctoPrint plugins or similar please link them here.

Additional context
Add any other context or screenshots about the feature request here.

@ToledoRayburn ToledoRayburn added the enhancement New feature or request label Oct 31, 2020
@UnchartedBull
Copy link
Owner

Probably something for after v3.

@k5njm
Copy link

k5njm commented Jan 9, 2021

I would also like to see this feature. I have two printers side by side, with the pi running OctoDash in the middle. A left/right arrow, or button to pop up a list of configured Printers/Octoprint instances would be ideal. There would also need to be a persistent title to display what the currently active printer is.

@mihai-stanimir
Copy link

I run 4 printers from my Pi 4 with 4 instances of Octoprint. It would be so cool to be able to configure and jump from one instance to another with one OctoDash screen.

I used to work as an Angular developer and might be able help with some guidance.

@UnchartedBull
Copy link
Owner

Definitely will be possible, the functionality to apply a new config without fully restarting the Pi is already there, so the only thing that is missing for this would be support for multiple configs (and a UI for that). While its not super easy, it isn't super complicated either.

For a first version the UI can also be included in the Custom Actions, so you just would create a new Custom Action there until a fully fledged UI is available for that.

@NovaViper
Copy link

Definitely will be possible, the functionality to apply a new config without fully restarting the Pi is already there, so the only thing that is missing for this would be support for multiple configs (and a UI for that). While its not super easy, it isn't super complicated either.

For a first version the UI can also be included in the Custom Actions, so you just would create a new Custom Action there until a fully fledged UI is available for that.

Do you need people to test this? I just finished getting my Octoprint setup with two instances for my printers and would be more than willing to give this a try!

@GerogeFu
Copy link

GerogeFu commented Jan 8, 2022

Any update on this? @UnchartedBull

@jneilliii
Copy link
Contributor

Create copies of config.json to store as templates and edit for each instance (change URL, API key, name, etc. and add appropriate custom action as described below).

cp /home/pi/.config/octodash/config.json /home/pi/.config/octodash/config1.json
cp /home/pi/.config/octodash/config.json /home/pi/.config/octodash/config2.json

OCTO1: add custom action to config1.json

                "octodash": {
                        "customActions": [
                                {
                                        "color": "#a93e26",
                                        "command": "OCTO2",
                                        "confirm": true,
                                        "exit": false,
                                        "icon": "print"
                                }

OCTO2: add custom action to config2.json

                "octodash": {
                        "customActions": [
                                {
                                        "color": "#a93e26",
                                        "command": "OCTO1",
                                        "confirm": true,
                                        "exit": false,
                                        "icon": "print"
                                }

Install gcode system commands plugin in each instance and set commands as follows:

OCTO1:

cp /home/pi/.config/octodash/config.json /home/pi/.config/octodash/config2.json -f && cp /home/pi/.config/octodash/config1.json /home/pi/.config/octodash/config.json -f && sudo service getty@tty1 restart

OCTO2:

cp /home/pi/.config/octodash/config.json /home/pi/.config/octodash/config1.json -f && cp /home/pi/.config/octodash/config2.json /home/pi/.config/octodash/config.json -f && sudo service getty@tty1 restart

@GerogeFu
Copy link

GerogeFu commented Jan 8, 2022

Thanks for reply, but how to show ip on the screen?

@jneilliii
Copy link
Contributor

Maybe set the name in config files to match ip? Not sure of the question as it seems unrelated to the request.

@Thinkersbluff
Copy link

Thinkersbluff commented Feb 13, 2022

Not sure of the question as it seems unrelated to the request.

I have the same question as @GerogeFu. Issues #622 (Display network status icon with a current IP address) and #1202(Show IP on Dashboard) were both merged into this one and closed with the V3 milestone, but what they requested does not seem to have been implemented.

I have some unresolved issues with my Pi3b+, in which sometimes the octoprint instance becomes unreachable and PuTty is unable to log in at what should be a static IP address assigned to the rPi. It would be very helpful if I could just glance at the Octodash screen, to see whether the rPi is still online & what is its current ip address.

@UnchartedBull
Copy link
Owner

I just merged the issues into this one so it's easier to track. The functionality isn't implemented yet.

@jneilliii
Copy link
Contributor

I've just released version 0.0.7rc5 of OctoDash Companion plugin that can handle swapping instances in a little easier way than the hack approach mentioned above. It adds a new [!SWITCH_INSTANCE] token that will allow you to change the url field in config.json and restart the service. Once you select the option it will fill in the command field with a [!WEB] action, just swap the end with the instance to use, ie localhost:5000, localhost:5001, localhost:5002, so you then have one button per instance.

@DimchikUA
Copy link

Hello everyone! Please add a display of the current IP address to the OctoDash screen. The printer is on a network that I cannot configure. The IP keeps changing and I have to sweat to connect to the web page.
Octopi.local doesn't work for other reasons. A search under "issue" eventually led me here. Want to ask.
Are there plans to add this improvement in the future, or is it already forgotten?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Future
  
To do
Development

No branches or pull requests

9 participants