Announcement

Collapse
No announcement yet.

Help with CAPI please

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

    Help with CAPI please

    Can anyone spare a few minutes correcting this. It's a simple script which needs altering for CAPI. I'm getting the following error when a Switch Binary gets switched on (or Off) and I think it's because the old hs.IsOn() & hs.IsOff() does not work and needs replacing with CAPI.

    Mar-24 13:56:15 Z-Wave Error Failed sending Z-Wave command to device: Z-Wave Node 68 Z-Wave Interface Sigma Switch Binary Node 68 Child Mar-24 13:56:15 Device Control Device: Z-Wave Node 68 Z-Wave Interface Sigma Switch Binary Node 68 Child to On (255) by/from: CAPI Control Handler

    Here's how it is at the moment...

    Thanks, Neil

    Select case call_for_heat
    case = true
    if hs.IsOff(56) then
    ' switch boiler ON
    objCAPIControl = hs.CAPIGetSingleControlByUse(56,ePairControlUse._On)
    end if

    case = false

    if hs.IsOn(56) then
    ' switch boiler OFF
    objCAPIControl = hs.CAPIGetSingleControlByUse(56,ePairControlUse._Off)
    end if

    End Select

    If objCAPIControl IsNot Nothing Then
    hs.CAPIControlHandler(objCAPIControl)
    End If

    #2
    I don't know the first thing about ZWave but the error

    Mar-24 13:56:15 Z-Wave Error Failed sending Z-Wave command to device: Z-Wave Node 68 Z-Wave Interface Sigma Switch Binary Node 68 Child

    does not look typical of a script error, hs.ison/hs.isoff is still actually in HS (although not recommended for use) so it is probably not this. Does the device work OK when you control it from the device page?

    Comment


      #3
      Thanks for the reply. This is part of the long standing 'communication' issue on the Zwave beta releases and I am just trying to look at any other possibilities why simple on/off commands fail in the log and result in Unknown status. The switches do operate successfully. I'm at a loss, yet I hope Rick is still trying to resolve although he hasn't targeted any specific request for additional information from anyone as far as I can see.

      Yes I do need to change from using the hs.IsOn stuff but I don't know how to use the CAPI well enough yet.

      Neil

      Comment


        #4
        If you want to move away from hs.ison/hs.isoff then you can test the device value if they are relatively simple, 0 is generally off and 255 is on for a ZWave device (I think). Something like this may work;

        Code:
        Select case call_for_heat
        Case True
        If hs.devicevalue(56) = 0 Then objCAPIControl = hs.CAPIGetSingleControlByUse(56,ePairControlUse._On)
        
        case False
        if hs.devicevalue(56) = 255 then objCAPIControl = hs.CAPIGetSingleControlByUse(56,ePairControlUse._Off)
        
        End Select
        
        If objCAPIControl IsNot Nothing Then
        hs.CAPIControlHandler(objCAPIControl)
        End If
        But if there are communication issues it is likely to give the same error...

        Comment


          #5
          I'll use the code, thanks - but it hasn't solved the problem I have. Will have to wait for Rick I guess.

          Comment

          Working...
          X