Troubleshooting Sonoff ZBMINIL2: Peculiar Switching Behavior

Does the button lock on and off?

i.e. Button pushed and the contact is made and stays made.
Push button again and the contact is broken.

1 Like

First disconnect everything from S1 and S2 and test the switch operation.

1 Like

Each time the switch is switched (either on or off) it will change the on/off state of the module.

1 Like

Yes exactly. If clicked once it's on and stays on. Then once clicked again it's off and stays off. With a relay like that I can have more than one switches on several buildings for the same light.

In that case I suggest you connect the button as per the diagram I posted above.

1 Like

I prefer the S1/S2 method also, but the device should work either way.

1 Like

@dylan.c @bobbles @user4286 thanks so much for your replies :pray: I can't manage to make it work. The reason is because I have two buttons and the cabling is a bit complicated. I tried everything and burned two mini sonoff. I will do some changes and will come back again with the results.
Sorry for the late reply.
Thanks so much for trying to help me. I really appreciate that.
All the best to you all
Yiannis

2 Likes

Hi everyone,
I finally made it work :clap::clap::clap:
I had to put the Sonoff Zigbee in the electrical panel.

The connection is pretty complicated. I connected the red phase of the Sonoff to the IN and to one of the circuit breakers, the lamp's return wire to the OUT position, the black wire from the button to the relay's circuit breaker, and then behind the button relay's circuit breaker, I connected it to the S2 position.


The problem was that this Sonoff model doesn't work with buttons that don't stay in one position.

I'm very happy that it works.
If others are struggling, I hope this helps them.

Thank you all so much for your help :pray::pray::pray:
All the best
Yiannis

2 Likes

Edit: yes, it is a bit of a strange device... I will have to investigate what this "Switch Actions" configurable setting means :

Knockturn Alley :magic_wand:

================================================================================================
Node Descriptor

▸ Logical Type = Zigbee End Device (ZED)
▸ Complex Descriptor Available = No
▸ User Descriptor Available = No
▸ Fragmentation Supported (R23) = No
▸ Frequency Band = Reserved
▸ Alternate PAN Coordinator = No
▸ Device Type = Reduced Function Device (RFD)
▸ Mains Power Source = No
▸ Receiver On When Idle = No (conserve power during idle periods)
▸ Security Capability = No
▸ Allocate Address = Yes
▸ Manufacturer Code = 0x1286 = SHENZHEN_COOLKIT
▸ Maximum Buffer Size = 82 bytes
▸ Maximum Incoming Transfer Size = 1024 bytes
▸ Primary Trust Center = No
▸ Backup Trust Center = No
▸ Primary Binding Table Cache = Yes
▸ Backup Binding Table Cache = No
▸ Primary Discovery Cache = Yes
▸ Backup Discovery Cache = Yes
▸ Network Manager = Yes
▸ Maximum Outgoing Transfer Size = 1024 bytes
▸ Extended Active Endpoint List Available = No
▸ Extended Simple Descriptor List Available = No

Power Descriptor

▸ Current Power Mode = Same as "Receiver On When Idle" from "Node Descriptor" section above
▸ Available Power Sources = [Constant (mains) power]
▸ Current Power Sources = [Constant (mains) power]
▸ Current Power Source Level = 100%

Endpoint 0x01

Out Cluster: 0x0019 (OTA Upgrade Cluster)

▸ No generated commands

In Cluster: 0x0000 (Basic Cluster)

▸ 0x0000 | ZCL Version | req | r-- | uint8 | 08 = 8 | --
▸ 0x0004 | Manufacturer Name | opt | r-- | string | SONOFF | --
▸ 0x0005 | Model Identifier | opt | r-- | string | ZBMINIL2 | --
▸ 0x0006 | Date Code | req | r-- | string | 20230505 | --
▸ 0x0007 | Power Source | opt | r-- | enum8 | 00 = Unknown | --
▸ 0x4000 | SW Build ID | opt | r-- | string | 1.0.14 | --
▸ 0xFFFD | Cluster Revision | req | r-- | uint16 | 0003 = 3 | --

▸ 0x00 | Reset to Factory Defaults | opt

In Cluster: 0x0001 (Power Configuration Cluster)

▸ 0xFFFD | Cluster Revision | req | r-- | uint16 | 0002 = 2 | --

▸ No received commands

In Cluster: 0x0003 (Identify Cluster)

▸ 0x0000 | Identify Time | req | rw- | uint16 | 0000 = 0 seconds | --
▸ 0xFFFD | Cluster Revision | req | r-- | uint16 | 0002 = 2 | --

▸ 0x00 | Identify | req
▸ 0x01 | Identify Query | req

