Jump to content
C4 Forums | Control4

Recommended Posts

Posted

Hi there! I'm new to driver development and running into some issues. I'm building a driver for a door lock that uses HTTP requests for locking and unlocking. I'm starting with the basic template from Control4 Driver Editor.

I'm facing two main problems:

The lock doesn't appear in the Navigator.

In Composer, when I double-click the driver to access the lock, toggle, and unlock buttons, I'm unsure how to connect those buttons to the backend and trigger the actual commands.

Any help would be greatly appreciated!


Posted

Yes, I am using the Lock proxy. I've triple checked this and also verified that in composer I can double click and view the Lock, Toggle and Unlock buttons. Just can't interact with them or see them in Navigator. 

Posted
1 minute ago, RyanHill said:

Yes, I am using the Lock proxy. I've triple checked this and also verified that in composer I can double click and view the Lock, Toggle and Unlock buttons. Just can't interact with them or see them in Navigator. 

You need to bind it to a generic lock driver

Posted

That's what I thought too. I tried making a connection but had no luck. Then, I checked out the Kwikset driver and enabled trace debugging. When I pressed one of the three buttons, I could see the response in the Lua output. However, the device still doesn't appear in the Navigator, which I assume is because I need to send something to the proxy to indicate the device is connected

Posted

Its not even an option in the navigator tab in composer. But it seems that all door locks are like that until they are actually connected. 

 

I need to figure out how to force that connection, or send a command that will make the driver think its connected. Now that i'm thinking about it... Maybe my XML file needs a field of some sort that will handle the lock/unlock status?

Posted

This is the basic xml from the lock proxy driver. Does it not already have a relay connection in the XML? In composer i'm able to connect it to the generic door lock. 

 

<devicedata>
<copyright>Copyright 2017 Control4 Corporation. All rights reserved.</copyright>
<version>001</version>
<creator>Control4</creator>
<templatedescription>Lock Proxy Template</templatedescription>
<manufacturer>Control4</manufacturer>
<name>Lock Proxy Template</name>
<model>Lock Proxy Template Model</model>
<created>01/09/2017 3:30 PM</created>
<modified>01/09/2017 3:30 PM</modified>
<small image_source="c4z">images/lock_16.gif</small>
<large image_source="c4z">images/lock_32.gif</large>
<control>lua_gen</control>
<controlmethod>lock fill in here lock</controlmethod>
<driver>DriverWorks</driver>
<combo>false</combo>
<composer_categories>
<category>Lock</category>
</composer_categories>
<proxies qty="1">
<proxy proxybindingid="5001" primary="True">lock</proxy>
</proxies>
<capabilities/>
<config>
<identify_text>Cause identification to happen.</identify_text>
<identify_image image_source="c4z">www/lock_id.gif</identify_image>
<driverdocumentation>
<category name="copyright" description="Copyright">Copyright Control4 2017</category>
<category name="version" description="Version">1.0.001</category>
</driverdocumentation>
<documentation file="www/documentation.rtf"/>
<script file="driver.lua"/>
<actions>
<action>
<name>Template Version</name>
<command>TemplateVersion</command>
</action>
</actions>
<properties>
<property>
<name>Log Level</name>
<type>LIST</type>
<readonly>false</readonly>
<default>2 - Warning</default>
<items>
<item>0 - Fatal</item>
<item>1 - Error</item>
<item>2 - Warning</item>
<item>3 - Info</item>
<item>4 - Debug</item>
<item>5 - Trace</item>
</items>
</property>
<property>
<name>Log Mode</name>
<type>LIST</type>
<readonly>false</readonly>
<default>Off</default>
<items>
<item>Off</item>
<item>Print</item>
<item>Log</item>
<item>Print and Log</item>
</items>
</property>
<property>
<name>Version</name>
<type>STRING</type>
<readonly>true</readonly>
<default>1.0.001</default>
</property>
</properties>
</config>
<connections>
<connection>
<id>5001</id>
<facing>6</facing>
<connectionname>Lock</connectionname>
<type>2</type>
<consumer>false</consumer>
<audiosource>false</audiosource>
<videosource>false</videosource>
<linelevel>false</linelevel>
<classes>
<class>
<classname>Lock</classname>
</class>
</classes>
<hidden>True</hidden>
</connection>
</connections>
</devicedata>

Thanks again

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.