[ST Edge] Issue with the Z-Wave Switch driver

It’s possible.
In IDE, the DTH also says it has 6 buttons, 3 each switch, although they are not shown.
They are configurable in preference settings.
I have never used the send scenes functions.

Can you send an email to build@smartthings.com with the following information to report the issue, please?

  • A video of the switch1 and main components to see how both control switch 1
  • The Hub logs received during the video reporting to see what is displayed in the app and the actual events sent.

Hello, @nayelyz

Making a video of how switch1 and main control the same physical switch is a bit difficult for me now.
I have the device again paired with the DTH and I would have to disassemble the hub and bring it close to the device and pair it again with the driver and then again with the dth.

In the video you would only see that the main or switch1 is activated, but you would not see which light turns on.

I can send you the entire pairing log and at the end there are several changes from on to off of the main and switch 1 and surely you will be able to get more information.

You will also see in logs that it measures exactly the same power in the 2 channels and in reality there is 6 watts of difference from one lamp to another.

I understand, in the logs should appear the event from the app targeting main or switch1 and the message sent to the same device endpoint, which would be really helpful for the engineering team.

@nayelyz,

I send file to e-mail and you tell me if it is enough

Thanks

@nayelyz I am trying to add a Minoston Z-Wave Plug Outlet Dual On/Off Switch Outlet (MP20Z) using the stock z-wave switch driver.
mfr:0312 prod:FF00 model:FF05

  - id: 0312/FF00/FF05
    deviceLabel: Minoston Switch 1
    manufacturerId: 0x0312
    productType: 0xFF00
    productId: 0xFF05
    deviceProfileName: dual-switch

The issue is that only the Main Switch and Switch 1 are being created. I ran logcat during inclusion and see no errors. The 2 switches control only the Left outlet. It appears that a Switch 2 is needed to control the Right outlet.

Do you mean you downloaded the stock driver and added that fingerprint?
Which other capabilities do you need? The “dual-switch” profile only has one switch in “main” and another in “switch1”, so, you should use the correct profile.

Can you share the logs of the “switch” events to see the content of the messages, please?

No, that fingerprint is already included in the stock driver, I did not add anything.

The way it is working is that both the Main and Switch 1 only control the left outlet. Neither switch turns on power to the right switch. I would expect Main to control the left outlet and Switch 1 to control the right outlet. I will get the logs

Here are the logs. The right outlet never gets turned on.

