Trigger based on value in external file

I'm about to roll everything from Vera Plus to a Hubitat hub. I have a weather station that publishes the last hour windspeed gust to a file on my website. I have a scene setup in Vera to look every 10 minutes at the contents of an external file and if its over 15 the condition will come true and the action will be to retract the awning. The luup code is below. Can someone point me in the right direction on how this would be done in Hubitat.
Thanks

Luup code in my vera today:

local threshold = 15
local a,b = luup.inet.wget "website/vera_windgust_hour.php"

local status = false -- by default, abandon scene execution
if a == 0 and b then
status = tonumber(b: match "%d+%.?%d*") > threshold
end

return status

Hello John,

The ideal approach would be to integrate your weather station to Hubitat and then use a Rule in Rule Machine to do this.

Have you searched for your weather station to see if there is an integration available?

What does 15 signify?

Welcome to the community!

Thanks, The 15 is just a threshold i'm using that when crossed makes the condition true. 15 in this case is a high wind speed of 15 knots. I really was just looking to run a scene say every 15 min to look in the file and if the value is = or > 15 than the scene would trigger an action.

1 Like

Could you have the weather station make a call to a URL in HE and use an endpoint trigger.

Every time the value exceeds the limit call the trigger in HE?

1 Like

This would clearly be more efficient. I guess I was just being lazy and trying to get it to work the way it is today. Thanks for the direction as I’ll look into endpoint trigger abilities.

1 Like

Download the Hubitat app