Add external link to the interface

Hi There !

I'm new with 3D imrpession, I'm new with octobprint.

I'd like octoprint to add a button or link to launch an URL. I use Jeedom to control my home. I've a command http://localdadress/blablalba/switchonlight for example. I try to add this link in the octoprint interface.
How can I dot that ?
Thanks for your help !

It would be possible to achieve this with a custom control button added to config.yaml I think. It would have to be a javascript type and run the javascript command to open a window. Something like this maybe?

controls:
-   children:
    -   name: 'On'
        javascript: window.open("http://localdadress/blablalba/switchonlight")
        width: '2'
    -   name: 'Off'
        javascript: window.open("http://localdadress/blablalba/switchonlight");
        width: '2'
    layout: horizontal_grid
    name: Lights

The other option would be creating a full plugin.

2 Likes

Thanks a lot for your answer. It's a shame there is no plugin for this this.

Probably because no one has asked before. Custom controls already exist, so for most people that is enough.
If you want to create a plugin, there's some great resources to help you get started.