Zigbee push buttons all stopped working

Moderator: leecollings

Post Reply
clumpton
Posts: 26
Joined: Saturday 18 January 2020 13:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France
Contact:

Zigbee push buttons all stopped working

Post 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
User avatar
waltervl
Posts: 5392
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee push buttons all stopped working

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5392
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee push buttons all stopped working

Post by waltervl »

Probably related this fix for Zwave-JS-UI https://github.com/domoticz/domoticz/issues/5856
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5392
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee push buttons all stopped working

Post by waltervl »

Perhaps you should remove these devices from Domoticz and have them recreate again to be sure they use the correct configuration.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
clumpton
Posts: 26
Joined: Saturday 18 January 2020 13:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France
Contact:

Re: Zigbee push buttons all stopped working

Post 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?
User avatar
waltervl
Posts: 5392
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee push buttons all stopped working

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Doler
Posts: 145
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: Zigbee push buttons all stopped working

Post 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...').
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
User avatar
waltervl
Posts: 5392
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee push buttons all stopped working

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
clumpton
Posts: 26
Joined: Saturday 18 January 2020 13:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France
Contact:

Re: Zigbee push buttons all stopped working

Post 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)
clumpton
Posts: 26
Joined: Saturday 18 January 2020 13:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France
Contact:

Re: Zigbee push buttons all stopped working

Post 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
User avatar
waltervl
Posts: 5392
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee push buttons all stopped working

Post 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?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
clumpton
Posts: 26
Joined: Saturday 18 January 2020 13:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France
Contact:

Re: Zigbee push buttons all stopped working

Post 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.
Dave21w
Posts: 369
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: Zigbee push buttons all stopped working

Post 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.
User avatar
waltervl
Posts: 5392
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee push buttons all stopped working

Post 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)?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
clumpton
Posts: 26
Joined: Saturday 18 January 2020 13:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France
Contact:

Re: Zigbee push buttons all stopped working

Post 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.
Dave21w
Posts: 369
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: Zigbee push buttons all stopped working

Post 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.
Last edited by Dave21w on Wednesday 13 December 2023 15:42, edited 1 time in total.
clumpton
Posts: 26
Joined: Saturday 18 January 2020 13:17
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: France
Contact:

Re: Zigbee push buttons all stopped working

Post 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!
Dave21w
Posts: 369
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: Zigbee push buttons all stopped working

Post by Dave21w »

Everydays a school day ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests