[Edge drivers] Issue with stock Z-Wave Switch driver (Fibaro single switch)

Hi @Mariano_Colmenarejo ,
I’m updating from @omergranot88 that your version WORK WELL !!
Thank you so much.
Also, I’m sending the following picture of Fibaro Switch Single module, that show that Omer connected the mechanical switch to S1

@nayelyz , Mariano asked me to inform you that ST edge driver (not his driver) need to be fixed in order to display the correct status when Fibaro Switch Single module is controlled via a mechanical switch connected to S1, no problems when controlling via ST app., See also the log file that @omergranot88 attached as link. In the log the mechanical switch moved to ON and OFF but nothing emitted. Done with the un-fixed version driver made be @Mariano_Colmenarejo .

1 Like


I’m glad it works.

I will add the buttons 1 and 2 to the profile so that the scenes from S1 and S2 can be used, if any user needs it

Tell to @omergranot88 to strip a smaller length of the wire, so that the copper is not exposed and can cause a short circuit. especially wires N (neutral) and Q (Switched Output) that are very near


Hi, @Mariano_Colmenarejo, @dotan_shai

Can you provide more context about why the device is sending the source channel of 1?
I see here it’s only including the channel 0:

Did it use to work correctly using a DTH?

Ho @nayelyz

This is the log with my driver, but is the same with stock driver. Switch Binary report received with src_channel=1 for S1 on-off commands from real device.

S2 is only used for send scenes and must be src_channel=2.


The handler for Central scene notification won’t work either since scenes send with src_channel 1 and 2, for S1 and S2.

It wouldn’t work with button.defaults either since the profile only has a button capability in the main component. It would need 2 button capabilities in two additional components and modify the code
instead of the defaults.

This stock driver handler does not work

local function central_scene_notification_handler(self, device, cmd)
  if cmd.src_channel == nil or cmd.src_channel == 0 then
    ButtonDefaults.zwave_handlers[cc.CENTRAL_SCENE][CentralScene.NOTIFICATION](self, device, cmd)

I have it made for the fibaro double switch, which would work the same for the scenes S1 and S2, adding to profile the button1 and button2 components and delete button capability in main component

local function central_scene_notification_handler(self, device, cmd)
  local map_key_attribute_to_capability = {
    [CentralScene.key_attributes.KEY_PRESSED_1_TIME] = capabilities.button.button.pushed,
    [CentralScene.key_attributes.KEY_RELEASED] = capabilities.button.button.held,
    [CentralScene.key_attributes.KEY_HELD_DOWN] = capabilities.button.button.down_hold,
    [CentralScene.key_attributes.KEY_PRESSED_2_TIMES] = capabilities.button.button.double,
    [CentralScene.key_attributes.KEY_PRESSED_3_TIMES] = capabilities.button.button.pushed_3x

  local event = map_key_attribute_to_capability[cmd.args.key_attributes]
  local button_number = cmd.args.scene_number

  local component = device.profile.components["button" .. button_number]

  if component ~= nil then
    device:emit_component_event(component, event({state_change = true}))

Activating scenes

The Switch 2 can activate scenes in the Z-Wave controller by sending scene ID and attribute of a specific action using Central Scene Command Class.
By default scenes are not activated, set parameters 28 and 29 to enable scene activation for selected actions.

Switch Action Scene ID Attribute
Switch connected to S1 terminal
Switch clicked once 1 Key Pressed 1 time
Switch clicked twice 1 Key Pressed 2 times
Switch clicked thrice 1 Key Pressed 3 times
Switch held 1 Key Held Down
Switch released 1 Key Released
Switch connected to S2 terminal
Switch clicked once 2 Key Pressed 1 time
Switch clicked twice 2 Key Pressed 2 times
Switch clicked thrice 2 Key Pressed 3 times
Switch held 2 Key Held Down
Switch released 2 Key Released
1 Like

Hi @Mariano_Colmenarejo @dotan_shai @omergranot88 a PR was created please, can you check if this solves the issue? CHAD-10802 Fibaro Single Switch: Handle reports from all endpoints by greens · Pull Request #726 · SmartThingsCommunity/SmartThingsEdgeDrivers · GitHub

Hi @AlejandroPadilla

I don’t have a device to test, but I see:

  • The Central_scenes handlers that emitted values to the buttons with the scenes sent by the device have been removed from the subdriver.

But in addition, they leave the device assigned to a “switch-button-power-energy.yml” profile, which has a button for S1 scene events and has the settings in preferences to activate and configure the scenes for S1 and S2.
This will generate the error in the app: “the device has not updated all the capabilities values, nor will it”

At first edge was assigning the profile “switch-1-button-6-power-energy.yml” which had 6 buttons to emit scene events for S1 and S2 as the official groovy DTH. This profile is still in the driver without any use.

Some user will not be very happy to lose these functions that they had in groovy

1 Like