Call a webcore script through python

Hi everyone,

I have a personal project for my home : being able to scan a QR Code (using a proper scanner) and launch a chain of events depending on the QRCode.
My QR Code scanner is linked to a raspberry pi by USB. I am able to detect the scanned QR Code in my python script, and I would now like to trigger the associated webcore routine from my python script.

Hence, here is my question : how to “call” a webcore script from python? I presume it has to go through a smartthing call?

Best regards,

Webcore has their own forum, you might get quicker answers there:

Each webcore piston has an external URL that you can call, and even send data to.


1 Like

Using webcore’s external URL is your best bet and very easy. Create a webcore piston that will do whatever you want whenever it gets triggered by your RPI/Python app. You can then get the webcore external URL as shown above. In your Python, app, use something like the requests module to post the webcore URL whenever you want, and it will trigger the piston to run.

Once webcore goes away, your remaining choices will be to either use the direct connection method to integrate with smartthings (I have a Python support package to do that), or set up a pipe between your Python app and an Edge driver running locally on the hub.

1 Like

Thank you guys for your fast answers, very helpful!