How to send https URL to a web server on my LAN?


#1

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!


#2

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…

pic


#3

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.


#4

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
    or
  • Small differences can impact results (IE: string vs integer)
    or
  • Depending on URL, certain characters may need to be escaped
    or
  • Sometimes I put the dataPoints into variables first, and then reference those

For example, here is one of mine:

pic

Which might return:

192.168.86.75:309/?HourChime&12

In this example, the web request uses all strings:

  • A global string {@eg},
  • followed by pure text inside quotes,
  • and ending with a local string {time}.

#5

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.

https://192.168.1.16:8344/admin?camera=Driveway_Clone&trigger&user=XxxxXxxx&pw=XxxxXxxx


#6

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)


#7

That 192.168.1.xx IP is inside your network and can’t be accessed via webcore (which is outside your router).


#8

Local requests to 192.168.1.x work very well with webCoRE…


#9

If a local request doesn’t work I could try using DDNS instead of the local IP.


#10

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)


#11

@WCmore… I’ve tried a lot of different things and still not getting it to work. I appreciate your help. I did reply to @Robin in a different thread about this and I hope to hear back.


#12

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…


#13

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.


#14

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.
https://192.168.1.16:8344/admin?camera=Driveway_Clone&trigger&user=username&pw=password
http://192.168.1.16:8347/admin?camera=Driveway_Clone&trigger&user=username&pw=password


#15

For your URL, are you using an “Expression” or “Value” box?


Also, do you have any peculiar characters in your password?
(quotes, spaces, foreign characters, ?, =, &, and other symbols may cause issues)


#16

Here’s what I’m trying…

Password only has alpha characters.


#17

I’m confused, doesn’t webCoRE execute in the cloud?


#18

I don’t know. The log from when I try different things says “Sending internal web request to:”.


#19

Hey Glen, have you looked at some of the other pistons that communicate with Blue Iris?
(there are some great examples using this search)


#20

The piston is stored in the cloud, but local requests (IE: 192.168.x.x) are handled locally.