@TAustin I’m textually pulling my hair out about this. I’m facing the very same situation. Any command I issue from Postman works flawlessly whereas they don’t when I type them into the ST app on my S22U phone.
I tried getting rid of all the quotes, playing with spaces, switching to a Spanish keyboard layout in case the character set could make a difference,… nothing.
I just thought of installing ST for Windows (which I never thought about in the past), but this version doesn’t even allow you to edit Devices.
I think I am completely out of ideas by now… any other thoughts?
[ST Edge] Web Requestor: a driver to issue local POST and GET HTTP requests
I’m here to help!
Can you share the exact request you are trying to send (DM me if preferred).
You say nothing is working: if you can’t get even the simplest GET request to work, it makes me wonder if something else is going on. Is there anything unusual about your network config that could be blocking communications? Is your hub on the same subnet as the device you’re trying to reach? Any firewalls?
Hi there. First this is awesome. I am not a developer and a rather ocassional visitor. After listening of all the impact in moving to EDGE drivers, I came to this community yesterday looking for “alternatives to smartthings” But came across the work from @TAustin and happy about finding the stuff he has developed. Thanks!
I have a question (rather tangential)
I installed web requestor and it works fine. When it hits a server I am monitoring it gets me a 200 code. Otherwise **Timeout. This is great as my use case is as a presence sensor
What I am having issues with is how to use this on a routine to let me know if server is down. Routines including the request response code are only “equal” to. I can not make it such that is “different” than 200.
Any thoughts? Thanks!
@TAustin would it possible/feasible to add space for another 50 characters in the request please?
Could you just have two routines: one to test for 200 and one to test for **Timeout ?
Wow that must be a long request string. Is the character limitation you are seeing 128 characters?
I can’t extend the the space since it is a SmartThings limitation. I would have to add a secondary settings field to capture additional request string characters, similar to what I did for the body in the first 5 request slots.
Ahem … I swear this didn’t work yesterday
Hi @TAustin I’ve got a request I’m really hoping you can create, an actual Web Requestor Device! A simple virtual switch that when it turns on or off sends a Get Request, so with two settings to configure. Many of my Web Requestor Routines do this anyway, control on/off status of a switch and as I’ve reached the 200 Routine limit, I’m stuck, as many others are too, we can’t create more Routines. This Web Requestor Device would free up 42 Routines for me, which out of 200 is a considerable amount.
Question about a particular use case and how to use smartthings now to monitor devices. Note my intention is to do this all locally not using an external device/service
I set up the webrequestor device so I can check whether a server is up or not and trigger some notifications if not. As far as I know Web Requestor does not run in real time or in a cycle. Only runs when trigger.
I want them to make it run every 5 minutes. So I figure I need a cycle to trigger Web Requestor device every 5 minutes.
So I wanted to create a “cycle” routine … a bit surprised there is no way to do this easily. What I did them is
- Created a virtual switch
- Set up a routine to turn it off if it has been on for 5 minutes
- Set up a routine to turn it on if it has been off for 5 minutes (steps 2 and 3 create the cycle)
- Set up a routine that every time the switch turn on or off, trigger the webrequestor device 1 by selecting the Req number nbr 1, then the webrequestor device 2 by selecting the Req number nbr 1, then the webrequestor device 3 by selecting the Req number nbr 1, etc
- Set up routines monitoring the status Webrequestor 1, Webquestor 2, etc
My questions is whether this makes sense:
- Is this a good way to use webrequestor and creating one device per request
- Is this the best way to run a cycle in smartthings locally
- Is this the proper way to activate webquestor to update the status (action to execute pre configured web request)
Thanks and appreciated
Sounds from this post that truly you need to do something like I did to run a cycle.
The limit appears to be 100 characters in non-predefined requests. Can you change it to 128? The limit is higher in the pre-configured requests.
Well it seems we hit limits no matter what we try If you’re not hitting the routine limit, you may hit the driver limit or devices limit!
If you had this web requestor “switch” device, how would that reduce the number of routines you would need? Wouldn’t you still need routines to control each individual switch device? Or are these only triggered manually in the app? And if you do create a bunch of individual devices, is there any chance you would then hit the device limit?!
A couple comments:
have you looked at implementing this using Rules? I thought there was a way to define a periodic action
what is running on your sever that is responding to these requests?
there may be alternatives you could consider for achieving what you want without the complicated automation routines. For example, I have a couple different solutions for monitoring the status of a server and it would provide a simple device in SmartThings that would indicate the online/offline status. And thus vastly simplify your routines. It would require one or two simple scripts to be running on the computer to be monitored. DM me if you are interested in exploring this.
Are you referring to where you provide a POST or GET URL when creating an automation routine? Unfortunately, I have no control over those character limits - they are imposed by the SmartThings app.
Because I’ve reached the 200 Routine limit, I’d have roughly 42 new Routines to use elsewhere, as the Routines would be inside the Web Requestor Device, for on and off, and not only this, I could then delete a whole bunch of virtual devices to decrease my device count and use Web Requestor Devices instead, so it’s a win win.
Thanks, but why do we not have the same 100 character limit on the pre-defined requests?
I’m still not clear how you can reduce your routines. How are you going to trigger the web requestor device? Only manually with the mobile app?
@TAustin REF: Using “Rules”. I am still not sure what that means
For the basic functionality I thought it would be best to do everything locally. My convoluted setup right now:
- Smartthings w EDGE and routines
- sharptools.io (doesn’t have periodic action - same issue)
- NodeRed on an old PC. I was doing all my pinging/alerts here before
- Google Home Speaker which can see many of the ST devices but other than listening to music and the news and opening the door doesn’t get used much use
- Alexa which can see many of the ST devices but I really don’t use other than to announce when somebody opens the door. Alexa just came in on the thermostat … kind of accidentally there
The only thing I was using the web requestor was to verify that:
- IP based devices were alive or let me know
- Nodered and Calibre server are alive and running or let me know
So I was just waiting go a **Timeout over say 20 minutes to get an alert
For my nodered server and calibre server, I was just verifying I get a 200 or a 401 for calibre. That is suffiicient for me.
@nayelyz can you provide some insight please. If an edge driver was created like the one we used to have below, the two web requests would reside inside the edge driver, and therefore not count towards the 200 Routine limit?
If you create a Routine (Automation menu) in the app using a device no matter the integration type (which is where/how the command is executed), it will be counted in that limit.
But, if you only send commands to the device through the app, for example, from the detail view, it won’t be a Routine, thus, it won’t be added to that count.
Also, an important note is that Edge drivers cannot access Public URLs, all communication must use the internal IP address, there is one mentioned on that page.
Great thanks. And we’re only talking about local addreses, not Public URLs like in that other device, thanks,