Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Lock device class
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dean,

In the online CQC documentation, there's a V2 Device Classes section. In there, there's a class called "Locks". I've developed a Raspberry Pi/ZWave based lock controller. I've written a driver for but I would like to convert the driver to a V2 driver. The other V2 drivers call a "helper" method in the RegisterFields method. Things like V2Help.GetPowerFlds and V2Help.GetDevInfoFlds. Is there a V2Help.GetLockFlds or GetLocksFlds helper method? If so, I can't seem to find it. Please point me to it. Also, is there a semantic type for Locks? Any help would be appreciated. Thanks.

Bryan
I don't think there's one for locks. Mostly those helpers are for ones that are more tricky or that have more fields. Locks are pretty simple, just one field, so there isn't one.

The device class docs are here:

https://www.charmedquark.com/Web2/CQCDoc...=/Overview
Once you have the driver going in the IDE, there's a main menu tool option to validate it. It will check any V2 classes that the driver manifest claims it supports and see if all of the fields are present and that they have the correct attributes.
OK, I understand that there's only one field but how do I create a field called LOCK#AnyName? It loads and runs fine if the field name is LOCK-AnyName but never connects if it's LOCK#AnyName. I must be missing something.

Thanks.
Have you marked the driver as V2 compliant and indicated it supports the lock device class in the manifest file? Check one of the Z-Wave driver manifests for an example if not.
Yes, this is my manifest file. Does it look correct?

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE CQCCfgBig GrinriverCfg PUBLIC "urn:charmedquark.com:CQC-DrvManifest.DTD" "CQCDriverCfg.DTD">


<!-- =========================================================================
  - This is the driver manifest for Bryan's Lock Controller. It uses a Raspberry Pi running the Domoticz
  - Home Automation package and controls Z-Wave Smart Locks.
  - =========================================================================
  -->
<CQCCfgBig GrinriverCfg CQCCfg:ArchVer="2">

    <!-- Define the server driver config -->
    <CQCCfg:ServerCfg  CQCCfg:LibName="MEng.User.CQC.Drivers.Bryans.ZWave-Lock-Control.DriverImpl"
                        CQCCfgBig GrinrvType="Macro"/>

    <!-- Define the common driver config -->
    <CQCCfg:CommonCfg  CQCCfg:Author="Bryan Brademan"
                        CQCCfg:Contact="bryan@visual-av.com"
                        CQCCfgBig Grinescription="Supports the Raspberry Pi Lock Controller."
                        CQCCfgBig GrinevClasses="Lock"
                        CQCCfgBig GrinisplayName="Lock Controller"
                        CQCCfg:Category="Miscellaneous"
                        CQCCfg:Make="Bryans"
                        CQCCfg:Model="LockControl"
                        CQCCfg:Version="1.0"/>
    <!--
      - Prompt for the connection configuration.
      -->
    <CQCCfg:ConnCfg CQCCfg:Editable="True">
        <CQCCfg:IPConn CQCCfgTongueort="8080"
                      CQCCfg:AddrType="IPV4"
                      CQCCfg:SockProto="SockProto_TCP"/>
    </CQCCfg:ConnCfg>

    <CQCCfg:OtherCfg>
    </CQCCfg:OtherCfg>

</CQCCfgBig GrinriverCfg>
That looks reasonable.