[Edge drivers] MCO Home switch MH-S311, MH-S312 & MH-S314

Hi,

Sorry, I don’t understand what you mean by this.
Don’t you have the light bulbs connected to the physical switch?

The driver only interrogates the device when the switch is turned on or off from the app in order to emit the status that the device has after the On or Off command sent.

When On or Off is pressed on the physical device, the driver is completely passive until the device informs it of the command it has performed. At that moment driver processes the message and emit the on or off status that the device has sent.

If the message takes time to reach the driver, it may be the fault of your Zwave network, it may be saturated or there may be a device connection problem or hub memory overload

Dear Mariano,

Sorry for the late reply, but yes, there are no physical lights connected to the switch. I’m just using it as a way to control 4 separate lights through the software

Hi @Mariano_Colmenarejo
Can you help to add this fingerprint to the driver. Thank you.

015F-7041-7103

Hi @Mariano_Colmenarejo
I manage to assign your β€œz-wave switch and child mc” but the it just come out as single switch instead of 4 separate switch. The single switch only control the first output on the switch.

The device info are as follow



Hi @zamir_amran

Added to this driver version

───────────────────────────────────────────────────
 Name         Z-Wave Switch and Child Mc
 Version      2023-11-22T12:06:50.82700983
───────────────────────────────────────────────────
- id: 015F/7041/7103
    deviceLabel: WYFY Switch 4
    manufacturerId: 0x015F
    productType: 0x7041
    productId: 0x7103
    deviceProfileName: switch-multicomponent-4
1 Like

@Mariano_Colmenarejo , a good day to you.

I followed this thread to create a custom driver for my MCO Home 4 gang switch as I had the same device as Zamir, however, it was not working.

Instead, when I load your driver, https://api.smartthings.com/invitation-web/accept?id=6b68563b-1905-4654-8d2b-e677a2997424
I was able to get 75% working. What I meant is that 4 child Switches appear and each control the endpoint of the Switch panel correctly. However, the main switch that control all the child switches did not appear.

Can I know which part of the code did you modify base on z-wave switch folder in the github to make it work 75% ? I would like to create a custom driver for a few of my installations at my customer site.

Hope to hear from you soon.

Many thanks !
Aik Hong

Main switch does not control all switches, it only controls switch 1.

If you mean modifying the smartthing beta driver then:

  • you have to add the fingerprints of your device in the fingerprints.yml file and assign the switch-multicomponent-4 profile, just like Zamir.
- id: 015F/7041/7103
    deviceLabel: WYFY Switch 4
    manufacturerId: 0x015F
    productType: 0x7041
    productId: 0x7103
    deviceProfileName: switch-multicomponent-4
  • In the β€œmulti-metering-switch” subdriver add the fingerprints of your device in the table: MULTI_METERING_SWITCH_FINGERPRINTS
local MULTI_METERING_SWITCH_FINGERPRINTS = {
  {mfr = 0x0086, prod = 0x0003, model = 0x0084}, -- Aeotec Nano Switch 1
  {mfr = 0x0086, prod = 0x0103, model = 0x0084}, -- Aeotec Nano Switch 1
  {mfr = 0x0086, prod = 0x0203, model = 0x0084}, -- AU Aeotec Nano Switch 1
  {mfr = 0x027A, prod = 0xA000, model = 0xA004}, -- Zooz ZEN Power Strip 1
  {mfr = 0x015F, prod = 0x3102, model = 0x0201}, -- WYFY Touch 1-button Switch
  {mfr = 0x015F, prod = 0x3102, model = 0x0202}, -- WYFY Touch 2-button Switch
  {mfr = 0x015F, prod = 0x3102, model = 0x0204}, -- WYFY Touch 4-button Switch
  {mfr = 0x015F, prod = 0x3111, model = 0x5102}, -- WYFY Touch 1-button Switch
  {mfr = 0x015F, prod = 0x3121, model = 0x5102}, -- WYFY Touch 2-button Switch
  {mfr = 0x015F, prod = 0x3141, model = 0x5102} -- WYFY Touch 4-button Switch
}

I think this should work and create 1 main device and 3 child devices

Hi

If I want to create 1 main device and 4 child devices, instead of 1 main device and 3 child device, how shall I go about changing the code ?

Also, if my model is 0x5103, does that mean in the fingerprints.yml file, I shall do this :

  • id: 015F/7041/5103
    deviceLabel: WYFY Switch 4
    manufacturerId: 0x015F
    productType: 0x3141
    productId: 0x5103
    deviceProfileName: switch-multicomponent-4

IN the Multi-metering-switch, shall it be this way :
local MULTI_METERING_SWITCH_FINGERPRINTS = {
{mfr = 0x0086, prod = 0x0003, model = 0x0084}, – Aeotec Nano Switch 1
{mfr = 0x0086, prod = 0x0103, model = 0x0084}, – Aeotec Nano Switch 1
{mfr = 0x0086, prod = 0x0203, model = 0x0084}, – AU Aeotec Nano Switch 1
{mfr = 0x027A, prod = 0xA000, model = 0xA004}, – Zooz ZEN Power Strip 1
{mfr = 0x015F, prod = 0x3102, model = 0x0201}, – WYFY Touch 1-button Switch
{mfr = 0x015F, prod = 0x3102, model = 0x0202}, – WYFY Touch 2-button Switch
{mfr = 0x015F, prod = 0x3102, model = 0x0204}, – WYFY Touch 4-button Switch
{mfr = 0x015F, prod = 0x3111, model = 0x5103}, – WYFY Touch 1-button Switch
{mfr = 0x015F, prod = 0x3121, model = 0x5103}, – WYFY Touch 2-button Switch
{mfr = 0x015F, prod = 0x3141, model = 0x5103} – WYFY Touch 4-button Switch
}

The driver only creates as many child devices as the device has endpoints. Since the device only has 4 endpoints, it creates 1 main device and 3 secondary devices.

You can create a virtual device or a group of lights and a routine to turn on and another routine to turn off the 4 devices

1 Like

@AikHong

Sorry, You need modify this table too, in the multi_metering_switch_configurations.lua file, in subdriver multi-metering-switch to add the product_ids 0x5103 to child profile type

WYFY_TOUCH_4_1 = {
    MATCHING_MATRIX = {
      mfrs = 0x015F,
      product_types = 0x3141,
      product_ids = {0x5102, 0x5103}
    },
    CONFIGURATION = {
      child_switch_device_profile = "switch-binary"
    }
  }

And modify this table in configurations.lua to add 0x5103 product_ids

WYFY_TOUCH = {
    MATCHING_MATRIX = {
      mfrs = 0x015F,
      product_types = {0x3102, 0x3111, 0x3121, 0x3141},
      product_ids = {0x0201, 0x0202, 0x0204, 0x5102, 0x5103}
    },
    CONFIGURATION = {
      {parameter_number = 2, size = 1, configuration_value = 1}
    }
  },

@Mariano_Colmenarejo

Thanks for all the pointers ! Let me try it out and update you with the result. Hopefully it will work.

1 Like

@Mariano_Colmenarejo
Thanks for all the help and advice, working well now. had 4 child switches that can control each light individually, however, there is no Master switch to turn all ON/OFF. Hence I used routine to do an all ON/OFF, which is not a big issue.
Cheers !

3 Likes