SM103 - switch or contact?

Hi all,

I have three Everspring SM103 which are apparently fully recognised (xml files exist and I can see them fine in Habmin) but they don’t seem to ever detect if the door is opened (rather defeating the point of them).

Taking one of them as an example, I have the following item configuration:
Contact GF_Living_LeftWindow "Ground Floor Left Window" (gGroundFloor,gWindowSensors) { hannel="zwave:device:157b8d41438:node27:sensor_binary" } Number GF_Living_LeftWindow_Bat "Ground Floor Left Window Battery: [%d %%]" <energy> (gBatteryLevels,gGroundFloor) { channel="zwave:device:157b8d41438:node27:battery-level" }

In Habmin I see that the Thing woke up 4 hours ago, but the only channel which is matched is battery (and it says zero battery too, which I find hard to believe).

I went into the channel for the binary_contact and noticed it was set to switch, which doesn’t seem right - so I changed it to Contact and manually paired it with the item GF_Living_LeftWindow. This now seems to have worked, but why was it necessary?

Also, I see that the alarm channel is now matched to GF_Living_LeftWindow too… which isn’t correct surely? I’d expect to need to configure a separate tamper item for this.

Node.xml:
<node> <deviceClass> <basicDeviceClass>ROUTING_SLAVE</basicDeviceClass> <genericDeviceClass>BINARY_SENSOR</genericDeviceClass> <specificDeviceClass>ROUTING_SENSOR_BINARY</specificDeviceClass> </deviceClass> <homeId>0x184c830</homeId> <nodeId>27</nodeId> <version>3</version> <manufacturer>0x60</manufacturer> <deviceId>0x1</deviceId> <deviceType>0x2</deviceType> <listening>false</listening> <frequentlyListening>false</frequentlyListening> <routing>true</routing> <security>false</security> <beaming>true</beaming> <maxBaudRate>40000</maxBaudRate> <nodeInformationFrame> <commandClass>SENSOR_BINARY</commandClass> <commandClass>CONFIGURATION</commandClass> <commandClass>WAKE_UP</commandClass> <commandClass>MANUFACTURER_SPECIFIC</commandClass> <commandClass>VERSION</commandClass> <commandClass>ASSOCIATION</commandClass> <commandClass>BATTERY</commandClass> <commandClass>BASIC</commandClass> <commandClass>ALARM</commandClass> </nodeInformationFrame> <supportedCommandClasses> <entry> <commandClass>SENSOR_BINARY</commandClass> <binarySensorCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> <isGetSupported>true</isGetSupported> <types/> </binarySensorCommandClass> </entry> <entry> <commandClass>VERSION</commandClass> <versionCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> <libraryType>LIB_SLAVE_ROUTING</libraryType> <protocolVersion>2.78</protocolVersion> <applicationVersion>1.1</applicationVersion> </versionCommandClass> </entry> <entry> <commandClass>CONFIGURATION</commandClass> <configurationCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> <configParameters> <entry> <int>1</int> <configurationParameter> <index>1</index> <size>1</size> <value>99</value> <readOnly>false</readOnly> <writeOnly>false</writeOnly> </configurationParameter> </entry> <entry> <int>2</int> <configurationParameter> <index>2</index> <size>1</size> <value>1</value> <readOnly>false</readOnly> <writeOnly>false</writeOnly> </configurationParameter> </entry> </configParameters> </configurationCommandClass> </entry> <entry> <commandClass>NO_OPERATION</commandClass> <noOperationCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> </noOperationCommandClass> </entry> <entry> <commandClass>BATTERY</commandClass> <batteryCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> <batteryLevel>0</batteryLevel> <batteryLow>true</batteryLow> <isGetSupported>true</isGetSupported> </batteryCommandClass> </entry> <entry> <commandClass>MANUFACTURER_SPECIFIC</commandClass> <manufacturerSpecificCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> <initSerialNumber>false</initSerialNumber> <deviceManufacturer>96</deviceManufacturer> <deviceType>2</deviceType> <deviceId>1</deviceId> </manufacturerSpecificCommandClass> </entry> <entry> <commandClass>ALARM</commandClass> <alarmCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> <alarms> <entry> <alarmType>SMOKE</alarmType> <alarmState> <alarmType>SMOKE</alarmType> <reportedEvents/> <outer-class reference="../../../.."/> </alarmState> </entry> </alarms> <v1Supported>false</v1Supported> <isGetSupported>true</isGetSupported> </alarmCommandClass> </entry> <entry> <commandClass>ASSOCIATION</commandClass> <associationCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> <maxGroups>2</maxGroups> </associationCommandClass> </entry> <entry> <commandClass>WAKE_UP</commandClass> <WakeUpCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> <targetNodeId>1</targetNodeId> <interval>3600</interval> <minInterval>0</minInterval> <maxInterval>2147483647</maxInterval> <defaultInterval>0</defaultInterval> <intervalStep>0</intervalStep> <lastWakeup>2017-01-02 13:16:10.611 UTC</lastWakeup> <isGetSupported>true</isGetSupported> </WakeUpCommandClass> </entry> <entry> <commandClass>BASIC</commandClass> <basicCommandClass> <version>1</version> <instances>1</instances> <versionSupported>1</versionSupported> <isGetSupported>true</isGetSupported> </basicCommandClass> </entry> </supportedCommandClasses> <securedCommandClasses/> <associationGroups> <entry> <int>1</int> <associationGroup> <index>1</index> <associations> <associationMember> <node>1</node> <endpoint>0</endpoint> </associationMember> </associations> </associationGroup> </entry> <entry> <int>2</int> <associationGroup> <index>2</index> <associations> <associationMember> <node>1</node> <endpoint>0</endpoint> </associationMember> </associations> </associationGroup> </entry> </associationGroups> <nodeNeighbors> <int>22</int> <int>23</int> </nodeNeighbors> <lastSent>2017-01-02 13:41:54.866 UTC</lastSent> <lastReceived>2017-01-02 13:16:10.611 UTC</lastReceived> </node>

