[Edge Drivers] Issue with Zigbee Switch driver (status in the app)

i tried my zbmini the other day and its working fine now with either the stock edge driver or the mc edge driver.

the problem i had originally was when using the physical switch on the zbmini or a wired switch connected to s1 and s2 when they were switched on or off via the physican and the wired switch the status of the switch in the app was not changing .
thats working fine now dont know whats changed but it works great .

1 Like

I dont know so much about this. I just want to link my sonoff zbmini :sweat_smile:

Hi @Paul_Oliver, @montyfert, @Denz_Modz

Please can you try this test version zigbee Switch Mc-Test?

┌─────────────┬──────────────────────────────────────┐
│ Name        │ Zigbee Switch Mc-Test                │
│ Version     │ 2022-08-09T09:42:23.075092181        │
└─────────────┴──────────────────────────────────────┘

The on_off handler has been corrected so that it works well with true (1), false (0) values of the sonoff Mini, which devices send all the values as @Paul_Oliver devices and those that send only values 0 and 1.

I have tried with a Lidl switch, which does not have that problem and everything continues to work fine.

I hope it works well for sonoff mini too

If you can provide a log with on-off off-on changes we can see if the conversion from 0 to false and 1 to true is working. I put print mark to see it.

Hi @nayelyz

The only thing I did was add this code to the on_off default handler before emitting the event.

It should work for all switches.

If value.value == 1 then
  value.value = true
elseif value.value == 0 then
  value.value == false
end

local attr = capabilities.switch.switch
  device:emit_event_for_endpoint(zb_rx.address_header.src_endpoint.value, value.value and attr.on() or attr.off())
2 Likes

Mariano, Do you have a tutorial how i can do this? I’m not a prof in this stuff :sweat_smile: sorry

Hi @Denz_Modz

I could tell you but the other day I bothered to write you a step by step procedure so that you could solve your problem and reconnect your switch to a DTH and I did not receive any response from you.

I think the best thing I can do in this case is you search the forum for how to do it, it’s everywhere and it’s very easy.

Open the forum search and type: SmartThings Edge Device Drivers and it will show you the official tutorial and many more.

The invitation to my shared channel in case you want to use it

2 Likes

Hi!
Here are the instructions to accept a channel invitation and install drivers:

In the case of drivers created by Community members like the incredible @Mariano_Colmenarejo, you need to find the original post of their Release because there’s where they share the invitation link.

Please, let me know if you need help, you can send a DM as well.

1 Like

I switched 1of my ZBMinis over to your test driver and it seems to be working just fine.

I will try to get you logs later today.

1 Like

Zigbee Switch Mc-Test is working perfect! Thanks you verry much! Will it stay or will you delete this afther time? becuse it says ‘test’ . or will it keep working if i do not touch it? Thanks a lot.

1 Like

Hear are the ZBmini logs.

1 on & off using the app them 1 on & off using the physical switch. No problems noted.

