@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
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
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
@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
@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.
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.
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
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
┌─────────────┬──────────────────────────────────────┐
│ Name │ Z-Wave Switch Mc │
│ Version │ 2022-09-01T18:46:10.49888026 │
└─────────────┴──────────────────────────────────────┘