2022-03-15T01:10:58.211317076+00:00 TRACE Z-Wave Switch  Received event with handler capability
2022-03-15T01:10:58.356711410+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> received command: {"component":"main","capability":"switch","command":"off","args":[],"positional_args":[]}2022-03-15T01:10:58.368672077+00:00 TRACE Z-Wave Switch  Found CapabilityCommandDispatcher handler in zwave_switch
2022-03-15T01:10:58.374742410+00:00 TRACE Z-Wave Switch  SWITCH_BINARY supported.
2022-03-15T01:10:58.384094743+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> sending Z-Wave command: {args={duration=0, target_value="OFF_DISABLE"}, cmd_class="SWITCH_BINARY", cmd_id="SET", dst_channels={}, encap="AUTO", payload="\x00\x00", src_channel=0, version=2}
2022-03-15T01:10:58.611267077+00:00 TRACE Z-Wave Switch  Z-Wave command(aa0e0428) queued for radio transmission: CC:Switch Binary, CID:0x01
2022-03-15T01:10:58.655678743+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:10:58.664828743+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:10:58.872832410+00:00 TRACE Z-Wave Switch  Z-Wave command(aa0e0428) transmit status: TRANSMIT_COMPLETE_OK
2022-03-15T01:10:58.987807743+00:00 TRACE Z-Wave Switch  Received event with handler unnamed
2022-03-15T01:10:59.013569077+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> received Z-Wave command: {args={value="OFF_DISABLE"}, cmd_class="SWITCH_BINARY", cmd_id="REPORT", dst_channels={}, encap="NONE", payload="\x00", src_channel=0, version=1}
2022-03-15T01:10:59.026779744+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:10:59.033247744+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> emitting event: {"component_id":"main","capability_id":"switch","state":{"value":"off"},"attribute_id":"switch"}
2022-03-15T01:10:59.052548077+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:10:59.057910744+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:10:59.066424077+00:00 TRACE Z-Wave Switch  Received event with handler unnamed
2022-03-15T01:10:59.080169077+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> received Z-Wave command: {args={value="OFF_DISABLE"}, cmd_class="SWITCH_BINARY", cmd_id="REPORT", dst_channels={0}, encap="NONE", payload="\x00", src_channel=1, version=1}
2022-03-15T01:10:59.102382077+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:10:59.109113744+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> emitting event: {"component_id":"switch1","capability_id":"switch","state":{"value":"off"},"attribute_id":"switch"}
2022-03-15T01:10:59.127571077+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:10:59.135194077+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:10:59.668345410+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> sending Z-Wave command: {args={}, cmd_class="SWITCH_BINARY", cmd_id="GET", dst_channels={}, encap="AUTO", payload="", src_channel=0, version=1}
2022-03-15T01:10:59.861476077+00:00 TRACE Z-Wave Switch  Z-Wave command(2f4bbcb3) queued for radio transmission: CC:Switch Binary, CID:0x02
2022-03-15T01:10:59.876744077+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:11:00.028061411+00:00 TRACE Z-Wave Switch  Z-Wave command(2f4bbcb3) transmit status: TRANSMIT_COMPLETE_OK
2022-03-15T01:11:00.303298411+00:00 TRACE Z-Wave Switch  Received event with handler unnamed
2022-03-15T01:11:00.528027411+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> received Z-Wave command: {args={value="OFF_DISABLE"}, cmd_class="SWITCH_BINARY", cmd_id="REPORT", dst_channels={}, encap="S2_UNAUTH", payload="\x00", src_channel=0, version=1}
2022-03-15T01:11:00.578730078+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:11:00.603733078+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> emitting event: {"component_id":"main","capability_id":"switch","state":{"value":"off"},"attribute_id":"switch"}
2022-03-15T01:11:00.646312078+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:11:00.665149411+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:11:06.680220747+00:00 TRACE Z-Wave Switch  Received event with handler capability
2022-03-15T01:11:06.708919747+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> received command: {"component":"switch1","capability":"switch","command":"on","args":[],"positional_args":[]}
2022-03-15T01:11:06.733535414+00:00 TRACE Z-Wave Switch  Found CapabilityCommandDispatcher handler in zwave_switch
2022-03-15T01:11:06.739062747+00:00 TRACE Z-Wave Switch  SWITCH_BINARY supported.
2022-03-15T01:11:06.747001414+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> sending Z-Wave command: {args={duration=0, target_value="ON_ENABLE"}, cmd_class="SWITCH_BINARY", cmd_id="SET", dst_channels={1}, encap="AUTO", payload="\xFF\x00", src_channel=0, version=2}
2022-03-15T01:11:06.837427747+00:00 TRACE Z-Wave Switch  Z-Wave command(b5ac2d1e) queued for radio transmission: CC:Switch Binary, CID:0x01
2022-03-15T01:11:06.848705081+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:11:06.855763747+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:11:07.056969414+00:00 TRACE Z-Wave Switch  Z-Wave command(b5ac2d1e) transmit status: TRANSMIT_COMPLETE_OK
2022-03-15T01:11:07.139019747+00:00 TRACE Z-Wave Switch  Received event with handler unnamed
2022-03-15T01:11:07.148420414+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> received Z-Wave command: {args={value="ON_ENABLE"}, cmd_class="SWITCH_BINARY", cmd_id="REPORT", dst_channels={}, encap="NONE", payload="\xFF", src_channel=0, version=1}
2022-03-15T01:11:07.162403414+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:11:07.168879081+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> emitting event: {"component_id":"main","capability_id":"switch","state":{"value":"on"},"attribute_id":"switch"}
2022-03-15T01:11:07.190644414+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:11:07.196228747+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:11:07.403655748+00:00 TRACE Z-Wave Switch  Received event with handler unnamed
2022-03-15T01:11:07.416759414+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> received Z-Wave command: {args={value="ON_ENABLE"}, cmd_class="SWITCH_BINARY", cmd_id="REPORT", dst_channels={0}, encap="NONE", payload="\xFF", src_channel=1, version=1}
2022-03-15T01:11:07.440708414+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:11:07.447208748+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> emitting event: {"component_id":"switch1","capability_id":"switch","state":{"value":"on"},"attribute_id":"switch"}
2022-03-15T01:11:07.465979414+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:11:07.471970748+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:11:07.858116081+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> sending Z-Wave command: {args={}, cmd_class="SWITCH_BINARY", cmd_id="GET", dst_channels={1}, encap="AUTO", payload="", src_channel=0, version=1}
2022-03-15T01:11:07.880494414+00:00 TRACE Z-Wave Switch  Z-Wave command(1d2ceaac) queued for radio transmission: CC:Switch Binary, CID:0x02
2022-03-15T01:11:07.885795414+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
2022-03-15T01:11:08.088884748+00:00 TRACE Z-Wave Switch  Z-Wave command(1d2ceaac) transmit status: TRANSMIT_COMPLETE_OK
2022-03-15T01:11:08.111447081+00:00 TRACE Z-Wave Switch  Received event with handler unnamed
2022-03-15T01:11:08.120866415+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> received Z-Wave command: {args={value="ON_ENABLE"}, cmd_class="SWITCH_BINARY", cmd_id="REPORT", dst_channels={0}, encap="S2_UNAUTH", payload="\xFF", src_channel=1, version=1}
2022-03-15T01:11:08.141554748+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:11:08.148392415+00:00 INFO Z-Wave Switch  <ZwaveDevice: 380f26ec-50d9-4601-9798-d96b3df96eb7 [70] (Minoston Switch 1)> emitting event: {"component_id":"switch1","capability_id":"switch","state":{"value":"on"},"attribute_id":"switch"}
2022-03-15T01:11:08.163895415+00:00 TRACE Z-Wave Switch  Found ZwaveDispatcher handler in zwave_switch
2022-03-15T01:11:08.169330748+00:00 DEBUG Z-Wave Switch  Minoston Switch 1 device thread event handled
1 Like

