(EDGE Driver-Mc): Zigbee Drivers for Motion, Open/Close, Moisture, Smoke-Co Sensors and others Devices

@troy_owens,

Added theses fingerprints for zigbee motion sensor MC and zigbee switch power Mc

zigbeeGeneric:
  - id: "outletv4"
    deviceLabel: "Zigbee SmartTings outletv4"
    zigbeeProfiles:
      - 0x0104
    deviceIdentifiers:
      - 0x0002
    clusters:
      server:
        - 0x0000
        - 0x0003
        - 0x0004
        - 0x0005
        - 0x0006
        - 0x0009
        - 0x000F
        - 0x0B04
      client:
        - 0x0019
    deviceProfileName: power-meter
zigbeeGeneric:
  - id: "motionv5"
    deviceLabel: "Zigbee SmartTings motionv5"
    zigbeeProfiles:
      - 0x0104
    deviceIdentifiers:
      - 0x0402
    clusters:
      server:
        - 0x0000
        - 0x0001
        - 0x0003
        - 0x000F
        - 0x0020
        - 0x0402
        - 0x0500
      client:
        - 0x0019
    deviceProfileName: motion-temp-battery

Tried what you suggested… Same behavior

I Think @Paul_Oliver have same problem with sonoff mini but the ewelinks works fine for mi and others user.
Sorry, I do not what happend!

@troy_owens
Try to re-add eWelink again. I had issue with only one plug, and after reinstall, work fine

I have 3 eWeLink switches, and Ikea plug working with the driver, and I am not have any issues.

But I can NOT get a Sonoff Mini to work correctly with this driver. I have deleted and reinstalled it at least 3 times.

I could implement this function in the future when I’m done with other things I’m doing, but I don’t have RGb or RGBW zigbee bulbs to debug it.

1 Like

In cases where the device is added but doesn’t work correctly, it would be useful that you checked the Hub logs to see if there was an error during the pairing of the device.

Here are the instructions to enable them:

I already have the CLI installed. Do you want logs of it joining, and/or turning it on and off?

Agree,

but do not put them with developer format giving </> that the mobile browser crashes

Logs showing adding the sonoff mini. Device is called “Sonoff Switch” when added.