2022-08-09T18:58:30.047261984+00:00 TRACE Zigbee Switch Mc-Test Received event with handler capability
2022-08-09T18:58:30.063692692+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received command: {“args”:{},“capability”:“switch”,“command”:“on”,“component”:“main”,“positional_args”:{}}
2022-08-09T18:58:30.066978775+00:00 TRACE Zigbee Switch Mc-Test Found CapabilityCommandDispatcher handler in Zigbee_Switch
2022-08-09T18:58:30.080851234+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:30.284267567+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:30.289222442+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, 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: 0x53, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x01, ZclStatus: SUCCESS > > >
2022-08-09T18:58:30.300048650+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:30.304568317+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, 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: 0x24, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: true > > > >
2022-08-09T18:58:30.313284025+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:30.316189317+00:00 INFO Zigbee Switch Mc-Test Executing ZclGlobalCommandHandler: cluster: OnOff, command: DefaultResponse
2022-08-09T18:58:30.319920567+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”}}
2022-08-09T18:58:30.331161109+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:30.339552900+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:30.344125984+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -59, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x23, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2022-08-09T18:58:30.353722359+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:30.356728984+00:00 INFO Zigbee Switch Mc-Test Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-08-09T18:58:30.359924692+00:00 PRINT Zigbee Switch Mc-Test value.value >>>>>>>>>>> true
2022-08-09T18:58:30.362767067+00:00 PRINT Zigbee Switch Mc-Test New value.value >>>>>>>>>>> true
2022-08-09T18:58:30.366027525+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“LQI: 255 … RSSI: -58 dBm”},“visibility”:{“displayed”:false}}
2022-08-09T18:58:30.382107567+00:00 PRINT Zigbee Switch Mc-Test <<<<<<< Power meter Timer >>>>> OFF
2022-08-09T18:58:30.389241234+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”}}
2022-08-09T18:58:30.399954067+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“power”,“capability_id”:“powerMeter”,“component_id”:“main”,“state”:{“unit”:“W”,“value”:80}}
2022-08-09T18:58:30.435294525+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:30.442244192+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:30.452535817+00:00 INFO Zigbee Switch Mc-Test Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-08-09T18:58:30.456308984+00:00 PRINT Zigbee Switch Mc-Test value.value >>>>>>>>>>> 1
2022-08-09T18:58:30.464162400+00:00 PRINT Zigbee Switch Mc-Test New value.value >>>>>>>>>>> true
2022-08-09T18:58:30.471773900+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“LQI: 255 … RSSI: -59 dBm”},“visibility”:{“displayed”:false}}
2022-08-09T18:58:30.489425567+00:00 PRINT Zigbee Switch Mc-Test <<<<<<< Power meter Timer >>>>> ON
2022-08-09T18:58:30.492730109+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”}}
2022-08-09T18:58:30.507655150+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“power”,“capability_id”:“powerMeter”,“component_id”:“main”,“state”:{“unit”:“W”,“value”:80}}
2022-08-09T18:58:30.532298984+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:30.536952900+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:32.742834817+00:00 TRACE Zigbee Switch Mc-Test Received event with handler capability
2022-08-09T18:58:32.763368067+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received command: {“args”:{},“capability”:“switch”,“command”:“off”,“component”:“main”,“positional_args”:{}}
2022-08-09T18:58:32.772382026+00:00 TRACE Zigbee Switch Mc-Test Found CapabilityCommandDispatcher handler in Zigbee_Switch
2022-08-09T18:58:32.786591234+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:32.903044567+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:32.908992817+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -59, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x25, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2022-08-09T18:58:32.968564734+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:32.971578109+00:00 INFO Zigbee Switch Mc-Test Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-08-09T18:58:32.982493359+00:00 PRINT Zigbee Switch Mc-Test value.value >>>>>>>>>>> 0
2022-08-09T18:58:33.019354942+00:00 PRINT Zigbee Switch Mc-Test New value.value >>>>>>>>>>> false
2022-08-09T18:58:33.035228651+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“LQI: 255 … RSSI: -59 dBm”},“visibility”:{“displayed”:false}}
2022-08-09T18:58:33.083562734+00:00 PRINT Zigbee Switch Mc-Test <<<<<<< Power meter Timer >>>>> ON
2022-08-09T18:58:33.108877651+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”}}
2022-08-09T18:58:33.155191484+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“power”,“capability_id”:“powerMeter”,“component_id”:“main”,“state”:{“unit”:“W”,“value”:0}}
2022-08-09T18:58:33.200239401+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“energy”,“capability_id”:“energyMeter”,“component_id”:“main”,“state”:{“unit”:“kWh”,“value”:0.0}}
2022-08-09T18:58:33.232307859+00:00 PRINT Zigbee Switch Mc-Test <<<<< Cancelando timer >>>>>
2022-08-09T18:58:33.246235984+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:33.252346484+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:33.256929817+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -59, body_length: 0x0005, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x55, ZCLCommandId: 0x0B >, < DefaultResponse || cmd: 0x00, ZclStatus: SUCCESS > > >
2022-08-09T18:58:33.273411234+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:33.278867067+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -59, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x26, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: false > > > >
2022-08-09T18:58:33.295457692+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:33.310204984+00:00 INFO Zigbee Switch Mc-Test Executing ZclGlobalCommandHandler: cluster: OnOff, command: DefaultResponse
2022-08-09T18:58:33.315610734+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”}}
2022-08-09T18:58:33.327890109+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:33.347489567+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:33.352252067+00:00 INFO Zigbee Switch Mc-Test Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-08-09T18:58:33.359519276+00:00 PRINT Zigbee Switch Mc-Test value.value >>>>>>>>>>> false
2022-08-09T18:58:33.362316609+00:00 PRINT Zigbee Switch Mc-Test New value.value >>>>>>>>>>> false
2022-08-09T18:58:33.365574067+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“LQI: 255 … RSSI: -59 dBm”},“visibility”:{“displayed”:false}}
2022-08-09T18:58:33.399376192+00:00 PRINT Zigbee Switch Mc-Test <<<<<<< Power meter Timer >>>>> OFF
2022-08-09T18:58:33.407321692+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”}}
2022-08-09T18:58:33.420620609+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:36.119352568+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:36.132515401+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -64, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x27, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2022-08-09T18:58:36.154971068+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:36.158085026+00:00 INFO Zigbee Switch Mc-Test Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-08-09T18:58:36.163214276+00:00 PRINT Zigbee Switch Mc-Test value.value >>>>>>>>>>> 1
2022-08-09T18:58:36.166240984+00:00 PRINT Zigbee Switch Mc-Test New value.value >>>>>>>>>>> true
2022-08-09T18:58:36.169671026+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“LQI: 255 … RSSI: -64 dBm”},“visibility”:{“displayed”:false}}
2022-08-09T18:58:36.181975693+00:00 PRINT Zigbee Switch Mc-Test <<<<<<< Power meter Timer >>>>> OFF
2022-08-09T18:58:36.185532026+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”}}
2022-08-09T18:58:36.197120026+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“power”,“capability_id”:“powerMeter”,“component_id”:“main”,“state”:{“unit”:“W”,“value”:80}}
2022-08-09T18:58:36.212127568+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:36.215947068+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:36.220681484+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -64, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x28, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: true > > > >
2022-08-09T18:58:36.229778651+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:36.233431568+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:36.236310776+00:00 INFO Zigbee Switch Mc-Test Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-08-09T18:58:36.239528984+00:00 PRINT Zigbee Switch Mc-Test value.value >>>>>>>>>>> true
2022-08-09T18:58:36.242442693+00:00 PRINT Zigbee Switch Mc-Test New value.value >>>>>>>>>>> true
2022-08-09T18:58:36.245769318+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“LQI: 255 … RSSI: -64 dBm”},“visibility”:{“displayed”:false}}
2022-08-09T18:58:36.255289026+00:00 PRINT Zigbee Switch Mc-Test <<<<<<< Power meter Timer >>>>> ON
2022-08-09T18:58:36.258570734+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“on”}}
2022-08-09T18:58:36.268016109+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“power”,“capability_id”:“powerMeter”,“component_id”:“main”,“state”:{“unit”:“W”,“value”:80}}
2022-08-09T18:58:36.277726818+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:40.846572485+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:40.855149652+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -60, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x29, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2022-08-09T18:58:40.874230693+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:40.878221527+00:00 INFO Zigbee Switch Mc-Test Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-08-09T18:58:40.881493443+00:00 PRINT Zigbee Switch Mc-Test value.value >>>>>>>>>>> 0
2022-08-09T18:58:40.884568735+00:00 PRINT Zigbee Switch Mc-Test New value.value >>>>>>>>>>> false
2022-08-09T18:58:40.888669610+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“LQI: 255 … RSSI: -60 dBm”},“visibility”:{“displayed”:false}}
2022-08-09T18:58:40.909284443+00:00 PRINT Zigbee Switch Mc-Test <<<<<<< Power meter Timer >>>>> ON
2022-08-09T18:58:40.913309193+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”}}
2022-08-09T18:58:40.925015568+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“power”,“capability_id”:“powerMeter”,“component_id”:“main”,“state”:{“unit”:“W”,“value”:0}}
2022-08-09T18:58:40.937311318+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“energy”,“capability_id”:“energyMeter”,“component_id”:“main”,“state”:{“unit”:“kWh”,“value”:0.0}}
2022-08-09T18:58:40.950886235+00:00 PRINT Zigbee Switch Mc-Test <<<<< Cancelando timer >>>>>
2022-08-09T18:58:40.956621443+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:40.960541402+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:58:40.965257610+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -59, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x2A, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Boolean, OnOff: false > > > >
2022-08-09T18:58:40.976138193+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:58:40.979098485+00:00 INFO Zigbee Switch Mc-Test Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-08-09T18:58:40.982293943+00:00 PRINT Zigbee Switch Mc-Test value.value >>>>>>>>>>> false
2022-08-09T18:58:40.985244527+00:00 PRINT Zigbee Switch Mc-Test New value.value >>>>>>>>>>> false
2022-08-09T18:58:40.988576902+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“LQI: 255 … RSSI: -59 dBm”},“visibility”:{“displayed”:false}}
2022-08-09T18:58:40.999184402+00:00 PRINT Zigbee Switch Mc-Test <<<<<<< Power meter Timer >>>>> OFF
2022-08-09T18:58:41.003543235+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”}}
2022-08-09T18:58:41.012462068+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled
2022-08-09T18:58:49.183276319+00:00 DEBUG Zigbee Switch Mc-Test driver device thread event handled
2022-08-09T18:59:08.009321238+00:00 TRACE Zigbee Switch Mc-Test Received event with handler zigbee
2022-08-09T18:59:08.073662155+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x5F6F, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -60, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x2B, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int8, OnOff: true > > > >
2022-08-09T18:59:08.104605280+00:00 TRACE Zigbee Switch Mc-Test Found ZigbeeMessageDispatcher handler in Zigbee_Switch
2022-08-09T18:59:08.114199071+00:00 INFO Zigbee Switch Mc-Test Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-08-09T18:59:08.136961988+00:00 PRINT Zigbee Switch Mc-Test value.value >>>>>>>>>>> 0
2022-08-09T18:59:08.150604905+00:00 PRINT Zigbee Switch Mc-Test New value.value >>>>>>>>>>> false
2022-08-09T18:59:08.164491988+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“LQI: 255 … RSSI: -60 dBm”},“visibility”:{“displayed”:false}}
2022-08-09T18:59:08.177049530+00:00 PRINT Zigbee Switch Mc-Test <<<<<<< Power meter Timer >>>>> OFF
2022-08-09T18:59:08.181083321+00:00 INFO Zigbee Switch Mc-Test <ZigbeeDevice: 8f2a9f23-5370-4144-b511-a698cd635321 [0x5F6F] (Sonoff ZBMini)> emitting event: {“attribute_id”:“switch”,“capability_id”:“switch”,“component_id”:“main”,“state”:{“value”:“off”}}
2022-08-09T18:59:08.199420363+00:00 DEBUG Zigbee Switch Mc-Test Sonoff ZBMini device thread event handled