In Cluster: 0x0006 (On/Off Cluster)

▸ 0x0000 | On Off | req | r-p | bool | 00 = Off | 1..65534
▸ 0x4003 | Power On Behavior | opt | rw- | enum8 | -- | --
▸ 0xFFFD | Cluster Revision | req | r-- | uint16 | 0002 = 2 | --

▸ 0x00 | Off | req
▸ 0x01 | On | req
▸ 0x02 | Toggle | req

In Cluster: 0x0007 (On/Off Switch Configuration Cluster)

▸ 0x0000 | Switch Type | req | r-- | enum8 | 00 = Toggle | --
▸ 0x0010 | Switch Actions | req | rw- | enum8 | 00 = On | --
▸ 0xFFFD | Cluster Revision | req | r-- | uint16 | -- | --

▸ No received commands

In Cluster: 0x0B05 (Diagnostics Cluster)

▸ No attributes

▸ No received commands

In Cluster: 0xFC57 (Unknown Cluster)

▸ No attributes

▸ No received commands

Bindings Table

▸ Could not retrieve data

Neighbors Table

▸ Addr:DD08 | Type:Zigbee Router | RxOnWhenIdle:Yes | Rel:Parent | Permit Joining:Unknown | Depth:15

Routing Table

▸ Could not retrieve data

1 Like

It has to be something like that. Normally, switches like that offer different options in their app to use with a push-button switch or a simple switch.
I found the solution, but only after days of trying with my electrician friend. Without him, I wouldn't have been able to do anything. However, there should be a simpler solution directly available from the switch's options.

So great that you want to investigate further! :slight_smile:
Hope you find a solution easily. Keep us updated, @kkossev! :pray: :clap::clap::clap:"

1 Like

Hi Krassimir i tried you driver but the switch not staying on.

dev:5652024-06-22 07:22:50.538debugbathroom switch on() currentState=off

dev:5652024-06-22 07:19:08.367debugbathroom switch sendZigbeeCommands: sent cmd=[he cmd 0x8EBD 0x01 6 1 {}, delay 2000]

dev:5652024-06-22 07:19:08.322debugbathroom switch on() currentState=off

dev:5652024-06-22 07:19:03.474debugbathroom switch clearing the Status event

dev:5652024-06-22 07:18:40.330infobathroom switch Round-trip time : timeout

dev:5652024-06-22 07:18:40.326warnbathroom switch no response received (sleepy device or offline?)

dev:5652024-06-22 07:18:39.102debugbathroom switch sendZigbeeCommands: sent cmd=[he cmd 0x8EBD 0x01 6 1 {}, delay 2000]

dev:5652024-06-22 07:18:39.063debugbathroom switch on() currentState=off

dev:5652024-06-22 07:18:32.966debugbathroom switch sendZigbeeCommands: sent cmd=[he raw 0x8EBD 1 0x01 0x0006 {10 00 00 00 00}, delay 100, he raw 0x8EBD 1 0x01 0x0006 {10 00 00 03 40}, delay 100]

dev:5652024-06-22 07:18:32.918debugbathroom switch refresh() cmds=[he raw 0x8EBD 1 0x01 0x0006 {10 00 00 00 00}, delay 100, he raw 0x8EBD 1 0x01 0x0006 {10 00 00 03 40}, delay 100]

dev:5652024-06-22 07:18:32.915debugbathroom switch customRefresh() : [he raw 0x8EBD 1 0x01 0x0006 {10 00 00 00 00}, delay 100, he raw 0x8EBD 1 0x01 0x0006 {10 00 00 03 40}, delay 100]

dev:5652024-06-22 07:18:32.908debugbathroom switch refreshFromDeviceProfileList()

dev:5652024-06-22 07:18:32.905debugbathroom switch onOffRefresh()

dev:5652024-06-22 07:18:32.901debugbathroom switch refresh()... DEVICE_TYPE is Switch model=ZBMINIL2 manufacturer=SONOFF

dev:5652024-06-22 07:18:30.336debugbathroom switch ping...

dev:5652024-06-22 07:18:30.334debugbathroom switch sendZigbeeCommands: sent cmd=[he raw 0x8EBD 1 0x01 0x0000 {10 00 00 01 00}]

dev:5652024-06-22 07:18:03.488infobathroom switch executed 'configureNow'

dev:5652024-06-22 07:18:03.448infobathroom switch sent device configuration

dev:5652024-06-22 07:18:03.446debugbathroom switch configure(): sent cmds = [zdo unbind 0x8EBD 0x01 0x01 0x0020 {3410F4FFFE6D5AF4} {}, zdo bind 0x8EBD 0x01 0x01 0x0006 {3410F4FFFE6D5AF4} {}, delay 251, he cr 0x8EBD 0x01 6 0 16 1 65534 {}, delay 251, he raw 0x8EBD 1 0x01 0x0006 {10 00 08 00 0000}, delay 251]

