Page 1 of 1

Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 10:53
by clumpton
Hi,
I have 5 Zigbee push-button switches which control various lights around the house. (SONOFF SNZB-01)
These have worked just fine until a recent update.
Now I get this error message in the log:

Code: Select all

Error: MQTT Auto: sending switch commands for switch type 'sensor' is not supported (yet...) 
(0x00124b00292916bb_action_zigbee2mqtt/ZigButton5 (Action)_single)
It looks to me as if something has changed in the classification of the switches?
The buttons are currently classed as "Push On Button" - I have no idea if this is what they were originally.
Any ideas please?

Domoticz
  • Version: 2023.2 (build 15717)
    Build Hash: 7e30a7b24
    Compile Date: 2023-12-07 07:52:02
    dzVents Version: 3.1.8
    Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]
Zigbee2MQTT
  • Zigbee2MQTT version: 1.32.2-dev commit: e33e335c
    Coordinator type: zStack3x0
    Coordinator revision: 20210708
    Coordinator IEEE Address: 0x00xxxxxxxxxx4dc
    Frontend version: 0.6.133

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 12:39
by waltervl
You are running beta so this can happen.
Check the commit list and issue list as I believe there were some changes on MQTT Auto discover with these kind of action devices.
https://github.com/domoticz/domoticz/co ... evelopment

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 12:44
by waltervl
Probably related this fix for Zwave-JS-UI https://github.com/domoticz/domoticz/issues/5856

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 14:01
by waltervl
Perhaps you should remove these devices from Domoticz and have them recreate again to be sure they use the correct configuration.

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 17:35
by clumpton
waltervl wrote: Tuesday 12 December 2023 12:39 You are running beta so this can happen.
Check the commit list and issue list as I believe there were some changes on MQTT Auto discover with these kind of action devices.
https://github.com/domoticz/domoticz/co ... evelopment
Thanks waltervl,

I've checked and it looks like MQTT is sending a status change from the button with an 'action' (single, double, long and "" for release). This is behaviour that I saw a year or so ago which suddenly changed to having a device for each action (e.g. ZButton1_Single) with an MQTT update. Looks like a reversion.
waltervl wrote: Tuesday 12 December 2023 14:01 Perhaps you should remove these devices from Domoticz and have them recreate again to be sure they use the correct configuration.
I tried deleting the devices but they reappeared as before (i.e. a device per action)

Maybe I should re-register them in MQTT?

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 18:10
by waltervl
I don't know, perhaps create a new github issue referring to the Zwave-JS-UI issue. It looks like both platforms behave differently on this action devices.

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 19:18
by Doler
It's not a Zwave-JS issue but a Zigbee AD issue. These multifunction switches (Sonoff, Xiaomi) are not recognised by the built-in Zigbee AD as they are correctly recognised by the Zigbee Z2M plugin. This is a long standing issue that till today didn't get resolved (too specific devices?).
With Domoticz Zigbee AD these devices are classified as sensors iso switches, after pressing a switch a action button is generated that is non-functional (ie gives an error 'Error sending switch command...').

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 21:04
by waltervl
To get thing clear:
MQTT AD is a protocol that defines how devices are defined and how to report and update status changes.
Domoticz can read MQTT AD messages. But it looks like Zigbee2MQTT and Zwave-JS-UI send different AD messages when these kind of switches are being used. So for Domoticz it is difficult to understand what it should do as it does not know if the MQTT message is sent from Zwave-JS-UI or Zigbee2MQTT (or another MQTT platform with AD like OpenMQTT Gateway).

The Zigbee2MQTT python plugin only looks at Zigbee2MQTT so has no problem.

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 23:08
by clumpton
Doler wrote: Tuesday 12 December 2023 19:18 It's not a Zwave-JS issue but a Zigbee AD issue. These multifunction switches (Sonoff, Xiaomi) are not recognised by the built-in Zigbee AD as they are correctly recognised by the Zigbee Z2M plugin. This is a long standing issue that till today didn't get resolved (too specific devices?).
With Domoticz Zigbee AD these devices are classified as sensors iso switches, after pressing a switch a action button is generated that is non-functional (ie gives an error 'Error sending switch command...').
Yes, I understand, but something has changed in a very recent beta of Domoticz to stop what used to work from working.

By the way, I run a beta version because Domoticz became unresponsive even after a restart and I saw a hint to do an upgrade to beta to clear the problem (which it did)

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 23:10
by clumpton
waltervl wrote: Tuesday 12 December 2023 21:04 The Zigbee2MQTT python plugin only looks at Zigbee2MQTT so has no problem.
That's what I'm using - it didn't use to have a problem, now it has

Re: Zigbee push buttons all stopped working

Posted: Tuesday 12 December 2023 23:36
by waltervl
Ok, you should have mentioned that before that you are using the plugin...


Then it is a change in Zigbee2MQTT or the python plugin. That could not be related to domoticz.

But seeing your log in the first topic you have given your hardware gateway the name MQTT Auto that lead me thinking you use the Domoticz MQTT Auto discover hardware gateway instead f the plugin.

If you used the plugin you probably would have named it Zigbee2MQTT.

Can you post a screenshot of your MQTT Auto gateway configuration page. What is written in field Type?

Re: Zigbee push buttons all stopped working

Posted: Wednesday 13 December 2023 1:01
by clumpton
waltervl wrote: Tuesday 12 December 2023 23:36 Ok, you should have mentioned that before that you are using the plugin...

