Subject really says it all. Based on a motion sensor trigger, I need to send an https URL to web server on my LAN. I’ve done some searches and can’t really find what I’m looking for. Thanks!
I would redirect your searches to your web server point of view…
(since that is where the “brains” will be processing that new data)
WebCoRE can likely send the data, but a solid understanding of your web server will be required first… (requirements, acceptable commands, parameters, authentication, etc)
If you are already proficient with your web server, then webCoRE can simply make a web request to it…
Thanks for the reply. I tried this and it didn’t work. If I do the https command via a web browser it works as expected. I copy/paste that exact same command into Webcore as you showed above and it doesn’t work. Not sure what to try next.
It’s hard to guess without seeing anything, but I am thinking it is likely either:
- Code is written differently in an “
Expression” box vs a “
Value” text field
- Small differences can impact results (IE: string vs integer)
- Depending on URL, certain characters may need to be escaped
- Sometimes I put the dataPoints into
variablesfirst, and then reference those
For example, here is one of mine:
Which might return:
In this example, the web request uses all strings:
- A global string
- followed by pure text inside quotes,
- and ending with a local string
Thanks… I’m trying to send this web request in order to trigger a security camera to start recording when a PIR motion sensor detects motion.
I just noticed the ‘s’ at the end of your http…
I have dealt with this in the past, but I am currently drawing a blank as to my previous solutions…
(all of the “local request” pistons I looked at are starting off with IP numbers, not “http(s)://”…)
If that fails, maybe try this search here in the forums…
(it might be certificate related)
That 192.168.1.xx IP is inside your network and can’t be accessed via webcore (which is outside your router).
Local requests to 192.168.1.x work very well with webCoRE…
If a local request doesn’t work I could try using DDNS instead of the local IP.
If a local IP does not work, then using an external IP would be my next move…
(for the record, there a lot of good info at my last link above)
I am chatting with one of my clients now that uses Blue Iris… Trying to see an example of what worked for us in the past…
Sorry, I remembered wrong… My work with Blue Iris was outside of the webCoRE ecosystem…
Could this be a certificate issue? I’m guessing that local https certs aren’t signed by authority that smartthings/webcore would trust.
If you had a raspberry pi running somewhere, you might be able to make a script that proxies the http to https, as suggested in some of the posts in the ‘https’ search suggested above.
I don’t recall anything about certificates in Blue Iris. I actually changed Blue Iris to use a HTTP command and WebCore still wouldn’t work.
Here are example commands that work from a web browser on my LAN.
For your URL, are you using an “
Expression” or “
Also, do you have any peculiar characters in your password?
(quotes, spaces, foreign characters, ?, =, &, and other symbols may cause issues)
I’m confused, doesn’t webCoRE execute in the cloud?
I don’t know. The log from when I try different things says “Sending internal web request to:”.
Hey Glen, have you looked at some of the other pistons that communicate with Blue Iris?
(there are some great examples using this search)
The piston is stored in the cloud, but local requests (IE: 192.168.x.x) are handled locally.