Embedded Automation Forum  

Go Back   Embedded Automation Forum > mHome Products > mControl Software Integration > mControl DDK
Forums FAQ Members List Calendar Search Today's Posts Mark Forums Read

mControl DDK Discussion on the mControl Driver Development Kit, which allows developers to create new adapters and devices used by the mControl Automation Service.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-25-2010, 10:19 PM
hadiesper hadiesper is offline
Senior Member
 
Join Date: Mar 2009
Posts: 127
Default Adapter Base Not Unique

I understand that "Adapter Base" has to be unique among all drivers.

My problem occurs when putting together the following code:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<mServerDb vendor="SHIFRA DRIVER" version="1.4.1">
	<Protocols>
		<protocol name="ShifraSWaveProtocol" saveLevel="false" canEnroll="true" forcedAddressList="true" automationCmdsDelay="100" />
	</Protocols>
	<Adapters>
		<adapter base="ZWCTRL" load="Y" assembly="EA.Zwave.dll" driver="EmbeddedAutomation.mServer.Adapters.ZWaveManager">
			<aparam name="DISPLAY-AS" value="Shifra SWave Adapter" />
			<aparam name="Description" value="Shifra SWave Adapter" />
			<aparam name="Supports" value="ShifraSWaveProtocol" />
  			<aparam name="Port" value="COM6" /> 
 			<aparam name="DebugLevel" value="5" /> 
  			<aparam name="PollingSeconds" value="5" /> 
		</adapter>
	</Adapters>

	<Modules>
		<module base="ZW_THERMOS" class="THERMOSTAT" use="Y">
			<mparam name="DISPLAY-AS" value="S-Wave Thermostat" />
			<mparam name="Description" value="S-Wave Thermostat" />
			<mparam name="MProtocol" value="ShifraSWaveProtocol" />
			<mparam name="FieldsGrp" value="ZWAVETHERMO" />
			<mparam name="ParamsGrp" value="HVAC" />
			<mparam name="DefaultImage" value="Thermostat.gif" />
			<mparam name="HVACMODES" value="OFF|HEAT|COOL|AUTO" />
			<mparam name="FANMODES" value="ON|AUTO" />
		</module>
	</Modules>

	<ModuleCommands>
		<group name="THERMOSTAT">
			<command name="null" uiClass="Link" urlPage="HvacView.aspx" mcmlPage="" append2Link="devid" />
			<command name="SetSPH" label="Heat setpoint" locID="MCMD_SPH" uiClass="">
				<component label="Temp." locID="MCMP_TEMP" type="NUM" subType="double" values="-40~232" default="65" />
			</command>
			<command name="SetSPC" label="Cool setpoint" locID="MCMD_SPC" uiClass="">
				<component label="Temp." locID="MCMP_TEMP" type="NUM" subType="double" values="-40~232" default="85" />
			</command>
			<command name="SetMODE" label="Set HVAC mode" locID="MCMD_HVACMODE" uiClass="">
				<component label="Mode" locID="MCMP_MODE" type="LIST" values="AUTO|HEAT|COOL|OFF" default="AUTO" />
			</command>
			<command name="SetFAN" label="Set FAN mode" locID="MCMD_FANMODE" uiClass="">
				<component label="Mode" locID="MCMP_MODE" type="LIST" values="AUTO|ON" default="AUTO" />
			</command>
			<command name="MoveSP" label="Change setpoint" locID="MCMD_CHGSP" uiClass="">
				<component label="Value" locID="MCMP_VAL" type="LIST" values="UP|DWON" default="UP" />
			</command>
		</group>
	</ModuleCommands>

	<ModuleProps>
		<group name="HVAC">
			<property name="HVACMODE" ops="EQ|NE" type="LIST" values="AUTO|HEAT|COOL|OFF" devchg="true" devstat="true" />
			<property name="HVACSTATE" ops="EQ" type="LIST" values="AUTO|HEAT|COOL|OFF" devchg="false" devstat="true" />
			<property name="FANMODE" ops="EQ" type="LIST" values="AUTO|ON" devchg="true" devstat="true" />
			<property name="FANSTATE" ops="EQ" type="LIST" values="IDLE|RUNNINGLOW|RNNINGHIGH" devchg="false" devstat="true" />
			<property name="SPHEAT" ops="LT|LE|GT|GE" type="NUM" subType="double" values="-40~232" devchg="true" devstat="true" />
			<property name="SPCOOL" ops="LT|LE|GT|GE" type="NUM" subType="double" values="-40~232" devchg="true" devstat="true" />
			<property name="SPSTATUS" ops="EQ" type="LIST" values="NORMAL|HOLD|OVERRIDE" devchg="false" devstat="true" />
			<property name="TEMPVAL" ops="LT|LE|GT|GE" type="NUM" subType="double" values="-40~232" devchg="true" devstat="true" />
			<property name="TEMPSCALE" ops="EQ" type="LIST" values="F|C" devchg="false" devstat="true" />
		</group>
	</ModuleProps>

	<ModuleFields>
		<group name="ZWAVETHERMO">
			<address refgrp="ShifraSWaveProtocol" />
			<options>
				<component label="Temp. Scale" locID="MFLD_TEMP_SCALE" type="LIST" values="F|C" />
				<component label="Polling time (sec)" locID="MFLD_POLLSEC" type="NUM" subType="double" values="0~3600" default="10" />
			</options>
		</group>
	</ModuleFields>
</mServerDb>
You will notice that the above is a replica of the Z-wave thermostat but what is different is that i am trying to create my own adapter. The purpose is to attach 2 different Z-WAve controllers on 2 different COM ports. I just want my second one to run a Thermostat.

So the problem is that Adapter Base cannot be defined as anything other than ZWCTRL because that is what it is defined as in EA.Zwave.dll. and If I keep the above as ZWCTRL, the adapter does not launch because each adapter base has to be unique.

So how can I fix this? The only way i see it is make another version of EA.Zwave.dll and rename ZWCTRL to something else. But that would involve de-compiling and re-compiling, which i dont think will work? Any ideas anyone?

Thank you, i really appreciate any help on this one
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:38 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.