If you used the plugin you probably would have named it Zigbee2MQTT.

Can you post a screenshot of your MQTT Auto gateway configuration page. What is written in field Type?
Oops, sorry. I used to use the plugin, looks like I'm now on auto discovery.
Image

I have updated Zigbee2MQTT to the latest version, no change.
I have compared database entries for the buttons from Dec 1 and Dec 12, they are identical apart from the naming syntax for the action.
Example:

Code: Select all

ID	HardwareID	DeviceID	Unit	Name	Used	Type	SubType	SwitchType	Favorite	SignalLevel	BatteryLevel	nValue	sValue	LastUpdate	Order	AddjValue	AddjMulti	AddjValue2	AddjMulti2	StrParam1	StrParam2	LastLevel	Protected	CustomImage	Description	Options	Color

Old Entry Dec 1st
1071	15	0x00124b002928afa0_action_zigbee2mqtt	129	ZigButton4 action_single	1	244	73	9	0	2	100	1	0	2023-09-10 21:05:10	1073	0.0	1.0	0.0	1.0			0	0	0			

New Entry Dec 12th
1144	15	0x00124b0024ffff44_action_zigbee2mqtt	129	ZBut01 (Action)_single    	1	244	73	9	0	0	100	1	0	2023-12-12 20:42:20	1144	0.0	1.0	0.0	1.0			0	0	0		
I removed all the buttons from Domoticz, force deleted them from zigbee2MQTT.
Re-paired a button
It appeared in Domoticz like this:
Image

Note that Action Double and Action Long which appeared in older versions are no longer there.

Finally, here is the Zigbee2MQTT log showing the published properties (which appear correct as there is an enum of the possible actions).

Code: Select all

MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Wireless button",
"exposes":[{"access":1,"description":"Remaining battery in %, can take up to 24 hours before reported.",
"label":"Battery","name":"battery","property":"battery","type":"numeric","unit":"%","value_max":100,"value_min":0},
{"access":1,"description":"Triggered action (e.g. a button click)","label":"Action","name":"action",
"property":"action","type":"enum","values":["single","double","long"]},
{"access":1,"description":"Voltage of the battery in millivolts",
"label":"Voltage","name":"voltage","property":"voltage","type":"numeric","unit":"mV"},{"access":1,"description":"Link quality (signal strength)",
"label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],
"model":"SNZB-01","options":[],"supports_ota":false,"vendor":"SONOFF"},"friendly_name":"0x00124b0024ffff44",
"ieee_address":"0x00124b0024ffff44","status":"successful","supported":true},"type":"device_interview"}'
Apologies for the lengthy post, trying to get all the information together in one place. I very much appreciate the attention you are giving this issue.

Re: Zigbee push buttons all stopped working

Posted: Wednesday 13 December 2023 9:15
by Dave21w
"Note that Action Double and Action Long which appeared in older versions are no longer there." won't appear until you perform that action for the first time.

Re: Zigbee push buttons all stopped working

Posted: Wednesday 13 December 2023 9:42
by waltervl
Dave21w wrote: Wednesday 13 December 2023 9:15 "Note that Action Double and Action Long which appeared in older versions are no longer there." won't appear until you perform that action for the first time.
So @clumpton should double click and do a Long click on those switches first to get those added to Domoticz?

Edit: And you still have the error message in Domoticz or Zigbee2MQTT that a switch command is not allowed when you press the button (short, long, or double)?

Re: Zigbee push buttons all stopped working

Posted: Wednesday 13 December 2023 10:05
by clumpton
waltervl wrote: Wednesday 13 December 2023 9:42 So @clumpton should double click and do a Long click on those switches first to get those added to Domoticz?
Aha! That indeed works - bit of a pain because I will have to have search for the 'Action' in the device names in dzvents to separate the clicks but it's workable.
waltervl wrote: Wednesday 13 December 2023 9:42 Edit: And you still have the error message in Domoticz or Zigbee2MQTT that a switch command is not allowed when you press the button (short, long, or double)?
Yes, clicking on the switch in the GUI still throws an error.

Code: Select all

Error: MQTT Auto: sending switch commands for switch type 'sensor' is not supported (yet...) (0x00124b0024ffff44_action_zigbee2mqtt/Zbut01 (Action)_double)
Thanks for the help and info, at least things are working.

Re: Zigbee push buttons all stopped working

Posted: Wednesday 13 December 2023 11:06
by Dave21w
Rereading your post and then your last comment I've realised exactly what your getting at, I use Z2M and my buttons have always shown that error when you try and press the button created in Domoticz. As the button is used to toggle an actual switch or light I've never seen it as a problem as I would just press the switch or light in question. I always hide my buttons once created with a $ sign at the beginning of the name, can't see the point in clutering up the dashboard with something you can't press.
You are right though that a while back a single device was created and its operation state showed as single, double or hold (release) where as now you get three devices, not really an issue though.

Re: Zigbee push buttons all stopped working

Posted: Wednesday 13 December 2023 13:34
by clumpton
I always hide my buttons once created with a $ sign at the beginning of the name, can't see the point in clutering up the dashboard with something you can't press.
You learn something new every day, really useful!

Re: Zigbee push buttons all stopped working

Posted: Wednesday 13 December 2023 15:43
by Dave21w
Everydays a school day ;)