Is this VB script easily emulated with groovy?

On my Homeseer system I used VB Scripts to do a lot of stuff. One of my favorites was to write certain events to a DOS text file. Is this something that I could do with Groovy? Does something already exist?

sub main(sensor)
dim fso

Const OpenFileForReading = 1
Const OpenFileForWriting = 2
Const OpenFileForAppending = 8

Path = "C:\temp\ms.log"

Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(path, OpenFileForAppending, True)

file.WriteLine ("Motion detected @ " & now & " on sensor " & sensor)
file.Close
end sub

No.
There's no user accessible file available.

Hubitat is an event driven system. Events can be output via MakerAPI and captured by an external system for evaluation. It's THERE on the external system that you could run VB.

Search for "Grafana" or "InfluxDB" and you'll find 'recipies' for deploying a server for consuming the data output possibilities.

4 Likes

Thanks I'll look for it.