Rover includes a page to display and clear the log that is trimmed down slightly for consumption on a slow connection, handheld, etc. Back in HomeSeer v1.x this was done with some hideously ugly kluges. To wit, I had HomeSeer ask itself for its own Log web page, then parsed out the bits I needed. (Since this happened server-side, it didn't cause slowdowns on slow connections.) The code looked like this:
This is (thankfully, perhaps!) not working in HS2, but even if it did, parsing out the log from the /elog page would be a trial and a half.
But looking through the help file I can't see anything in the script interface that allows you to read the log. Is it in there and I can't find it? Please help. (If it isn't, can we please consider that for a future version?)
Code:
' show the log, by asking HomeSeer to talk to itself, and then listening in on its conversation ' This is a hideous kluge! But still kinda cute. if hs.Version > "1.6.110" then s = hs.GetURL("127.0.0.1","/elog",FALSE,hs.GetINISetting("Settings","svrport",80)) else ' work around a syntax bug s = hs.GetURL("127.0.0.1:" & hs.GetINISetting("Settings","svrport",80),"/elog",FALSE,hs.GetINISetting("Settings","svrport",80)) end if i = instr(lcase(s),"<pre>") if i <> 0 then s = mid(s,i) else s = "<pre>" & s i = instr(lcase(s),"</pre>") if i <> 0 then s = left(s,i+5) else s = s & "</pre>" response.write s
But looking through the help file I can't see anything in the script interface that allows you to read the log. Is it in there and I can't find it? Please help. (If it isn't, can we please consider that for a future version?)
Comment