Which version of the binding are you using? As far as I can tell from the database there is no binary_contact channel -:

I don’t know what GF_Living_LeftWindow is - it sounds like an item, so this must be configured by you somewhere - the binding doesn’t touch items at all (it knows nothing of items - only things and channels).

Hi @chris, I’m using the following version
193 | Active | 80 | 2.0.0.201701011144 | ZWave Binding

Apologies - I think I wrote binary_contact when I meant to write sensor_binary. Here’s a screen grab of what I see in Habmin:

GF_Living_LeftWindow is indeed an item, but the line in my .items file is:
Contact GF_Living_LeftWindow "Ground Floor Left Window" (gGroundFloor,gWindowSensors) { hannel="zwave:device:157b8d41438:node27:sensor_binary" }

so I really don’t understand why it’s paired to the alarm.

Oh … that is embarrassing! I just noticed that I had written ‘hannel=’ rather than ‘channel=’. I’m updating the binding and then will restart.

Hmm. So, I definitely see something being detected when I open the window:
13:41:42.517 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 27: Application Command Request (ALIVE:PING) 13:41:42.517 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 27: Incoming command class SENSOR_BINARY 13:41:42.517 [DEBUG] [dclass.ZWaveBinarySensorCommandClass] - NODE 27: Received SENSOR_BINARY command V1 13:41:42.517 [DEBUG] [dclass.ZWaveBinarySensorCommandClass] - NODE 27: Sensor Binary report, type=Unknown, value=255 13:41:42.517 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveBinarySensorValueEvent 13:41:42.517 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 27: CC event during initialisation stage IDLE 13:41:42.517 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 27: Got an event from Z-Wave network: ZWaveBinarySensorValueEvent 13:41:42.517 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 27: Got a value event from Z-Wave network, endpoint = 0, command class = SENSOR_BINARY, value = 255 13:41:42.517 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 27: Updating channel state zwave:device:157b8d41438:node27:sensor_binary to ON [OnOffType]

But I don’t see the matching item (GF_Living_LeftWindow) updating in events.log. I’m really not sure what is going on here! It seems like the devices are communicating with openhab (via the expected channel). But somehow I’ve messed up and the item isn’t updating. Not really sure what could be wrong though!

Edit: DOH I just checked http://www.cd-jackson.com/index.php/zwave/zwave-device-database/openhab-2-channel-types and I see that sensor binary should be a Switch, not a Contact. Changing this makes the item work as expected. Sorry for the noise!