2021-11-04T20:44:10.217358574+00:00 TRACE Zigbee Switch Mc Received event with handler device_lifecycle
2021-11-04T20:44:10.233024283+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received lifecycle event: added
2021-11-04T20:44:10.245206116+00:00 TRACE Zigbee Switch Mc Received event with handler device_lifecycle
2021-11-04T20:44:10.248537116+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received lifecycle event: doConfigure
2021-11-04T20:44:10.254153741+00:00 TRACE Zigbee Switch Mc Found DeviceLifecycleDispatcher handler in Zigbee_Switch
2021-11-04T20:44:10.257294783+00:00 TRACE Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received unhandled lifecycle event: added
2021-11-04T20:44:10.260651783+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:44:10.265857074+00:00 TRACE Zigbee Switch Mc Found DeviceLifecycleDispatcher handler in Zigbee_Switch
2021-11-04T20:44:10.268938366+00:00 TRACE Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received unhandled lifecycle event: init
2021-11-04T20:44:10.272254408+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:44:10.277129574+00:00 TRACE Zigbee Switch Mc Found DeviceLifecycleDispatcher handler in Zigbee_Switch
2021-11-04T20:44:10.280611741+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T20:44:10.285282866+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xC924, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2021-11-04T20:44:10.311127658+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xC924, dest_endpoint: 0x01, profile: 0x0000, cluster: 0x0021 >, < ZDOMessageBody || < ZDOHeader || seqno: 0x00 >, < BindRequest || src_address: 847127FFFE281752, src_endpoint: 0x01, cluster: OnOff, dest_addr_mode: 0x03, dest_address: D052A8A36DA80001, dest_endpoint: 0x01 > > >
2021-11-04T20:44:10.324296616+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xC924, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x06 >, < ConfigureReporting || < AttributeReportingConfiguration || direction: 0x00, attr_id: 0x0000, DataType: Boolean, minimum_reporting_interval: 0x0000, minimum_reporting_interval: 0x012C > > > >
2021-11-04T20:44:10.335061199+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:44:10.354643741+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:44:10.363023241+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:44:10.373248616+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0008, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x1D, ZCLCommandId: 0x01 >, < ReadAttributeReponse || < AttributeRecord || AttributeId: 0x0000, ZclStatus: SUCCESS, DataType: Boolean, OnOff: false > > > >
2021-11-04T20:44:10.510926075+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:44:10.514290075+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:44:10.518060533+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”},“attribute_id”:“switch”}
2021-11-04T20:44:10.528231366+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:44:10.532044116+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:44:10.537613783+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x00, dest_addr: 0x0000, dest_endpoint: 0x00, profile: 0x0000, cluster: 0x8021 >, lqi: 0xFF, rssi: -58, body_length: 0x0002, < ZDOMessageBody || < ZDOHeader || seqno: 0x2F >, < BindRequestResponse || status: 0x00 > > >
2021-11-04T20:44:10.596508866+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:44:10.602334116+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:44:10.642081158+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -58, body_length: 0x0004, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x1E, ZCLCommandId: 0x07 >, < ConfigureReportingReponse || ZclStatus: SUCCESS > > >
2021-11-04T20:44:10.658173033+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:44:10.661850575+00:00 TRACE Zigbee Switch Mc Received event with handler device_lifecycle
2021-11-04T20:44:10.671537700+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received lifecycle event: infoChanged
2021-11-04T20:44:10.675721866+00:00 TRACE Zigbee Switch Mc Found DeviceLifecycleDispatcher handler in Zigbee_Switch
2021-11-04T20:44:10.678883158+00:00 PRINT Zigbee Switch Mc device.preferences[infoChanged]= 1.0
2021-11-04T20:44:10.682860825+00:00 PRINT Zigbee Switch Mc << Preference changed: name, old, new >> randomMin nil 1.0
2021-11-04T20:44:10.686279033+00:00 PRINT Zigbee Switch Mc device.preferences[infoChanged]=
2021-11-04T20:44:10.689670950+00:00 PRINT Zigbee Switch Mc << Preference changed: name, old, new >> version nil
2021-11-04T20:44:10.693055741+00:00 PRINT Zigbee Switch Mc device.preferences[infoChanged]= 0
2021-11-04T20:44:10.696279116+00:00 PRINT Zigbee Switch Mc << Preference changed: name, old, new >> localTimeOffset
nil 0
2021-11-04T20:44:10.699631700+00:00 PRINT Zigbee Switch Mc device.preferences[infoChanged]= Switch
2021-11-04T20:44:10.703126075+00:00 PRINT Zigbee Switch Mc << Preference changed: name, old, new >> changeProfile nil Switch
2021-11-04T20:44:10.711131908+00:00 PRINT Zigbee Switch Mc device.preferences[infoChanged]= 10.0
2021-11-04T20:44:10.714648158+00:00 PRINT Zigbee Switch Mc << Preference changed: name, old, new >> randomMax nil 10.0
2021-11-04T20:44:10.718036116+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
listening for logs…

Logs operating the switch. This time the switch seems to be working ok.

