Read value in text file over HTTP

So I have a webserver with a text file on it - the text file contains either 1 or 0 (some cron script does some stuff to set the value)

What is the easiest way to read the value of the text file into a variable in Vera (Vera Plus, UI7)?

It would be cool if one could do something like;

local temp = luup.inet.wget(“http://10.10.10.10/somefile.txt”) to get the file, but I cannot get it to work…

[quote=“cozmokramer, post:1, topic:199350”]It would be cool if one could do something like;

local temp = luup.inet.wget(“http://10.10.10.10/somefile.txt”) to get the file, but I cannot get it to work…[/quote]

You can do something very like that. Try this…

local _, temp = luup.inet.wget("http://10.10.10.10/somefile.txt")
local _, temp = luup.inet.wget("http://10.10.10.10/somefile.txt")

I’ve seen this underscore notation a lot recently. Is this just assigning the status to a variable with the literal underscore as the name of the variable? or does this do some other sauce?

It’s the anonymous variable, used when you need a placeholder, but aren’t interested in the result.