Hi @Paul_Oliver,

It seems to be working fine, when on_off handler receives the value 0 or 1 it converts it to false and true respectively and emits the correct event.
in bold value.value >>>>>>>>>>> and New value.value >>>>>>>>>>>

Try it a little more and if it still works fine I’ll merge it with the zigbee Switch Mc driver.

Thanks for your help

@Denz_Modz,
I’m glad it works well for you.

Don’t worry, I will notify you when I merge it with the definitive Zigbee Switch Mc driver and then you will only have to make a driver change in the app device driver menu and you will not lose anything, name, automations and settings.

In any case, as long as you do not uninstall a driver from your hub, it does not matter if it is deleted from the channel, it will continue to work indefinitely.

1 Like

Ok, I will continue testing for a few days, and get back to you.

1 Like

Hi
Has something changed in the last few days with the stock driver for this device?

I have had the Sonoff ZBMini installed for a few weeks using the “Zigbee Switch” driver, which it automatically selected when pairing (2022-01-26), and it’s been working perfectly well, up until 2 days ago.

Now the device connectivity seems a bit random. Goes offline… When online it doesn’t always respond to on/off commands; when it does respond it doesn’t change in the app; control in the app indicates on/off but the device doesn’t respond…

(I haven’t found a consistent pattern yet)

