Originally posted by macromark
View Post
Thanks
If this is your first visit, be sure to check out the FAQ. You must register before you can post.
IMPORTANT: Your first post will be checked for appropriate content. This may take a bit of time.
https://forums.homeseer.com/search?searchJSON=%7B"last"%3A%7B"from"%3A"lastWeek"%7D%2C"view"%3A"topic"%2C"starter_only"%3A+1%2C"sort"%3A%7B"lastcontent"%3A"desc"%7D%2C"exclude_type"%3A%5B"vBForum_PrivateMessage"%5D%7D
Dim FirstDate As DateTime = DateTime.Now.AddMonths(-6)Dim LastDeviceChanged As Integer = -1 Dim ArrOfDevices() As Integer = {298, 150, 158, 37, 140, 1759, 447, 2386, 2796} Dim SetDevice as boolean = false For Each SingleDevice As Integer In ArrOfDevices 'hs.writelog("OccChec", "(Ref: " & SingleDevice & ") " & hs.devicename(SingleDevice) & " - Device Last Change: " & hs.devicelastchangeref(SingleDevice)) If FirstDate < hs.devicelastchangeref(SingleDevice) Then FirstDate = hs.devicelastchangeref(SingleDevice) LastDeviceChanged = SingleDevice End If Next hs.writelog("OccCheck", "** ---> Last Device Changed: " & hs.devicename(LastDeviceChanged) & " **")
Comment