I have a rule that is triggered when one of my many temperature towers value(s) change. The action is a Send HTTP request which (ideally) looks similar to:
While the %device% and %value% works when using Send or Speak a Message it does not appear to work when using Send HTTP Get specifically because %device% is not replaced with the actual value. Is there a way around this?
I don't know why it wouldn't work, but you could put the bulk of the URL into a local variable as you have it and just use the local variable in the URL instead. I remember having to do something similar once, but I don't have those rules anymore to check
The issue is with the device name I use. For example "Backyard Tower". This fails however... If I rename (or remove spaces) the device to "BackyardTower" it works.
Refresh my memory. Is %device% the device NAME or device LABEL? If its the former my problem is an easy fix by simply removing all spaces.
No errors on server/client side that I can see but I have confirmed the issue is with spaces in the device name (or URL for that matter) . Here is the rule
With a device label of "Backyard Tower" with a temerature value of 32.4, the rule sent is http://192.168.1.129/apps/api/xx/tower/Backyard Tower/32.4?access_token=xxxxxxxxx
which fails. Renaming this device to "BackyardTower" or "Backyard_Tower" and all is good.
I think I'll just take all the spaces out of the label name.
It didnt seem to make any difference in my case. For giggles (& having nothing better to do) I decided I would replace all spaces in the device label names with %20. As I suspected, after doing this all worked as it should
I tried that but it does not seem to work. Using the rule I posted above, here is what the Rule log looks like. At the receiving end of the GET I get nothing,