dev:5652024-06-22 07:18:03.444debugbathroom switch sendZigbeeCommands: sent cmd=[zdo unbind 0x8EBD 0x01 0x01 0x0020 {3410F4FFFE6D5AF4} {}, zdo bind 0x8EBD 0x01 0x01 0x0006 {3410F4FFFE6D5AF4} {}, delay 251, he cr 0x8EBD 0x01 6 0 16 1 65534 {}, delay 251, he raw 0x8EBD 1 0x01 0x0006 {10 00 08 00 0000}, delay 251]

dev:5652024-06-22 07:18:03.437debugbathroom switch configureDevice(): cmds=[zdo unbind 0x8EBD 0x01 0x01 0x0020 {3410F4FFFE6D5AF4} {}, zdo bind 0x8EBD 0x01 0x01 0x0006 {3410F4FFFE6D5AF4} {}, delay 251, he cr 0x8EBD 0x01 6 0 16 1 65534 {}, delay 251, he raw 0x8EBD 1 0x01 0x0006 {10 00 08 00 0000}, delay 251]

dev:5652024-06-22 07:18:03.435debugbathroom switch customConfigureDevice() : [zdo unbind 0x8EBD 0x01 0x01 0x0020 {3410F4FFFE6D5AF4} {}, zdo bind 0x8EBD 0x01 0x01 0x0006 {3410F4FFFE6D5AF4} {}, delay 251, he cr 0x8EBD 0x01 6 0 16 1 65534 {}, delay 251, he raw 0x8EBD 1 0x01 0x0006 {10 00 08 00 0000}, delay 251]

dev:5652024-06-22 07:18:03.431debugbathroom switch configureReporting operation=Write, measurement=Switch, minTime=1, maxTime=65534, delta=0 )

dev:5652024-06-22 07:18:03.424debugbathroom switch customConfigureDevice() : unbind ZBMINIL2 poll control cluster

dev:5652024-06-22 07:18:03.422infobathroom switch configureDevice...

dev:5652024-06-22 07:18:03.421debugbathroom switch initializeDevice(): cmds=

dev:5652024-06-22 07:18:03.419infobathroom switch initializeDevice...

dev:5652024-06-22 07:18:03.351debugbathroom switch configure(): settings: [autoPollingEnabled:true, autoReportingEnabled:false, energyMode:POLLED, optimizations:true, reportPower:true, reportVoltage:true, reportAmperage:true, reportFrequency:false, reportPowerFactor:false, reportTemperature:false, fixedPower:100, energyMinReportingTime:30, energyMaxReportingTime:900, energyThreshold:1, energyPrice:0.21326, powerThreshold:1, amperageThreshold:25, voltageThreshold:1, attribEnable:false, allEnable:false, pulseConfiguration:1000, frientEnergyMeterMode:0, overTemperatureBreaker:false, overTemperatureBreakerThreshold:90, overPowerBreaker:false, overPowerBreakerThreshold:12, overCurrentBreaker:false, overCurrentBreakerThreshold:64, overVoltageBreaker:false, overVoltageBreakerThreshold:250, underVoltageBreaker:false, underVoltageBreakerThreshold:64, pollingInterval:60, infoLogging:false, debugLogging:false, traceLogging:false, autoSync:false, resendState:true, pollHR:10, disableLogsOff:false, pwrReport:1, flashRate:2000, voltageToPercent:false, turboMode:9, txtEnable:true, logEnable:true, advancedOptions:true, healthCheckMethod:1, healthCheckInterval:240, traceEnable:false, powerOnBehavior:0, forcedProfile:Sonoff ZBMini L2 Switch, ignoreDuplicated:false, alwaysOn:false, threeStateEnable:false]

dev:5652024-06-22 07:18:03.349infobathroom switch configure()... cfgCtr=4

dev:5652024-06-22 07:18:03.345infobathroom switch configure(Configure the device)...

dev:5652024-06-22 07:17:58.084debugbathroom switch sendZigbeeCommands: sent cmd=[he cmd 0x8EBD 0x01 6 1 {}, delay 2000]

dev:5652024-06-22 07:17:58.047debugbathroom switch on() currentState=off

dev:5652024-06-22 07:17:40.522debugbathroom switch clearing the Status event

dev:5652024-06-22 07:16:42.698debugbathroom switch sendZigbeeCommands: sent cmd=[he raw 0x8EBD 1 0x01 0x0006 {10 00 00 00 00}, delay 100, he raw 0x8EBD 1 0x01 0x0006 {10 00 00 03 40}, delay 100]

