Mye av grunnet til at jeg kjøpte homeseer er dette scriptet. Men jeg bruker det til og styre lys i hønsehus og det skal IKKE stoppe. Ser at det hender det stopper opp.
Er det slik at om jeg fjerner det jeg klippet ut her så bare går det?
' Need to declare this so that I don't bail at the first iteration
dim Previouslevel as integer = Startvalue
for each cc as HomeSeerAPI.CAPIControl in hs.CAPIGetControl(deviceRef)
for Newlevel as integer = Startvalue to Stopvalue step DeltaValue
' Check if there is an override - i.e. the device has been changed outside the script
if ((hs.DeviceValue(deviceRef) = Previouslevel) orElse (Previouslevel = Startvalue)) then
' Set the correct dim level
cc.ControlValue = Newlevel
hs.CAPIControlHandler(cc)
' Wait the required amount of time
System.Threading.Thread.Sleep(Waittime)
Previouslevel = Newlevel
else
' Manual override - You openend the pod bay doors yourself :-/
if writeLog then hs.WriteLog("ChangeDimmer", deviceName & " - Manual override, bailed out at " & Previouslevel & "%")
exit sub
end if
next