2021-11-04T20:45:42.685368101+00:00 TRACE Zigbee Switch Mc Received event with handler capability
2021-11-04T20:45:42.691302393+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received command: {“component”:“main”,“positional_args”:,“command”:“on”,“args”:,“capability”:“switch”}
2021-11-04T20:45:42.694585851+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T20:45:42.709940893+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:42.771885518+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:42.781490976+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x25, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x01, ZclStatus: SUCCESS > > >
2021-11-04T20:45:42.802272768+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:42.806569143+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:42.811496726+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -58, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x4D, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: true > > > >
2021-11-04T20:45:42.826093309+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:45:42.830561226+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:45:42.834342268+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”},“attribute_id”:“switch”}
2021-11-04T20:45:42.847515893+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:42.850663934+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:42.855489476+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -58, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x4C, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2021-11-04T20:45:42.868775184+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:45:42.871943559+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:45:42.875737184+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”},“attribute_id”:“switch”}
2021-11-04T20:45:42.885160476+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:44.742792560+00:00 TRACE Zigbee Switch Mc Received event with handler capability
2021-11-04T20:45:44.757445935+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received command: {“component”:“main”,“positional_args”:,“command”:“off”,“args”:,“capability”:“switch”}
2021-11-04T20:45:44.761055643+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T20:45:44.767866018+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:44.842556101+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:44.852675560+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x4E, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2021-11-04T20:45:44.866305018+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:45:44.869473351+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:45:44.873475560+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”},“attribute_id”:“switch”}
2021-11-04T20:45:44.890909643+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:44.900512726+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:44.906505435+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x26, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x00, ZclStatus: SUCCESS > > >
2021-11-04T20:45:44.919589101+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:44.922856268+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:44.928204435+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x4F, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: false > > > >
2021-11-04T20:45:44.941398893+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:45:44.944560518+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:45:44.948722601+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”},“attribute_id”:“switch”}
2021-11-04T20:45:44.958553310+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:46.106051768+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee health poll
2021-11-04T20:45:46.778581435+00:00 TRACE Zigbee Switch Mc Received event with handler capability
2021-11-04T20:45:46.784181227+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received command: {“component”:“main”,“positional_args”:,“command”:“on”,“args”:,“capability”:“switch”}
2021-11-04T20:45:46.787806768+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T20:45:46.795356018+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:46.882769602+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:46.888735227+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -58, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x50, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2021-11-04T20:45:46.914414852+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:45:46.918226977+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:45:46.925795227+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”},“attribute_id”:“switch”}
2021-11-04T20:45:46.936703935+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:46.941251810+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:46.946138977+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -58, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x27, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x01, ZclStatus: SUCCESS > > >
2021-11-04T20:45:46.958138185+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:46.961535852+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:46.967317018+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -58, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x51, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: true > > > >
2021-11-04T20:45:46.979741268+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:45:46.982886810+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:45:46.986691435+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”},“attribute_id”:“switch”}
2021-11-04T20:45:46.995321310+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:47.611771852+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:47.616842810+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x52, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2021-11-04T20:45:47.631205602+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:45:47.634264393+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:45:47.638516768+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”},“attribute_id”:“switch”}
2021-11-04T20:45:47.647196810+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:49.008338852+00:00 TRACE Zigbee Switch Mc Received event with handler capability
2021-11-04T20:45:49.021002435+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received command: {“component”:“main”,“positional_args”:,“command”:“off”,“args”:,“capability”:“switch”}
2021-11-04T20:45:49.024558019+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T20:45:49.041229227+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:49.101962935+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:49.107073477+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -56, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x53, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2021-11-04T20:45:49.120111935+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:45:49.123282477+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:45:49.127134477+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”},“attribute_id”:“switch”}
2021-11-04T20:45:49.152048977+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:49.156653769+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:49.161627227+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x28, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x00, ZclStatus: SUCCESS > > >
2021-11-04T20:45:49.176720602+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:45:49.180220852+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:45:49.186172519+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x54, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: false > > > >
2021-11-04T20:45:49.199467602+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:45:49.202603060+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:45:49.206455185+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”},“attribute_id”:“switch”}
2021-11-04T20:45:49.216580269+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
listening for logs…

Logs of me trying to operate the switch with the it locked up

2021-11-04T20:48:27.922224425+00:00 TRACE Zigbee Switch Mc Received event with handler capability
2021-11-04T20:48:27.927948187+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received command: {“component”:“main”,“positional_args”:,“command”:“off”,“args”:,“capability”:“switch”}
2021-11-04T20:48:27.931238666+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T20:48:27.938281643+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:48:28.053025450+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:48:28.058008916+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x2B, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x00, ZclStatus: SUCCESS > > >
2021-11-04T20:48:28.071051891+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:48:28.074273654+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:48:28.080671037+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x59, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2021-11-04T20:48:28.094572416+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:48:28.097604858+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:48:28.101818750+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”},“attribute_id”:“switch”}
2021-11-04T20:48:28.111479792+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:48:35.532703240+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:48:35.540225643+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: e925932a-c728-4deb-8d00-4e6ad568f1fe [0x3DAB] (Outside Plugs)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x3DAB, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0xFF, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -25, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x0C, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: false > > > >
2021-11-04T20:48:35.561551142+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:48:35.565902757+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:48:35.570466515+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: e925932a-c728-4deb-8d00-4e6ad568f1fe [0x3DAB] (Outside Plugs)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”},“attribute_id”:“switch”}
2021-11-04T20:48:35.582069502+00:00 DEBUG Zigbee Switch Mc Outside Plugs device thread event handled
2021-11-04T20:48:46.144878971+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee health poll
2021-11-04T20:48:50.573773347+00:00 TRACE Zigbee Switch Mc Received event with handler capability
2021-11-04T20:48:50.578615389+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received command: {“component”:“main”,“positional_args”:,“command”:“off”,“args”:,“capability”:“switch”}
2021-11-04T20:48:50.581966389+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T20:48:50.588501430+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:48:50.703099139+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:48:50.707785639+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x2D, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x00, ZclStatus: SUCCESS > > >
2021-11-04T20:48:50.720059555+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:48:50.723779305+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:48:50.730270472+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x5A, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2021-11-04T20:48:50.743792847+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:48:50.746739889+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:48:50.750847972+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”},“attribute_id”:“switch”}
2021-11-04T20:48:50.760530222+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
listening for logs…

