[ST Edge] Web Requestor: a driver to issue local POST and GET HTTP requests

Here’s where you run into limitations of the platform. Automations can’t manipulate variables.

You possibly could set up some number of routines that check for ranges of values reported by webrequestor, and then set the virtual thermostat temp to some arbitrary value within that range. It would take a number of automations to achieve any granularity, but maybe it would be workable if there are a few ‘setpoints’ that are really important to you.

Sorry I don’t have a better answer. There are some ‘mirroring’ drivers available from @Mariano_Colmenarejo; I don’t know if those will achieve this particular goal.

Thanks a ton for saving me time figuring the details of this one out. Honestly this post could use its own thread altogether for people with Blue Iris who still want ST mode/ BI profile sync’d.

I’m thrilled I could be of some assistance to someone who’s helped countless others!

Hi @Gavacac

It cannot be done with any device.
I think they usually use the API ruled to copy the temperature value of a device to the Virtual Thermostat or other apps like Sharp Tools

You might be interested in this use of Rules to set a virtual device property based on another device property: Integration Solutions using MQTT - #248 by TapioX

I have tested virtual thermostat using your driver [ST Edge] vEdge Creator: a virtual device generator for end users - Devices & Integrations / Community Created Device Types - SmartThings Community and Rule to copy real (Zigbee) temperature measurement to virtual thermostat. It works.

Maybe there is a type problem when this GET HTTP type is string and the temperature measurement’s type is number. Type conversions are not possible using Rules API.

hi @TAustin
ive put together a crude led display that accepts post requests , eg (post:http://192.168.0.93/cm?cmnd=DisplayText%20Rain%20Is%20Forcast)
im using web requester for it , but i need to be able to stop the display after so many seconds/ minutes as it keeps scrolling . to stop it i need to send (post:http://192.168.0.93/cm?cmnd=DisplayClear) and its only posible to use 1 preset request in a routine , is it posible to somehow send both requests 1 after the other somehow .
thanks
martin

Couldn’t you just add a second ‘Then’ action in your routine that sends the second HTTP request?

1 Like

I’m pulling out my hair trying to figure this out. I admit I don’t know much about web requests… I’m trying to use your Web Requestor and the Edge Bridge to hit TankUtility for my propane tank level. I can put the URL I have in a browser and get a response with data. TankUtility requires a token in every request. The token is 247 characters long. I’m totally baffled on how to set up the Web Requestor. The field isn’t large enough and I can’t figure out how (if possible) to use the body and more body to make it work.

The body and ‘more body’ fields are simply concatenated when sent, so you just split up the content between the two.

But I don’t know if that’s even enough characters for what you need.

What exactly is the format that the request needs to send?

https://data.tankutility.com/api/devices/<my device>?token=<my_personal_token>

my device is 24 characters and my token is 246 characters.

So it HAS to be provided as a parameter as part of the request URL?

Usually there is a second option where instead of using URL parameters, the data is provided in the ‘body’ part of the request- typically in a JSON format. The body is just additional data that is sent along with the URL request and HTTP headers.

See if you can find out if you have this alternative option for sending the token.

If you don’t, I have another solution for you: use my HTTP Devices driver. It provides a second ‘more’ field for the URL itself, so you’d be able to fit it all in.

FYI, each of these device Setting fields have a max character limit of 250 characters.

1 Like

I don’t see anything about another option. This what their website says:
Your token is expected to be included in all API requests to the server in a header that looks like the following:
token=my_personal_token

Should I be putting this in the header? I can’t fit “token=” and the token in the field

Well here’s the problem: what do you intend to do with the response data? You can extract one value from the response if it is JSON- formatted. But then what? Automations don’t have a whole lot of flexibility.

I just realized that using the HTTP Devices driver will not help since it doesn’t have the data extract feature.

It may be time for me to add a ‘more’ URL field to the first webrequestor request slot…

Yes… I hadn’t got that far yet but I intended to figure out how to extract the tank level. I was doing it in Webcore… My propane company provided the Tank Utility device and I tapped into it to keep an eye on the levels.
You have been a tremendous help with your drivers. You have solved practically all of my issues with Webcore going away. I can’t thank you enough but expect some coffee!

1 Like

Can you show me an example of the response data? Direct message me if it has sensitive data and X it out if necessary.

I want to be sure we can get the data you need and do something with it. Unfortunately we no longer have the flexibility of data manipulation that Webcore supported.

You might need a custom driver.

1 Like

Sent… Thanks for looking at this.

sorry i should have said it only allows me to use web requester once in “then” in a routine.

Using Rules API it’s possible to send multiple requests to same device.

1 Like

To get around this, I have a 2nd web requestor driver installed. This allows me to send two requests in the same automation.