dev:5652024-06-22 07:16:42.589debugbathroom switch refresh() cmds=[he raw 0x8EBD 1 0x01 0x0006 {10 00 00 00 00}, delay 100, he raw 0x8EBD 1 0x01 0x0006 {10 00 00 03 40}, delay 100]

dev:5652024-06-22 07:16:42.587debugbathroom switch customRefresh() : [he raw 0x8EBD 1 0x01 0x0006 {10 00 00 00 00}, delay 100, he raw 0x8EBD 1 0x01 0x0006 {10 00 00 03 40}, delay 100]

dev:5652024-06-22 07:16:42.578debugbathroom switch refreshFromDeviceProfileList()

dev:5652024-06-22 07:16:42.573debugbathroom switch onOffRefresh()

dev:5652024-06-22 07:16:42.569debugbathroom switch refresh()... DEVICE_TYPE is Switch model=ZBMINIL2 manufacturer=SONOFF

dev:5652024-06-22 07:16:40.484infobathroom switch updated

dev:5652024-06-22 07:16:40.461debugbathroom switch sendZigbeeCommands: sent cmd=[null]

dev:5652024-06-22 07:16:40.457warnbathroom switch sendZigbeeCommands it: no commands to send! it=null (cmd=[null])

dev:5652024-06-22 07:16:40.455debugbathroom switch sendZigbeeCommands: sent cmd=[he wattr 0x8EBD 0x01 0x0006 0x4003 0x30 {00} {}, delay 200]

Krassimir. I wonder if id ad it to the tuya matter bridge. would it be visible to HE as a usable child device?

Hi @zsolt.toth.39 ,

Strangely, I observed the same behavor - the Sonoff ZBMINIL2 dropped off the C-7 zigbee network 2 or 3 times after I paired it to my old C-7 hub. It was staying connected without any problems to my C-8 hub.

I tried pairing it several times (without deleting it), and after the 3rd or the 4th try it stays connected for 15-20 minutes now. I can turn it on and off and Refresh() the state.

It is also a bit unusual that this device does not respond to the ping() command ( reading the Basic Cluster attribute 0x0001 - this works for all other Zigbee devices that I have!). I will fix this in a future update, but its not so much important at the moment, The question is why ZBMINIL2 needed several pairing attempts on the C-7 hub...

Can you try pairing it several times? After the device is re-descovered, click on the On/Off buttons from the device page to check whether it is still connected. Duiring the first unsuccessful pairing attempts, the relay was clicking during the first 30-40 seconds period, but stopped responding afterward.

My C-7 Zigbe maps are also behaving very strangely at the moment.

The HE built-in map shows this :
image

The community Zigbee Map shows only one device:
image

At the same time, all my 5 Zigbee devices (ZBMINIL2 included) are showing activity :

Weird ... :thinking:


Edit: 15 minutes later the ZBMINIL2 appeared on the HE inbuilt Zigbee map:

image
Probably this is normal, it takes time for the routing tables to be updated. So far it works OK paired directly to the C-7 hub.

The ZBMINIL2 is periodically sending Zigbee re-join commands, this is also not good :


image

Does Sonoff do it on purpose to make their devices incompatible to other platforms?
They are supposed to be zigbee 3.0 which is standard.
ZBMIBIL2 didnt work on 53 firmware had to role back to 47 to make it work again.

Hubiitat C-7 is not Zigbee 3.0 compliant. Only C-8 and C-8-Pro models have Zigbee 3.0 chipsets.

If Sonoff devices are Zigbee 3.0 compliant, they have to switch to the pre-3.0 Zigbee protocol, if the Zigbee coordinator does not support it. But not all manufacturers implement this correctly...

Are you saying that HE platform version 2.3.9.153 does not work with ZBMINIL2, but reverting back to 2.3.9.147 fixes the connectivity issue?

1 Like

Yes i can make it work on 147 with the generic zigbee outlet driver

The driver used doesn't matter whether the device will stay connected, or not.
This custom driver provides just some more detailed statistics that help me troubleshoot some possible issues.

Someting has changed on firmware 150 and above

1 Like

Hi Krassimir

I added a tuya matter hub before than i removed it.
Now Hubitat dont let me add the tuya hub again saying the fabric already exist.
How should i get around this?
Thank you

Remove the connection to your HE hub from the other system that you used as a Matter Comissioner.

This is how it is done with Apple Home :

Hubitat shows up as 'Matter Test' .. .: (
I have my Tuya Matter GW connected to two different HE hubs at the same time.