Announcement

Collapse
No announcement yet.

UDMC scripting problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UDMC scripting problems

    hey guys I am figthing with this script for my sensors and I get this errors:


    May-12 9:09:44 PM Error Compiling script BLRadar\BLRadar_MotionSensor9On.vb: '.' expected.
    May-12 9:09:44 PM Error Compiling script BLRadar\BLRadar_MotionSensor9On.vb: 'Date' is a type and cannot be used as an expression.

    here is the script I am copying from a example they gave me:

    blradar.PluginFunction("NewDelayedEventForNoEcho",New Object(){"BLRadar Bathroom Motion Sensor","First Floor Master Bedroom Bathroom Ligthff",3,""})
    If hs.IsOffByName("First Floor Master Bedroom Bathroom Ligth")Then
    dim ntime as date=TimeValue(dateTime.Now)
    if nTime>=TimeValue(date Time.Now)
    if ntime>=TimeValue("6:00pm")AndAlso ntime<=TimeValue("9:30pm")then

    if hs.IsOnByName("virtual Home Stay")Then
    blradar.PluginFunction("ControlDevice",new Object(){"First Floor Master Bedroom Bathroom Ligth","dim",40})

    end if
    end if
    ntime=nothing
    end if
    end if

    Where am I failing???
    Hector
    ____________________________________
    Win.2003 OS, HS3
    BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
    BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
    MyTrigger,ACRF2,W800,Zwave
    AP800,Honeywell Stat

    #2
    Try this:

    Code:
    blradar.PluginFunction("NewDelayedEventForNoEcho",New Object(){"BLRadar Bathroom Motion Sensor","First Floor Master Bedroom Bathroom Ligth:off",3,""})
    If hs.IsOffByName("First Floor Master Bedroom Bathroom Ligth") Then
        dim ntime as date=TimeValue(DateTime.Now)
        if nTime>=TimeValue(DateTime.Now) then
            if ntime>=TimeValue("6:00pm") AndAlso ntime<=TimeValue("9:30pm") then
                if hs.IsOnByName("virtual Home Stay") Then
                    blradar.PluginFunction("ControlDevice",new Object(){"First Floor Master Bedroom Bathroom Ligth","dim",40})
                end if
            end if
        end if
        ntime=nothing
    end if
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment

    Working...
    X