![](http://content.invisioncic.com/r242699/set_resources_14/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
CameronE
-
Posts
13 -
Joined
-
Last visited
Reputation Activity
-
CameronE reacted to RyanE in Driver Editor can't connect to Director
Typically, if you can't add your driver *at all*, it's due to issues with the XML portion of the driver.
You should look in ComposerPro's log output for details.
RyanE
-
CameronE reacted to Cinegration in Driver Editor can't connect to Director
I believe that driver editor no longer works with composer pro. I haven’t used that program in years
-
CameronE reacted to Rexabyte in Sample driver question (thermostat v2)
I believe it's a command ("GET_EXTRAS_SETUP") from the proxy to the protocol portion of the driver. You need to return the XML you specified above.
You need to also handle the extras state ("GET_EXTRAS_STATE") to specify the values in each object.
You can send the notifications to update the extras as well (5001 being the thermostat proxy ID):
C4:SendToProxy(5001, "EXTRAS_SETUP_CHANGED", {XML = "XmlAsString"}, "NOTIFY") C4:SendToProxy(5001, "EXTRAS_STATE_CHANGED", {XML = "XmlAsString"}, "NOTIFY") Full example:
local data = [[<extras_setup> <extra> <section label="Vane Swing"> <object type="list" id="1" label="Vane direction"> <list maxselections="1"> <item text="Auto" value="Auto"/> <item text="Swing" value="Swing"/> <item text="Ceiling" value="Ceiling"/> <item text="High" value="High"/> <item text="Middle" value="Middle"/> <item text="Low" value="Low"/> <item text="Floor" value="Floor"/> </list> </object> </section> </extra> </extras_setup>]] C4:SendToProxy(5001, "EXTRAS_SETUP_CHANGED", {XML = data}, "NOTIFY")
-
CameronE reacted to RyanE in Sample driver question (thermostat v2)
Rex,
You have that a bit backwards, but almost the right idea... In your example, those are all *from* the protocol *to* the proxy, and there's no '_HAS' in them...
EXTRAS_SETUP_CHANGED is how you would dynamically change the set of extras from the driver side of things, and EXTRAS_STATE_CHANGED is how you'd change the current value of the extra(s).
I prefer that to declaring them in the .XML part of the driver.
If you want your extras to tell the driver when things change, you need to add a command and add a value to the extra object.
Here's an example of setting up extras with a single 'Away Status' selection:
MySendToProxy(PROXY_BINDING, "EXTRAS_SETUP_CHANGED", { XML = [[ <extras_setup> <extra> <object type="list" id="away" label="Away Status" value="home" command="SET_AWAY"> <list maxselections="1"> <item text="Away" value="away"/> <item text="Home" value="home"/> </list> </object> </extra> </extras_setup> ]] } ) Then, when it's changed via the Navigator UI, it will come in through ReceivedFromProxy. In this case, in a command called 'SET_AWAY', with a param called 'value', that either has 'away' or 'home' in it.
The appropriate EXTRAS_STATE_CHANGED would look like this:
MySendToProxy(PROXY_BINDING, "EXTRAS_STATE_CHANGED", {XML = '<extras_state><extra><object id="away" value="away"/></extra></extras_state>'} ) RyanE