@TAustin would it possible/feasible to add space for another 50 characters in the request please?
[ST Edge] Web Requestor: a driver to issue local POST and GET HTTP requests
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,
Rules are a ‘poweruser’ method of creating automations. Instead of using the mobile app, you create JSON-formatted files and submit them. They provide some additional capabilities over the mobile-app-built automation routines (such as periodic actions), but they can be quite awkward and confusing to create for non-technical users.
Thanks @TAustin that link doesn’t look that bad and from the looks it indicates rules when possible will run locally. Not terribly more complex than using webcore (I played a little with webcore before).
Cool Stuff thanks
I think the idea is similar to what I was looking for in the lan motion sensor. Instead of using the routine with the web requestor, you would add the capabilities required to make a predefined web request within the device (in @Alwas case, a virtual switch).
This would eliminate the need for the routine and basically contain both capabilities within a single device.
@Alwas , please correct me if I’m misspeaking on your behalf.