Thank you for the information, @Terri_Baker.
I already reported it to the engineering team. Please, let me know the results of your tests using the driver from Mariano

This now works with Mariano’s driver

@nayelyz,
For what it’s worth, here’s what I changed in the main init.lua

I changed the assignment code of the map endpoints to component_id and from component_id to endpoint called in lifecycle init, in a similar way to what smartthing did in the fibaro double switch subdriver to solve something similar.

the difference is that this must work for others multicomponent devices of the driver, in fact I removed the call to the init lifecycle function that assigns map the endpoint and component_id in the Fibaro double switch subdriver that smartthings added and it continues to work perfectly.

This is the changed code replacing the original commented with - -

--- Map component to end_points(channels)
---
--- @param device st.zwave.Device
--- @param component_id string ID
--- @return table dst_channels destination channels e.g. {2} for Z-Wave channel 2 or {} for unencapsulated
local function component_to_endpoint(device, component_id)
  --local ep_num = component_id:match("switch(%d)")
  --return { ep_num and tonumber(ep_num) } 
  local ep_num = tonumber(component_id:match("switch(%d)"))
  if ep_num == nil then
    return {}
  else
    return {ep_num + 1}
  end
end
--- Map end_point(channel) to Z-Wave endpoint 9 channel)
---
--- @param device st.zwave.Device
--- @param ep number the endpoint(Z-Wave channel) ID to find the component for
--- @return string the component ID the endpoint matches to
local function endpoint_to_component(device, ep)
  --local switch_comp = string.format("switch%d", ep)
   local switch_comp = string.format("switch%d", ep - 1)
  if device.profile.components[switch_comp] ~= nil then
    return switch_comp
  else
   return "main"
  end
end
--- Initialize device
---
--- @param self st.zwave.Driver
--- @param device st.zwave.Device
local device_init = function(self, device)
  device:set_component_to_endpoint_fn(component_to_endpoint)
  device:set_endpoint_to_component_fn(endpoint_to_component)
end
1 Like

@nayelyz and @Mariano_Colmenarejo
I have lost the ability to control the switch 1 from the app or device using either stock or custom edge driver. Not sure when this started but I just noticed today.
Switch 1 shows offline cloud. Main switch still works. I tried removing and reading device which did not solve the issue.

does it work from https://account.smartthings.com ?

Hi @Terri_Baker

What driver is it and what device?

I use 2 fibaro double switch and they work well

It was working great with the z-wave switch mc or stock z-wave switch drivers until it wasn’t. I still have an evalogik 2 ch switch that works fine. Mariano you added both of these to your driver a while back.

It doesn’t show the second switch

Not that this could happen.
Did you try to make a refresh slipping your finger on the screen?
Did you try to turn it on or off from a routine or scene or from mechanical switch?

If this does not remove the cloud broken, only occurs to me that you could make a driver change, erase cache and change the driver or reboot hub.

In my.smartthings.com the secondary components are not seen and the Custom Capabilities not work. This website is very forgotten by SmartThings

This fixed it. Thanks for your help

1 Like

@Mariano_Colmenarejo Is it possible to add an option for multi switch device tile?

Hi @Terri_Baker

The Zwave switch driver has more than 50 profiles, of which more than 20 are for multi-component devices.
making presentations with multi tile involves duplicating the profile and adding code to perform the profile change.
If it’s for one in particular I could do it.
Giving presentations is quite tedious