DiscordRemote Plugin MultiCam request

Sorry if this has been asked before, is there a way to include a different snapshot from a camera's IP with the discord remote plugin?

The plugin is great. The camera configured at the octopi server is an aerial view of my print bed, I have a second camera configured to the multicam plugin, using motioneye, with an IP that I would like to configure for messages when sent to my discord channel.

Looks like from the plugin's code...

    def get_snapshot_camera(self):
        snapshot = None
        snapshot_url = self._settings.global_get(["webcam", "snapshot"])
        if snapshot_url is None:
            return None
        if "http" in snapshot_url:
            try:
                snapshot_call = requests.get(snapshot_url)
                if not snapshot_call:
                    return None
                snapshot = BytesIO(snapshot_call.content)
            except ConnectionError:
                return None
        if snapshot_url.startswith("file://"):
            snapshot = open(snapshot_url.partition('file://')[2], "rb")

...it just uses whatever's configured in the OctoPrint -> Settings -> Webcam area and runs with that. You might consider swapping the two webcam setups in OctoPrint and then the Discord one will work instead.

But if you need to send to Discord both of the webcams then you'd either need to fork the code to create a second plugin or go ask the author on their repository for a feature request.

1 Like

Okay, that worked perfectly. I only wanted one camera's screenshot, both wouldn't be necessary. Swapped the camera in webcam settings to point to the motioneye webcam, then in the multicam plug in, placed one camera with IP and the second camera with /webcam/?action=stream and both are able to stream.

Thank you for the suggestion :slight_smile:

1 Like

hello everyone sorry if the translation is not very good i'm french lol i start in octoprint on raspberry a friend installed it and i am looking desperately the means of using multicam on octopi 0.17 i use 2 usb webcam i Don't know much for the programming i installed putty for the orders thanks to you if you can help me