HTTP triggers via IFTTT/Webhooks

I’ve been looking at How to trigger SharpTools rules using HTTP - SharpTools Knowledge Base in an attempt to send my WirelessTag (CAO Gadgets) temperature probe data across to SharpTools. I think I can go via IFTTT/Webhooks as WirelessTag has a service on IFTTT, but I’m not sure what to put in the IFTTT fields to get this to work. Can anyone help me please? I’ve got a as far as creating the WirelessTag IFTTT ‘IF’ statement for the sensor in question using ‘… if the sensor updates’, and I’ve created the URL in SharpTools which I think I need to put into the ‘THEN’ Webhooks field, but then there are other things to add but here I get lost…
I would be grateful for any help, please.
Nick C

Josh at SharpTools has just told me that he thinks that it may be possible to send the URL request direct from WirelessTag to SharpTools, so no need for iFTTT/Webhooks. The problem I have is getting the correct string… here below is a typical call I make to my Android tablet to display the sensor data in Automation Manager for IoT. It is posted as a GET verb to a private IP address:
http://192.168.1.88:4030/webdevices/WebAnalog_{0}?value=<% round({2},1) %>&state=standby
where {0} is the tag name (I can write these out in full if necessary) and 192.168.1.88 is the target android tablet’s address. I can change the verb to GET, POST or PUT, and can untick the ‘private address call’ to go outside my LAN. I currently have it calling every 30 min which is fine for my needs.
Does this information help anyone out there to come up with the correct URL to call SharpTools, please?

What have you tried so far? And what are you trying to do with the data? Write it to a variable?

Hi Chris, I am trying to display important temperatures around the house (swim pool, freezer, etc) using WirelessTag (CAO Gadgets) sensors that I already have. They are displaying in the WirelessTag web-page and also via Automation Manager for IoT (AM) on Android tablets using AM widgets, but they are not very pretty… a SharpTools display would be much better and also then I can add some other display information from SmartThings/Home Assistant. WirelessTag sends updates every half hour to AM using http urls which I explained above. I’m looking for a way to add similar url calls also to SharpTools so I can see these temperatures as tiles on SharpTools, but I’ve had no luck in finding a method and I know nothing about programming other than copying & pasting stuff, as directed by somebody who knows what they are doing :slight_smile:

Here’s what I would do. Start with a basic rule where you are getting the data for a single tag. Then later you can improve the rule to support multiple tags.

Create a Variable to hold your value.
Variable Introduction and Overview - SharpTools Knowledge Base

Create a Rule with an HTTP Trigger.
How to trigger SharpTools rules using HTTP - SharpTools Knowledge Base

Check the “How to pass data to a rule” section of the above article. When you add the HTTP Trigger, it will give you a URL like:

https://trigger.sharptools.io/rule/(rule_id)/key/(auth_key)/

You can tap the + Add Parameter option in the HTTP Trigger to name the parameters that you are going to send. Let’s add:

  • tagName
  • value

In your Rule Flow, create an action Set Variable. Pick the variable you created earlier. Then for the Source, select Variable.

For the Source Variable, choose the Context Variables tab. Then Event > HTTP Event > Parameters. You should see the parameters you defined in the HTTP Trigger and you can pick “value”.

Then in your WirelessTag configuration, the URL you want to send the data to would probably be like:

https://trigger.sharptools.io/rule/(rule_id)/key/(auth_key)/?tagName={0}&tagValue={2}

Thanks Chris, but I’m getting stuck at understanding the bit about the Source Variable… I don’t know what that should be and if I try to add the phrase ?tagName={0}&tagValue={2} it says it has to be alphanumeric. … and I’m not sure what I need to say in the WirelessTag url. Sorry to be so thick.

Make sure to follow the steps in order. And the sample URL provided with the parameters is for the WirelessTag side of things. Are you saying that your WirelessTag UI is saying it has to be alphanumeric?

Here’s a video demo showing the SharpTools side of things.

As noted above, once you’ve setup the rule, you would then need to copy the URL from your rule’s HTTP trigger and add the parameters when setting it up in your WirelessTag “URL Calling” feature.

No, the message about not being alphanumeric is in SharpTools, but I have misunderstood and your video has helped a lot - thank-you!
I am installing Home Assistant later today (when a new Raspberry Pi arrives) so I’ll try that route first as WirelessTag is compatible with HA and it means I can then keep my existing URL calls as well as add other devices to SharpTools.

A post was split to a new topic: Home Assistant Add On Install Help

I confirm that WirelessTag connects to SharpTools very easily via Home Assistant (HA)… just a couple of lines to add to the HA yaml.file & it works.

1 Like