The pairing seems correct.
It has been configured with the default values of the report on-off in min = 0 and max = 12c (300 sec).

The response to the configuration has been success.
Has sent initial state = Off

The lifecycle infoChanged has compared the received preferences, with their default values, and the values stored in permanent memory = nil.
The next time infoChanged is run it will detect any preferences that have changed.

1 Like

In theses logs when it seems to work well, I see that for a Received “on” command, 2 messages are received with the status “True” and two events are issued with the value = “On”.

In the logs when it seems to work well, I see that for a Received “off” command, 1 messages are received with the status “True” and an event is issued with the value = “On” and then a message is received with status = " False “and an event with value =” Off ".
This is a bit weird.

These commands and responses are executed by the defualt libraries.
In the driver do not have Capability_Handlers to handle the On-Off commands

---- Driver template config
local zigbee_switch_driver_template = {
  supported_capabilities = {
    capabilities.switch,
    random_On_Off,
    random_Next_Step,
    capabilities.refresh
  },
  lifecycle_handlers = {
    infoChanged = random.do_Preferences
  },
  capability_handlers = {
    [random_On_Off.ID] = {
      [random_On_Off.commands.setRandomOnOff.NAME] = random.random_on_off_handler,
    },
  },
}
-- run driver
defaults.register_for_default_handlers(zigbee_switch_driver_template, zigbee_switch_driver_template.supported_capabilities)
local zigbee_switch = ZigbeeDriver("Zigbee_Switch", zigbee_switch_driver_template)
zigbee_switch:run()

In one switch mine that works well emit two events for “on” and two events for “off”

2021-11-04T21:39:33.763893256+00:00 TRACE Zigbee Switch Mc Received event with handler capability
2021-11-04T21:39:33.772416923+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> received command: {“positional_args”:,“command”:“on”,“args”:,“component”:“main”,“capability”:“switch”}
2021-11-04T21:39:33.779081589+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T21:39:33.801345589+00:00 DEBUG Zigbee Switch Mc Extensor de Red device thread event handled
2021-11-04T21:39:33.886894923+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T21:39:33.895748590+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x463C, src_endpoint: 0x0B, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -34, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0x41, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff:
true > > > >

2021-11-04T21:39:33.919006256+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T21:39:33.924803923+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T21:39:33.932694923+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“attribute_id”:“switch”,“state”:{“value”:“on”}}
2021-11-04T21:39:33.954300923+00:00 DEBUG Zigbee Switch Mc Extensor de Red device thread event handled
2021-11-04T21:39:33.960048256+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T21:39:33.970767923+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x463C, src_endpoint: 0x0B, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -34, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x1A, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x01, ZclStatus: SUCCESS > > >
2021-11-04T21:39:33.990769256+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T21:39:33.997975923+00:00 INFO Zigbee Switch Mc Executing ZclGlobalCommandHandler: cluster: OnOff, command: DefaultResponse
2021-11-04T21:39:34.005189590+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“attribute_id”:“switch”,“state”:{“value”:“on”}}
2021-11-04T21:39:34.021114256+00:00 DEBUG Zigbee Switch Mc Extensor de Red device thread event handled
2021-11-04T21:39:37.250875591+00:00 TRACE Zigbee Switch Mc Received event with handler capability
2021-11-04T21:39:37.272525591+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> received command: {“positional_args”:,“command”:"off",“args”:,“component”:“main”,“capability”:“switch”}
2021-11-04T21:39:37.279156258+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T21:39:37.301781258+00:00 DEBUG Zigbee Switch Mc Extensor de Red device thread event handled
2021-11-04T21:39:37.357600258+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T21:39:37.370704924+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x463C, src_endpoint: 0x0B, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -35, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x1B, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x00, ZclStatus: SUCCESS > > >
2021-11-04T21:39:37.390892258+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T21:39:37.396750591+00:00 INFO Zigbee Switch Mc Executing ZclGlobalCommandHandler: cluster: OnOff, command: DefaultResponse
2021-11-04T21:39:37.404237591+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“attribute_id”:“switch”,“state”:{“value”:“off”}}
2021-11-04T21:39:37.427662925+00:00 DEBUG Zigbee Switch Mc Extensor de Red device thread event handled
2021-11-04T21:39:37.434550258+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T21:39:37.443245925+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x463C, src_endpoint: 0x0B, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -36, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0x42, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff:
false > > > >