Nothing else on my system has changed, just this device now seems sporadic.

Thanks

I would suggest using @Mariano_Colmenarejo “Zigbee Switch Mc” driver. It has been work great for months,

@Paul_Oliver is right, @Hendo25. The issue is that the device is sending unexpected values by the default libraries which are according to the Zigbee cluster specification.
So, for now, you should use the custom driver. The team is checking more details about the device and the issue to see what they can do.
Once we get more info, we’ll let you know.

ive had a smarthings plug running fine for a while on the dth today i changed it over to edge , bad idea
it shows up as a lds plug
the power meter bit is useless the fan its connected has two speeds on first speed power meter eventually gets to 14w
on second speed power meter still at 14w turn the fan off physically still 14w.

It has been around 5 days and my ZBMini continues to work fine with your “zigbee Switch Mc-Test” driver. So it should be safe to merge it.

2 Likes

Thanks @Paul_Oliver

Driver modified for switch zigbee Sonoff Mini in this driver version

┌─────────────┬──────────────────────────────────────┐
│ Name        │ Zigbee Switch Mc                     │
│ Version     │ 2022-08-14T14:06:16.674806212        │
└─────────────┴──────────────────────────────────────┘

In a few days I will delete the driver Test version of the channel

1 Like

So I have been having this issue that my zbmini always reports as turned on when using the physical switch. I added your firmware, but when I want to change the firmware in the smartthings app, I only get a white screen when I click your firmware.
Do you have any idea what is going wrong?