Code: Select all
local vd = fibaro:getSelfId() --ID of this virtual device
HC2 = Net.FHttp("ip_adress eller url")
response, status, errorcode = HC2:GET("/clientraw.txt")
startTemp = string.find(response,"-100")
PoolTemp = string.sub(response,startTemp-5, startTemp-1)
fibaro:debug(PoolTemp)
fibaro:call(vd, 'setProperty', 'ui.lblTemp.value',PoolTemp.."C")