2021-11-04T21:39:37.464628258+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T21:39:37.470182591+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T21:39:37.477468591+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: b183b490-473a-4849-88f8-e77f92bcf1b1 [0x463C] (Extensor de Red)> emitting event: {“capability_id”:“switch”,“component_id”:“main”,“attribute_id”:“switch”,“state”:{“value”:“off”}}

UPDATED: In the logs when it seems to be working wrong, I see that for a Received “off” command, 1 messages are received with the status “True” and emit one event with the value = “On”

This is a bit weird.

Will the switch not have a configuration to work changing state for each command received?

When the Sonoff Mini is NOT working, what I see in the app is that the light is ON, but the light is actually turned OFF. On the detail page if push the on/off button it flashes OFF for a fraction of a second, and the dots spin for a while and the app continues to show ON.

If I operate the dumb switch attached to the Sonoff Mini if resets everything. I can then operate the Mini from the app or an automation for between 1 and 20 cycles before it locks up again.

I just let it sit for 1-1/2 hrs. while I was out and the Mini reset itself. I was than able to cycle it 3 time before it locked up again.

@Mariano_Colmenarejo

The Sonoff Mini work great with the stock “ZigBee switch” DTH

There is an error when analyzing the logs, these last message and “off” event are from another device: (Outside Plugs):

One command “Off” emit one event “On”

2021-11-04T20:48:27.922224425+00:00 TRACE Zigbee Switch Mc Received event with handler capability
2021-11-04T20:48:27.927948187+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received command: {“component”:“main”,“positional_args”:, “command”:“off ”,“args”:,“capability”:“switch”}
2021-11-04T20:48:27.931238666+00:00 TRACE Zigbee Switch Mc Found CapabilityCommandDispatcher handler in Zigbee_Switch
2021-11-04T20:48:27.938281643+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:48:28.053025450+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:48:28.058008916+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x2B, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x00, ZclStatus: SUCCESS > > >
2021-11-04T20:48:28.071051891+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:48:28.074273654+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:48:28.080671037+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xC924, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -57, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x59, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2021-11-04T20:48:28.094572416+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:48:28.097604858+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:48:28.101818750+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0xC924] (SONOFF Switch)> emitting event: {“capability_id”:“switch”,“component_id”:“main” ,“state”:{“value”:“on”}, “attribute_id”:“switch”}

2021-11-04T20:48:28.111479792+00:00 DEBUG Zigbee Switch Mc SONOFF Switch device thread event handled
2021-11-04T20:48:35.532703240+00:00 TRACE Zigbee Switch Mc Received event with handler zigbee
2021-11-04T20:48:35.540225643+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: e925932a-c728-4deb-8d00-4e6ad568f1fe [0x3DAB] (Outside Plugs)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x3DAB, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0xFF, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -25, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x0C, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: false > > > >
2021-11-04T20:48:35.561551142+00:00 TRACE Zigbee Switch Mc Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2021-11-04T20:48:35.565902757+00:00 INFO Zigbee Switch Mc Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2021-11-04T20:48:35.570466515+00:00 INFO Zigbee Switch Mc <ZigbeeDevice: e925932a-c728-4deb-8d00-4e6ad568f1fe [0x3DAB] (Outside Plugs)> emitting event: {“capability_id”:“switch”,“component_id”:“main” ,“state”:{“value”:“off”} ,“attribute_id”:“switch”}

Well, I think it should also work fine with the zigbee switch driver with default libraries.

Hi @troy_owens,

Were these devices paired and did they work?

Thanks Mariano
Your driver for the light bulb is awesome .Both the ikea light bulb and third reality motion sensor are working great.

I Have 5 sonoff motion sensor 3 pair with your driver , 2 of them wont pair show up as a thing . The only difference in the ide is the model , those 2 that they are not working is listed a model : 66666 the other 3 working one is model : MS01 .

Can you add model 66666 to the fingerprint ?

Also have the Sonoff SNZB-04 pair but after one day they show up as offline if the sensor as not been trigger . When the sensor is offline , i just have to open closed the door and the sensor show up online .

Any plan ta integrated the aqara motion and door sensor too ?
Thanks Sylvain