Hi @Mariano_Colmenarejo ,
I’m updating from @omergranot88that 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 .
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
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)
end
end
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}))
end
end
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.
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